简体   繁体   English

无法连接尝试连接到本地对等节点时出错:超出了上下文期限

[英]Can't connect Error trying to connect to local peer: context deadline exceeded

I am trying to instantiate chaincode between multiple peers, each in their own respective organization. 我试图实例化多个对等方之间的链码,每个对等方都在各自的组织中。 For debugging purposes, I created a channel testchannel with only a single organization overseer with a single peer peer0 . 为了进行调试,我创建了一个通道testchannel通道,其中只有一个组织overseer和一个对等peer0 I am able to 我能够

  • create the channel 建立频道
  • join the channel (when I use peer channel list , the channel appears in the result) 加入频道(当我使用peer channel list ,该频道将显示在结果中)
  • install chaincode (when I use peer chaincode list --installed , the chaincode appears in the result) 安装链码(当我使用peer chaincode list --installed ,链码会出现在结果中)

But when I instantiate the chaincode using peer chaincode instantiate -C testchannel -v v0 -n example --peerAddresses peer0.overseer.bloomberg.com:7051 -o orderer.bloomberg.com:7050 -c '{"Args":["init","a","100","b","200"]}' -P "AND ('OverseerOrg.peer')" , a new chaincode container is spun up but exits after a few seconds since it cannot reach the peer. 但是,当我使用peer chaincode instantiate -C testchannel -v v0 -n example --peerAddresses peer0.overseer.bloomberg.com:7051 -o orderer.bloomberg.com:7050 -c '{"Args":["init","a","100","b","200"]}' -P "AND ('OverseerOrg.peer')" OverseerOrg.peer peer chaincode instantiate -C testchannel -v v0 -n example --peerAddresses peer0.overseer.bloomberg.com:7051 -o orderer.bloomberg.com:7050 -c '{"Args":["init","a","100","b","200"]}' -P "AND ('OverseerOrg.peer')" ,一个新的链式代码容器被旋转了,但是在几秒钟后退出,因为它不能达到同行。

I've ensured that when I instantiate the chaincode, I have the environment variable CORE_PEER_ADDRESS=peer0.overseer.example.com:7051 set 我确保在实例化链码时,已设置环境变量CORE_PEER_ADDRESS=peer0.overseer.example.com:7051

The logs for the chaincode container is: chaincode容器的日志为:

2018-10-12 20:44:56.797 UTC [shim] userChaincodeStreamGetter -> ERRO 001 

context deadline exceeded
error trying to connect to local peer
github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter
        /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:111
github.com/hyperledger/fabric/core/chaincode/shim.Start
        /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:150
main.main
        /chaincode/input/src/example/example.go:195
runtime.main
        /opt/go/src/runtime/proc.go:198
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:2361
Error starting Simple chaincode: error trying to connect to local peer: context deadline exceeded

and the logs for the peer container that I am running the chaincode on is: 我正在运行chaincode的对等容器的日志是:

2018-10-12 20:26:02.507 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2018-10-12 20:26:02.507 UTC [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.PKCS11
2018-10-12 20:26:02.508 UTC [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value is not a string: <nil>
2018-10-12 20:26:02.508 UTC [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2018-10-12 20:26:02.509 UTC [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: <nil>
2018-10-12 20:26:02.509 UTC [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2018-10-12 20:26:02.509 UTC [viperutil] unmarshalJSON -> DEBU 007 Unmarshal JSON: value is not a string: <nil>
2018-10-12 20:26:02.510 UTC [viperutil] getKeysRecursively -> DEBU 008 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2018-10-12 20:26:02.510 UTC [viperutil] getKeysRecursively -> DEBU 009 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2018-10-12 20:26:02.511 UTC [viperutil] unmarshalJSON -> DEBU 00a Unmarshal JSON: value is not a string: <nil>
2018-10-12 20:26:02.511 UTC [viperutil] getKeysRecursively -> DEBU 00b Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2018-10-12 20:26:02.511 UTC [viperutil] unmarshalJSON -> DEBU 00c Unmarshal JSON: value is not a string: <nil>
2018-10-12 20:26:02.512 UTC [viperutil] getKeysRecursively -> DEBU 00d Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2018-10-12 20:26:02.512 UTC [viperutil] unmarshalJSON -> DEBU 00e Unmarshal JSON: value is not a string: <nil>
2018-10-12 20:26:02.513 UTC [viperutil] getKeysRecursively -> DEBU 00f Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2018-10-12 20:26:02.513 UTC [viperutil] unmarshalJSON -> DEBU 010 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-10-12 20:26:02.513 UTC [viperutil] getKeysRecursively -> DEBU 011 Found real value for peer.BCCSP.Default setting to string SW
2018-10-12 20:26:02.514 UTC [viperutil] getKeysRecursively -> DEBU 012 Found map[string]interface{} value for peer.BCCSP.SW
2018-10-12 20:26:02.514 UTC [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2018-10-12 20:26:02.514 UTC [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2018-10-12 20:26:02.514 UTC [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2018-10-12 20:26:02.515 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-10-12 20:26:02.515 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2018-10-12 20:26:02.515 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value is not a string: 256
2018-10-12 20:26:02.515 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.SW.Security setting to int 256
2018-10-12 20:26:02.515 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[PKCS11:map[Hash:<nil> Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil>] Default:SW SW:map[Security:256 FileKeyStore:map[KeyStore:] Hash:SHA2]]]
2018-10-12 20:26:02.515 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/keystore]...done
2018-10-12 20:26:02.516 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2018-10-12 20:26:02.516 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/signcerts
2018-10-12 20:26:02.516 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/signcerts/Admin@overseer.example.com-cert.pem
2018-10-12 20:26:02.516 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/cacerts
2018-10-12 20:26:02.516 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/cacerts/ca.overseer.example.com-cert.pem
2018-10-12 20:26:02.516 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/admincerts
2018-10-12 20:26:02.517 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/admincerts/Admin@overseer.example.com-cert.pem
2018-10-12 20:26:02.517 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/intermediatecerts
2018-10-12 20:26:02.517 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/intermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/intermediatecerts: no such file or directory]
2018-10-12 20:26:02.517 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/tlscacerts
2018-10-12 20:26:02.517 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/tlscacerts/tlsca.overseer.example.com-cert.pem
2018-10-12 20:26:02.517 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/tlsintermediatecerts
2018-10-12 20:26:02.517 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/tlsintermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/tlsintermediatecerts: no such file or directory]
2018-10-12 20:26:02.517 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/crls
2018-10-12 20:26:02.518 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/crls]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/crls: no such file or directory]
2018-10-12 20:26:02.518 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/config.yaml: no such file or directory]
2018-10-12 20:26:02.518 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2018-10-12 20:26:02.518 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2018-10-12 20:26:02.518 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2018-10-12 20:26:02.519 UTC [msp] Setup -> DEBU 02f Setting up MSP instance overseer.example.com
2018-10-12 20:26:02.519 UTC [msp/identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICWzCCAgKgAwIBAgIRAP9PLdKfT0uv6gN4f+gaIsQwCgYIKoZIzj0EAwIwfzEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xHzAdBgNVBAoTFm92ZXJzZWVyLmJsb29tYmVyZy5jb20xIjAgBgNV
BAMTGWNhLm92ZXJzZWVyLmJsb29tYmVyZy5jb20wHhcNMTgxMDEyMjAxNjA4WhcN
MjgxMDA5MjAxNjA4WjB/MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5p
YTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEChMWb3ZlcnNlZXIuYmxv
b21iZXJnLmNvbTEiMCAGA1UEAxMZY2Eub3ZlcnNlZXIuYmxvb21iZXJnLmNvbTBZ
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABExCn1W4t0a+Inu7E2Lk/atxsPsIaeAn
uKs4ahjstkDLJNyG7TDpAezgCNk9SisKWt8GCCHm0QMGPZp31e0ID1GjXzBdMA4G
A1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8w
KQYDVR0OBCIEIBJ+7r+y9kwB4PkMOnq4YNR+6viP54lY7ZgfDUgZIDhPMAoGCCqG
SM49BAMCA0cAMEQCIGoCkMDtE9ZcmDHYfY6w1yBvX8RVyGdC0ulKbyhfuN+7AiAo
n6ni5FN3d+qivZ79cZvjekd9QXY+2HmDQkKtiJbh9Q==
-----END CERTIFICATE-----
2018-10-12 20:26:02.520 UTC [msp/identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICOjCCAeKgAwIBAgIQTc89Dn6XlcZCM2EcDdD45jAKBggqhkjOPQQDAjB/MQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEfMB0GA1UEChMWb3ZlcnNlZXIuYmxvb21iZXJnLmNvbTEiMCAGA1UE
AxMZY2Eub3ZlcnNlZXIuYmxvb21iZXJnLmNvbTAeFw0xODEwMTIyMDE2MDhaFw0y
ODEwMDkyMDE2MDhaMHIxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxJTAjBgNV
BAMMHEFkbWluQG92ZXJzZWVyLmJsb29tYmVyZy5jb20wWTATBgcqhkjOPQIBBggq
hkjOPQMBBwNCAARUpVnJ2AjcsW2E6Jv+DWqnBgffASnPvz83RIVOCsz6xmzwMduZ
Gzq2xhNzZ3dIdJT/5gdOE24nItLpW7ot3E7vo00wSzAOBgNVHQ8BAf8EBAMCB4Aw
DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCASfu6/svZMAeD5DDp6uGDUfur4j+eJ
WO2YHw1IGSA4TzAKBggqhkjOPQQDAgNGADBDAiBkKQ+3t+F0TlL3NagEpo+p3SEd
QAmqJsJY5YCcnJtHEwIfS04ALkM+RGn7AWsbQ1wt5R4Jhg3IYKaBSLCy1GNImA==
-----END CERTIFICATE-----
2018-10-12 20:26:02.540 UTC [msp/identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICOjCCAeKgAwIBAgIQTc89Dn6XlcZCM2EcDdD45jAKBggqhkjOPQQDAjB/MQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEfMB0GA1UEChMWb3ZlcnNlZXIuYmxvb21iZXJnLmNvbTEiMCAGA1UE
AxMZY2Eub3ZlcnNlZXIuYmxvb21iZXJnLmNvbTAeFw0xODEwMTIyMDE2MDhaFw0y
ODEwMDkyMDE2MDhaMHIxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxJTAjBgNV
BAMMHEFkbWluQG92ZXJzZWVyLmJsb29tYmVyZy5jb20wWTATBgcqhkjOPQIBBggq
hkjOPQMBBwNCAARUpVnJ2AjcsW2E6Jv+DWqnBgffASnPvz83RIVOCsz6xmzwMduZ
Gzq2xhNzZ3dIdJT/5gdOE24nItLpW7ot3E7vo00wSzAOBgNVHQ8BAf8EBAMCB4Aw
DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCASfu6/svZMAeD5DDp6uGDUfur4j+eJ
WO2YHw1IGSA4TzAKBggqhkjOPQQDAgNGADBDAiBkKQ+3t+F0TlL3NagEpo+p3SEd
QAmqJsJY5YCcnJtHEwIfS04ALkM+RGn7AWsbQ1wt5R4Jhg3IYKaBSLCy1GNImA==
-----END CERTIFICATE-----
2018-10-12 20:26:02.541 UTC [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [31a56a32cc8bb684d0b7de7fc25aa98510a8145ffc8d20de601611b21c5bae00] at [/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp/keystore/31a56a32cc8bb684d0b7de7fc25aa98510a8145ffc8d20de601611b21c5bae00_sk]...
2018-10-12 20:26:02.541 UTC [msp/identity] newIdentity -> DEBU 034 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICOjCCAeKgAwIBAgIQTc89Dn6XlcZCM2EcDdD45jAKBggqhkjOPQQDAjB/MQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEfMB0GA1UEChMWb3ZlcnNlZXIuYmxvb21iZXJnLmNvbTEiMCAGA1UE
AxMZY2Eub3ZlcnNlZXIuYmxvb21iZXJnLmNvbTAeFw0xODEwMTIyMDE2MDhaFw0y
ODEwMDkyMDE2MDhaMHIxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMQ8wDQYDVQQLEwZjbGllbnQxJTAjBgNV
BAMMHEFkbWluQG92ZXJzZWVyLmJsb29tYmVyZy5jb20wWTATBgcqhkjOPQIBBggq
hkjOPQMBBwNCAARUpVnJ2AjcsW2E6Jv+DWqnBgffASnPvz83RIVOCsz6xmzwMduZ
Gzq2xhNzZ3dIdJT/5gdOE24nItLpW7ot3E7vo00wSzAOBgNVHQ8BAf8EBAMCB4Aw
DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCASfu6/svZMAeD5DDp6uGDUfur4j+eJ
WO2YHw1IGSA4TzAKBggqhkjOPQQDAgNGADBDAiBkKQ+3t+F0TlL3NagEpo+p3SEd
QAmqJsJY5YCcnJtHEwIfS04ALkM+RGn7AWsbQ1wt5R4Jhg3IYKaBSLCy1GNImA==
-----END CERTIFICATE-----
2018-10-12 20:26:02.542 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-10-09 20:16:08 +0000 UTC
2018-10-12 20:26:02.542 UTC [msp] Validate -> DEBU 036 MSP overseer.example.com validating identity
2018-10-12 20:26:02.543 UTC [grpc] Printf -> DEBU 037 parsed scheme: ""
2018-10-12 20:26:02.543 UTC [grpc] Printf -> DEBU 038 scheme "" not registered, fallback to default scheme
2018-10-12 20:26:02.544 UTC [grpc] Printf -> DEBU 039 ccResolverWrapper: sending new addresses to cc: [{peer0.overseer.example.com:7051 0  <nil>}]
2018-10-12 20:26:02.544 UTC [grpc] Printf -> DEBU 03a ClientConn switching balancer to "pick_first"
2018-10-12 20:26:02.544 UTC [grpc] Printf -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc4203b54b0, CONNECTING
2018-10-12 20:26:02.546 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4203b54b0, READY
2018-10-12 20:26:02.547 UTC [grpc] Printf -> DEBU 03d parsed scheme: ""
2018-10-12 20:26:02.547 UTC [grpc] Printf -> DEBU 03e scheme "" not registered, fallback to default scheme
2018-10-12 20:26:02.547 UTC [grpc] Printf -> DEBU 03f ccResolverWrapper: sending new addresses to cc: [{peer0.overseer.example.com:7051 0  <nil>}]
2018-10-12 20:26:02.547 UTC [grpc] Printf -> DEBU 040 ClientConn switching balancer to "pick_first"
2018-10-12 20:26:02.547 UTC [grpc] Printf -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc4204424b0, CONNECTING
2018-10-12 20:26:02.548 UTC [grpc] Printf -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc4204424b0, READY
2018-10-12 20:26:02.549 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity
2018-10-12 20:26:02.549 UTC [grpc] Printf -> DEBU 044 parsed scheme: ""
2018-10-12 20:26:02.549 UTC [grpc] Printf -> DEBU 045 scheme "" not registered, fallback to default scheme
2018-10-12 20:26:02.551 UTC [grpc] Printf -> DEBU 046 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0  <nil>}]
2018-10-12 20:26:02.551 UTC [grpc] Printf -> DEBU 047 ClientConn switching balancer to "pick_first"
2018-10-12 20:26:02.551 UTC [grpc] Printf -> DEBU 048 pickfirstBalancer: HandleSubConnStateChange: 0xc420442100, CONNECTING
2018-10-12 20:26:02.553 UTC [grpc] Printf -> DEBU 049 pickfirstBalancer: HandleSubConnStateChange: 0xc420442100, READY
2018-10-12 20:26:02.553 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 04a Using default escc
2018-10-12 20:26:02.554 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 04b Using default vscc
2018-10-12 20:26:02.554 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 04c java chaincode disabled
2018-10-12 20:26:02.555 UTC [msp/identity] Sign -> DEBU 04d Sign: plaintext: 0A89080A890108031A0C08DA8684DE05...1A000A000A04657363630A0476736363
2018-10-12 20:26:02.555 UTC [msp/identity] Sign -> DEBU 04e Sign: digest: 3187A3833B292152334734E4A96DA8132016D2E58E4A94C10B18538379261AD0
Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction a52a3bf44cdaa48d862c57e66c32f51785bd4606f50a4b7b9cac7e9385061b5d: timeout expired while starting chaincode example:v0 for transaction a52a3bf44cdaa48d862c57e66c32f51785bd4606f50a4b7b9cac7e9385061b5d

Here is my docker-compose.yaml setup: 这是我的docker-compose.yaml设置:

  peer0.overseer.example.com:
    container_name: peer0.overseer.example.com
    extends:
      file: ./configs/base.yaml
      service: peer-base
    environment:
      - CORE_LOGGING_LEVEL=DEBUG
      - CORE_PEER_ID=peer0.overseer.example.com
      - CORE_PEER_LOCALMSPID=overseer.example.com
      - CORE_PEER_ADDRESS=peer0.overseer.example.com:7051
      - CORE_PEER_CHAINCODELISTENADDRESS=peer0.overseer.example.com:7052
    ports:
      - 7051:7051
      - 7052:7052
      - 7053:7053
    volumes:
        - ./channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com:/etc/hyperledger/crypto/peer
    depends_on:
      - orderer.example.com
    networks:
      - my_network

Here is my configtx.yaml for the channel creation 这是我用于频道创建的configtx.yaml

Organizations:
    - &OverseerOrg
        Name: OverseerOrg
        ID: overseer.example.com
        MSPDir: /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/crypto-config/peerOrganizations/overseer.example.com/users/Admin@overseer.example.com/msp
        AnchorPeers:
            - Host: peer0.overseer.example.com
              Port: 7051
        Policies: &PoliciesDefaults
            Readers:
                Type: Signature
                Rule: "OR('overseer.example.com.member')"
            Writers:
                Type: Signature
                Rule: "OR('overseer.example.com.member')"
            Admins:
                Type: Signature
                Rule: "OR('overseer.example.com.admin')"

Profiles:
    TESTTRANSACTION:
        Consortium: InitialConsortium
        Application:
            Organizations:
                - *OverseerOrg

When I run docker exec -it peer0.overseer.example.com bash into the peer container and run a netstat --all , my results are: 当我将docker exec -it peer0.overseer.example.com bash运行到对等容器中并运行netstat --all ,我的结果是:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.11:33891        *:*                     LISTEN
tcp        0      0 51f03616cac7:7052       *:*                     LISTEN
tcp6       0      0 [::]:7051               [::]:*                  LISTEN
tcp6       0      0 [::]:7053               [::]:*                  LISTEN
udp        0      0 127.0.0.11:52356        *:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path

How could I fix this issue or further debug what the problem is? 如何解决此问题或进一步调试问题所在? Thanks. 谢谢。

The issue was because within my base.yaml file, I had the environment variable CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE set to an outdated, but still existing docker network (in my case artifacts_default ), which is why it didn't throw a "network does not exist" error in chaincode instantiation. 问题是因为在我的base.yaml文件中,我将环境变量CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE设置为已过时但仍存在的CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE网络(在我的情况下为artifacts_default ),这就是为什么它没有引发“网络不存在”错误的原因在链码实例化中。 When I start my docker containers, it joins a default network derived from the directory that the compose file is in, which did not match the network name set by the CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE environment variable. 当我启动Docker容器时,它会加入一个从组成文件所在目录派生的默认网络,该网络与CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE环境变量设置的网络名称不匹配。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Hyperledger Fabric-实例化链码时出错(尝试连接到本地对等点时出错:超出了上下文期限) - Hyperledger Fabric - Error while Instantiating chaincode (error trying to connect to local peer: context deadline exceeded) 错误:尝试连接到本地对等方时出错:grpc:尝试连接超时 - ERRO : Error trying to connect to local peer: grpc: timed out trying to connect Docker 无法连接到 inte.net - 连接因对等错误而重置 - Docker can't connect to internet - connection reset by peer error 对 peer0.org1.example.com:7051 的深度探测失败:超出上下文截止日期 - Deep probe of peer0.org1.example.com:7051 failed: context deadline exceeded Docker 错误“无法连接到网络<name> : 超出上下文最后期限。”</name> - Docker error “Could not attach to network <name>: context deadline exceeded.” 无法使用JDBC连接到docker中的本地MySQL - Can't connect to local MySQL in docker with JDBC Docker swarm leave --force - 超出上下文截止日期 - Docker swarm leave --force - context deadline exceeded 尝试连接到本地 mysql 数据库时 docker 容器上的 Django 错误 - Django on docker container error when trying to connect to local mysql database 无法通过Docker映像中的套接字错误连接到本地MySQL服务器 - Can't connect to local MySQL server through socket error in Docker Image mySQL Docker“ ERROR 2002(HY000):无法通过套接字连接到本地MySQL服务器” - mySQL Docker “ERROR 2002 (HY000): Can't connect to local MySQL server through socket”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM