Composer 业务网络连接不适用于 NodeJS 应用程序
Composer Business Network Connection not working with NodeJS App
我正在尝试将我的 IBM Bluemix NodeJS 应用程序与 composer-client@0.13.2 连接到 运行 Composer Business Network 与 runtime@0.13.2。但是,我收到以下错误:
2017-10-29T01:55:26.36-0400 [APP/PROC/WEB/0] ERR (node:60) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "ibm-bc-org1".
/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header
我在我的项目目录下手动创建了.composer-credentials/ibm-bc-org1/connection.json
文件和.composer-credentials/ibm-bc-org1
目录用于密钥存储。此设置在本地工作,我可以看到我的连接结果,我可以在我的本地机器上获取事件等。有谁知道这种事情的程序是什么?
该错误意味着您以某种方式将 grpc 二进制文件(它是 composer 的依赖项)从您的机器上传到 bluemix,并且该二进制文件与它尝试 运行 的位置不兼容。
您需要确保仅将您的应用程序推送到 bluemix(不要向上推送 node_modules 目录)并让它执行 npm install 以针对特定平台下载正确的依赖项和二进制文件(或编译二进制文件)它将 运行 开启。
我正在尝试将我的 IBM Bluemix NodeJS 应用程序与 composer-client@0.13.2 连接到 运行 Composer Business Network 与 runtime@0.13.2。但是,我收到以下错误:
2017-10-29T01:55:26.36-0400 [APP/PROC/WEB/0] ERR (node:60) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "ibm-bc-org1".
/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header-/home/vcap/app/node_modules/fabric-
client/node_modules/grpc/src/node/extension_binary/grpc_node.node:
invalid ELF header
我在我的项目目录下手动创建了.composer-credentials/ibm-bc-org1/connection.json
文件和.composer-credentials/ibm-bc-org1
目录用于密钥存储。此设置在本地工作,我可以看到我的连接结果,我可以在我的本地机器上获取事件等。有谁知道这种事情的程序是什么?
该错误意味着您以某种方式将 grpc 二进制文件(它是 composer 的依赖项)从您的机器上传到 bluemix,并且该二进制文件与它尝试 运行 的位置不兼容。 您需要确保仅将您的应用程序推送到 bluemix(不要向上推送 node_modules 目录)并让它执行 npm install 以针对特定平台下载正确的依赖项和二进制文件(或编译二进制文件)它将 运行 开启。