1

我正在使用带有 Debian 映像的 beaglebone-black armv7 作为 HLF nodejs 客户端应用程序。该应用程序使用fabric-client、fabric-ca-client、fabric-network节点模块,并构建为客户端调用的rest API(使用curl进行测试),然后该API作为通往HLF网络的网关,这要归功于连接配置文件配置。

问题是完全相同的应用程序(具有完全相同的连接配置文件)在我的 Ubuntu 机器上运行良好(它与部署在 AWS 实例中的网络通信)但是,当使用 Debian 在 armv7 上工作时,客户端即使它设法成功注册(来自 CA 容器的 docker 日志确认)在调用或查询链码时无法与对等方通信"Error: Failed to connect before the deadline".

我不明白为什么我会收到此错误,这可能取决于我的 Ubuntu 机器和我的嵌入式 Debian 设备之间的差异,或者也由于我不知道的设置或配置。

显然,Debian 的节点模块已正确编译,因为我从 package.json 开始在 Debian 设备本身上使用了 npm install。

在我收到的错误下方。

客户端:

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 端:

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"]
4

0 回答 0