简体   繁体   中英

Hyperledger Fabric + NodeJS app - Query but no Invoke

Here's an interesting situation...

I've deployed a Fabric network over two machines and I'm able to query and invoke transactions through cli.

I'm also using a NodeJS app with which I can query the network but can't invoke any transaction.

This error appears whenever I invoke from the NodeJS app:

"Failed to connect before the deadline". 

The logs from the node app:

[Remote.js]: Error: Failed to connect before the deadline
error: [Orderer.js]: Orderer grpcs://orderer.test.com:7050 has an error Error: Failed to connect before the deadline 

This is the template NodeJS app I'm using: https://github.com/olegabu/fabric-starter-rest

Any ideea what's wrong?

So your SDK is running inside a container ? Have you try to curl the orderer inside the SDK container ?

If it's not working maybe you can add host of your orderer when you run the container (or inside the dockerfile)

--add-host=orderer.test.com:${orderer-ip}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM