fabric-node-sdk 1.2 可以与 Fabric 1.1 网络一起使用吗?
Can fabric-node-sdk 1.2 be used with a Fabric 1.1 network?
当我尝试在 Fabric 1.1 上创建通道时出现以下错误。是否有将 1.2 SDK 用于 Fabric 1.1 网络的解决方法?
[2018-08-01 11:48:41.498] [DEBUG] Helper - [NetworkConfig101.js]: _addPeersToChannel - peer1.org2.example.com - grpcs://x.x.x.x:8056
[2018-08-01 11:48:41.498] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com
[2018-08-01 11:48:41.504] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature {
r: <BN: 18641b0400ca8526210ae69af03db05877e3e6a1109bcbae94b716259a973b11>,
s: <BN: 6c4d65ef6d4088975f2d145b93c1420d5e15866da96733b213e3d699f0c9e2a9>,
recoveryParam: 1 }
[2018-08-01 11:48:41.569] [ERROR] Create-Channel - Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2241 vs. 15)
at createStatusError (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:64:15)
at ClientDuplexStream._emitStatusIfDone (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:270:19)
at ClientDuplexStream._readsDone (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:236:8)
at readCallback (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:296:12)
(node:1552) UnhandledPromiseRejectionWarning: Error: Failed to initialize the channel: Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2241 vs. 15)
at Object.createChannel (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\sdk-util\create-channel.js:66:9)
at <anonymous>
(node:1552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1552) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
只需从网络-config.yaml 文件中删除以下行。此文件用于加载连接配置。
grpc-max-send-message-length: 15
sdk-node 从 1.1 到 1.2 的最关键部分是删除旧的 eventHub 库并迁移为使用 channelEventHub。
它看起来是一个重大变化,因为:
ChannelEventHub
绑定到通道和对等点,它使用端口 7051,而不是
端口 7053 不再
连接机制有一些小的变化,建议在注册监听器之前显式调用channelEventHub.connect()
。
当我尝试在 Fabric 1.1 上创建通道时出现以下错误。是否有将 1.2 SDK 用于 Fabric 1.1 网络的解决方法?
[2018-08-01 11:48:41.498] [DEBUG] Helper - [NetworkConfig101.js]: _addPeersToChannel - peer1.org2.example.com - grpcs://x.x.x.x:8056
[2018-08-01 11:48:41.498] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com
[2018-08-01 11:48:41.504] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature {
r: <BN: 18641b0400ca8526210ae69af03db05877e3e6a1109bcbae94b716259a973b11>,
s: <BN: 6c4d65ef6d4088975f2d145b93c1420d5e15866da96733b213e3d699f0c9e2a9>,
recoveryParam: 1 }
[2018-08-01 11:48:41.569] [ERROR] Create-Channel - Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2241 vs. 15)
at createStatusError (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:64:15)
at ClientDuplexStream._emitStatusIfDone (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:270:19)
at ClientDuplexStream._readsDone (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:236:8)
at readCallback (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\node_modules\fabric-client\node_modules\grpc\src\client.js:296:12)
(node:1552) UnhandledPromiseRejectionWarning: Error: Failed to initialize the channel: Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2241 vs. 15)
at Object.createChannel (D:\dev\hyperledger\fabric-samples-sdk\fabric-sdk-util\sdk-util\create-channel.js:66:9)
at <anonymous>
(node:1552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1552) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
只需从网络-config.yaml 文件中删除以下行。此文件用于加载连接配置。
grpc-max-send-message-length: 15
sdk-node 从 1.1 到 1.2 的最关键部分是删除旧的 eventHub 库并迁移为使用 channelEventHub。
它看起来是一个重大变化,因为:
ChannelEventHub
绑定到通道和对等点,它使用端口 7051,而不是 端口 7053 不再连接机制有一些小的变化,建议在注册监听器之前显式调用
channelEventHub.connect()
。