1

I am using a beaglebone-black armv7 with a Debian image as an HLF nodejs client application. The application uses fabric-client, fabric-ca-client, fabric-network node modules and is built as a rest API called by the client (using curl for testing), then the API works as a gateway to the HLF Network thanks to a connection-profile configuration.

The problem is that the exact same application (with the exact same connection-profile) works fine in my Ubuntu machine (it communicates with a network deployed in an AWS instance) BUT, when working on the armv7 with Debian, the client EVEN if it manages to successfully enroll (docker logs from the CA container confirm that) is not able to communicate with peers when invoking or querying the chaincode "Error: Failed to connect before the deadline".

I do not understand why I am getting this error that could depend on the difference between my Ubuntu machine and my embedded Debian device or also due to settings or configuration that I am not aware of.

Clearly the node-module for the Debian is correctly compiled since I used npm install on the Debian device itself starting from the package.json.

Below the errors that I am receiving.

CLIENT SIDE:

curl http://localhost:3000/myBalance/ArmClient
{"error":{"message":"No peers available to query. Errors: [\"Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051\",\"Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051\"]","stack":"FabricError: No peers available to query. Errors: [\"Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051\",\"Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051\"]\n    at SingleQueryHandler.evaluate (/home/debian/Arm/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:44:17)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:189:7)","name":"FabricError"}}

API SIDE:

2019-11-01T16:03:38.658Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051
2019-11-01T16:03:38.661Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer1.org1.example.com:8051" failed: message=Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051, stack=Error: Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051
    at checkState (/home/debian/Arm/node_modules/grpc/src/client.js:835:16), connectFailed=true
2019-11-01T16:03:41.719Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051
2019-11-01T16:03:41.721Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer0.org1.example.com:7051" failed: message=Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051, stack=Error: Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051
    at checkState (/home/debian/Arm/node_modules/grpc/src/client.js:835:16), connectFailed=true
2019-11-01T16:03:41.724Z - error: [SingleQueryHandler]: evaluate: message=No peers available to query. Errors: ["Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051","Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051"], stack=FabricError: No peers available to query. Errors: ["Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051","Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051"]
    at SingleQueryHandler.evaluate (/home/debian/Arm/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:44:17)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7), name=FabricError
Failed to evaluate transaction: FabricError: No peers available to query. Errors: ["Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051","Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051"]
Community
  • 1
  • 1

0 Answers0