当链码容器保持空闲一段时间时,它会因错误而停止:
ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: EOF\n at createStatusError (/usr/local/src/node_modules/grpc/src/client.js:64:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:270:19)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:248:8)\n at /usr/local/src/node_modules/grpc/src/client.js:804:12"
当第一个请求在空闲时间之后出现时,它会给出一个错误
Error: 14 UNAVAILABLE: TCP Write failed
之后,第二个请求错误更改为以下内容:
Error: SERVICE_UNAVAILABLE
at ClientDuplexStream.broadcast.on (/app/node_modules/fabric-client/lib/Orderer.js:172:22)
at emitOne (events.js:116:13)
at ClientDuplexStream.emit (events.js:211:7)
at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:236:12)
at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8)
at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15)
at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8)
at /app/node_modules/grpc/src/client_interceptors.js:1110:18
从第三次请求开始,一切正常。
我使用的是fabric-shim 1.2.0,但升级到1.3.0后,错误随机出现。
我正在使用织物 1.3.0。
编辑:将fabric shim升级到1.3.1后,错误变为以下:
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: TCP Write failed\n at Object.exports.createStatusError (/app/node_modules/grpc/src/common.js:87:15)\n at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:235:26)\n at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8)\n at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15)\n at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42)\n at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8)\n at /app/node_modules/grpc/src/client_interceptors.js:1110:18"
Error: SERVICE_UNAVAILABLE
at ClientDuplexStream.broadcast.on (/app/node_modules/fabric-client/lib/Orderer.js:172:22)
at emitOne (events.js:116:13)
at ClientDuplexStream.emit (events.js:211:7)
at ClientDuplexStream._emitStatusIfDone (/app/node_modules/grpc/src/client.js:236:12)
at ClientDuplexStream._receiveStatus (/app/node_modules/grpc/src/client.js:213:8)
at Object.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:1290:15)
at InterceptingListener._callNext (/app/node_modules/grpc/src/client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (/app/node_modules/grpc/src/client_interceptors.js:614:8)
at /app/node_modules/grpc/src/client_interceptors.js:1110:18