yeasy/docker-compose-files

How can I enable REST api service in hyperledger fabric 1.0 preview environment?

allegewhd opened this issue · 15 comments

Hi, yeasy, thanks for the great job of this project.I followed hyperledger/1.0/README.md, and run go/chaincode_example02 by peer command successfully. But when I tried to access some REST api endpoint, orderer service always refused those http connection immediately.

transport: http2Server.HandleStreams received bogus greeting from client: .....

I am wondering how can share fabric-ca enroll session with peer proccess, sounds like fabric-ca server listenning port 8888, but peer server proccess do not communicate with this port. Is the reason that v1.0 is still on developing, integration part is not implemented yet?

yeasy commented

hi, in fabric peers, the rest api will be deprecated, and only support grpc connection.
for fabric-ca, the port 8888 is actually from the cfssl. Recently the grpc port is updated to 7054.

from my website i want to invoke,deploy or query. In my case if rest call doesnt work how can I communicate with chain code ? any example will be appreciated.

Thanks yeasy, I'll try some SDK samples. But still wondering how to integrate fabric-ca with orderer and peer process just like member service in v0.6. Hope that hyperledger_code_fabric project will be helpful:)

Thanks a lot. The upper link works perfectly in CLI mode. I followed all the instruction but when I call "node deploy.js" command it returns error from hackfest/node_modules/elliptic/lib/elliptic/ec/index.js file line 94:key = this.keyProfomPrivate(key,enc) returns null . May be this is because of certificate related error. What could be the reason....

yeasy commented

suggest u post the problem to the node sdk channel.

chat.hyperledger.org

Yes I will try to find solution from there. Thanks

Hi Yeasy,
Did you got any solution regarding the REST API .

yeasy commented

No, in 1.0, we do not support rest api feature.

Thanks Year.
Is there any other alternate API to communicate with peer from web application

yeasy commented

The sdk is the only way.

See https://wiki.hyperledger.org/projects/cello, which can work with sdk-py together.

Should we use only py or can we use other SDKs from go, java, node.

yeasy commented

@kmohanar certainly depends on the application language.

Is there any technical document/steps which explain how to make cello and sdk-py together to interact with the yeasy docker images. If so, Please share with us.

If there is any other SDKs support to interact with fabric also fine.

When i test a gateway for baas platform ,it gives me a error message that :'no channel peers configured for channel'