Hyperledger Fabric-创建渠道问题

时间:2018-11-27 03:40:19

标签: java hyperledger-fabric

我正在寻找有关Hyperledger Fabric频道创建的帮助。我是面料初学者。我已经使用Nodejs,Go和HL Composer开发了项目。现在,我正在尝试使用fabric-sdk-java。我使用了标准的fabric-sdk-java余额转移示例。工作正常。

https://github.com/siyuyifang/balance-transfer-java

但是该示例在Fabric版本1.0和fabric-sdk-java v1.0中。因此,我将byfn和docker-composer升级到了当前版本v1.3。一切看起来都很好-生成了byfn,docker yaml,证书和msp。我可以注册用户。但是我在创建频道时遇到问题。后端出现PFB错误。[spring]

ResponseEntity<java.lang.String> blockchain.controller.ChaincodeController.createChannel(java.lang.String) throws java.lang.Exception]
Constructing channel mychannel
orderName  orderer.example.com
channelName mychannel anOrderer Orderer--orderer.example.com (grpcs://localhost:7050)
2018-Nov-27 02:34:39.712 ERROR [grpc-default-executor-1] o.h.f.s.OrdererClient - org.hyperledger.fabric.sdk.OrdererClient$1@1e76ab7e  managed channel isTerminated: false, isShutdown: false, state: TRANSIENT_FAILURE
2018-Nov-27 02:34:39.716 ERROR [grpc-default-executor-1] o.h.f.s.OrdererClient - Received error on channel mychannel, orderer orderer.example.com, url grpcs://localhost:7050, UNAVAILABLE: io exception
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
    at io.grpc.Status.asRuntimeException(Status.java:526)
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:434)
    at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
    at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
    at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
    at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:678)
    at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
    at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
    at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
    at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:403)
    at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
    at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)

Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:7050
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325)
    at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:634)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    ... 1 common frames omitted
Caused by: java.net.ConnectException: Connection refused

我试图检查订购者日志以找出问题所在

2018-11-27 02:24:15.920 UTC [msp/identity] newIdentity -> DEBU 050 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCTCCAbCgAwIBAgIQHphbzBpQZetr/+xGf7YLIjAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MDMzMDA2MTU0MloXDTI4MDMyNzA2MTU0MlowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEgIw6hZllU5eKp4n0FL6iKSGB/SF3S3lbifq+0LCPFt7OYx7+Zioe
uEe3toUy/5wusZHfvvljSWgmHNo63CeneaNNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgRilJAif0vJxbob/nG0eRFxQnbGGYUyp8
SWIj9KqRaxgwCgYIKoZIzj0EAwIDRwAwRAIgSeKXKHromOxYBsPqYHraxEZdwsad
VvWqSTYkwE9vN1UCIHd7/c0K0Ue1yAL/hENnpZWc1pFhNpGe4x2/EsNEIXOC
-----END CERTIFICATE-----
2018-11-27 02:24:15.921 UTC [orderer/commmon/multichannel]        newLedgerResources -> PANI 051 Error creating channelconfig bundle:     initializing channelconfig failed: could not create channel Orderer sub-group config: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.example.com")
panic: Error creating channelconfig bundle: initializing channelconfig failed: could not create channel Orderer sub-group config: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.example.com")

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc4200e9a20, 0x0, 0x0,0x0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x4f4
 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc4200b2288, 0x4, 0xe14c6d, 0x27, 0xc42039f958, 0x1, 0x1, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc4200b2288, 0xe14c6d, 0x27, 0xc42039f958, 0x1, 0x1)
    /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(0xc4200b2290, 0xe14c6d, 0x27, 0xc42039f958, 0x1, 0x1)
    /opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:74 +0x60
 github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).newLedgerResources(0xc420220480, 0xc420164eb0, 0xc420164eb0)
    /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:256 +0x2ea
 github.com/hyperledger/fabric/orderer/common/multichannel.NewRegistrar(0xea36a0, 0xc4204a4040, 0xc420166f90, 0xe9b060, 0x15a78b0, 0xc4200b2c90, 0x1, 0x1, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:142 +0x312                github.com/hyperledger/fabric/orderer/common/server.initializeMultichannelRegistrar(0xc4200f8580, 0xe9b060, 0x15a78b0, 0xc4200b2c90, 0x1, 0x1, 0x0)
    /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:258 +0x250
github.com/hyperledger/fabric/orderer/common/server.Start(0xdf7a5a, 0x5, 0xc4200f8580)
    /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:96 +0x226
github.com/hyperledger/fabric/orderer/common/server.Main()
    /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:75 +0x1d6
main.main()
    /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:15 +0x20
root@BlockchainInsurance:~# configtxgen -inspectBlock <genesis.block>
-bash: syntax error near unexpected token `newline'

我尽了最大的努力。我在crypto-config.yaml中进行了许多更改,现在我相信它是完美的。请让我知道我哪里出了问题。

0 个答案:

没有答案