2021年3月7日星期日

Failed to connect before the deadline on Endorser

connection-profile.yaml

{      "name": "network",      "version": "1.0.0",      "client": {          "organization": "Freight",          "connection": {              "timeout": {                  "peer": {                      "endorser": "300"                  }              }          }      },      "organizations": {          "Freight": {              "mspid": "FreightMSP",              "peers": [                  "peer0.freight.example.com",                  "peer1.freight.example.com"              ],              "certificateAuthorities": [                  "ca.freight.example.com"              ]          }      },      "peers": {          "peer0.freight.example.com":{              "url": "grpcs://peer0.freight.example.com:9051",              "grpcOption": {                  "ssl-target-name-override": "peer0.freight.example.com",                  "hostnameOverride": "peer0.freight.example.com"              },              "tlsCACerts": {                  "path": "../../network/organizations/peerOrganizations/freight.example.com/tlsca/tlsca.freight.example.com-cert.pem"              }          },          "peer1.freight.example.com":{              "url": "grpcs://peer1.freight.example.com:10051",              "grpcOption": {                  "ssl-target-name-override": "peer1.freight.example.com",                  "hostnameOverride": "peer1.freight.example.com"              },              "tlsCACerts": {                  "path": "../../network/organizations/peerOrganizations/freight.example.com/tlsca/tlsca.freight.example.com-cert.pem"              }          }      },      "certificateAuthorities": {          "ca.freight.example.com": {              "url": "https://ca.freight.example.com:9054",              "caName": "ca.freight.example.com",              "httpOptions": {                  "verify": false              },              "tlsCACerts": {                  "path": "../../network/organizations/peerOrganizations/freight.example.com/ca/ca.freight.example.com-cert.pem"              }          }      }  }  

Discovery Service:

discovery: {           enabled: true,           asLocalhost: false       }   

asLocalhost is false because all orgs are hosted on different hosts and are in docker swarm network. But i get this error when call the add asset invoke function.

    Wallet Path: /home/hlfabric/fabric/api/freight/wallet  2021-03-06T17:58:15.407Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer0.freight.example.com, url:grpcs://peer0.freight.example.com:9051, connected:false, connectAttempted:true  2021-03-06T17:58:15.408Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.freight.example.com url:grpcs://peer0.freight.example.com:9051 timeout:3000  2021-03-06T17:58:15.409Z - info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer0.freight.example.com due to Error: Failed to connect before the deadline on Endorser- name: peer0.freight.example.com, url:grpcs://peer0.freight.example.com:9051, connected:false, connectAttempted:true  2021-03-06T17:58:18.412Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer1.freight.example.com, url:grpcs://peer1.freight.example.com:10051, connected:false, connectAttempted:true  2021-03-06T17:58:18.412Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.freight.example.com url:grpcs://peer1.freight.example.com:10051 timeout:3000  2021-03-06T17:58:18.412Z - info: [NetworkConfig]: buildPeer - Unable to connect to the endorser peer1.freight.example.com due to Error: Failed to connect before the deadline on Endorser- name: peer1.freight.example.com, url:grpcs://peer1.freight.example.com:10051, connected:false, connectAttempted:true  2021-03-06T17:58:21.423Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Discoverer- name: peer0.freight.example.com, url:grpcs://peer0.freight.example.com:9051, connected:false, connectAttempted:true  2021-03-06T17:58:21.423Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer0.freight.example.com url:grpcs://peer0.freight.example.com:9051 timeout:3000  2021-03-06T17:58:21.423Z - error: [ServiceEndpoint]: ServiceEndpoint grpcs://peer0.freight.example.com:9051 reset connection failed :: Error: Failed to connect before the deadline on Discoverer- name: peer0.freight.example.com, url:grpcs://peer0.freight.example.com:9051, connected:false, connectAttempted:true  2021-03-06T17:58:24.425Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Discoverer- name: peer1.freight.example.com, url:grpcs://peer1.freight.example.com:10051, connected:false, connectAttempted:true  2021-03-06T17:58:24.425Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server peer1.freight.example.com url:grpcs://peer1.freight.example.com:10051 timeout:3000  2021-03-06T17:58:24.425Z - error: [ServiceEndpoint]: ServiceEndpoint grpcs://peer1.freight.example.com:10051 reset connection failed :: Error: Failed to connect before the deadline on Discoverer- name: peer1.freight.example.com, url:grpcs://peer1.freight.example.com:10051, connected:false, connectAttempted:true  2021-03-06T17:58:24.425Z - error: [DiscoveryService]: send[supplychain-channel] - no discovery results  Failed to evaluate transaction: function () { [native code] }  

The network topology is 5 orgs with 2 orgs with 1 peer without orderer and 3 orgs with 2 peers each with orderer. Orderers are the part of peerOrganization itself. And each organization has its own CA. What can be the cause of this error?

https://stackoverflow.com/questions/66524164/failed-to-connect-before-the-deadline-on-endorser March 08, 2021 at 12:06PM

没有评论:

发表评论