IBM-Blockchain-Archive / car-lease-demo

A demonstration using IBM Blockchain to show how the lifecycle of vehicles can be recorded on a blockchain
Other
170 stars 304 forks source link

transport: http2Server.HandleStreams failed to receive the preface from client: EOF #83

Open bellaj opened 7 years ago

bellaj commented 7 years ago

after running the containers (membersrvc and vp0) i've got the following error :

transport: http2Server.HandleStreams failed to receive the preface from client: EOF

in the membersrvc. what is the problem behind?

alexjipark commented 7 years ago

same problem here...

Have you figured out what's wrong with that?

pytpriscila commented 7 years ago

same problem... : (

likepunk commented 7 years ago

I got the same issue. I am running both fabric and node app on a local machine(SLES12 on s390x).

Any help?

Thank you!

yanyanhu commented 7 years ago

Met the same issue... Any suggestion for it? Thanks!

liam-grace commented 7 years ago

What environments are you running in when you see this error?

yanyanhu commented 7 years ago

I'm running this demo in a Softlayer machine. The os is ubuntu16.04 and kernel version is 4.4.0-45-generic. I just followed the guide of local deployment and executed the "Scripts/start.sh".

Looks like all three docker instances are created. However, the "carleasedemo_membersrvc" docker instance gave this error in its log.

liam-grace commented 7 years ago

Did you change the protocols in https://github.com/IBM-Blockchain/car-lease-demo/blob/master/Server_Side/configurations/configuration.js#L12 ?

yanyanhu commented 7 years ago

@14gracel, yes, I changed them to "http" and "grpc".

liam-grace commented 7 years ago

Interesting, do you have a copy of the peer logs?

yanyanhu commented 7 years ago

I have cleaned those docker instances. But I think I can reproduce it. Will post the log in minutes :) BTW, do you need the log of "carleasedemo_membersrvc" and "carleasedemo_car-lease-demo" as well or only vp0's is enough?

liam-grace commented 7 years ago

vp0 and membersrvc should be okay

yanyanhu commented 7 years ago

This is the vp0's http://paste.openstack.org/show/603093/ and this is the membersrvc's http://paste.openstack.org/show/603094/

yanyanhu commented 7 years ago

Sorry, the vp0 log I posted was truncated. The following is the complete one. vp0-log.txt

liam-grace commented 7 years ago

There is nothing strange in the logs. I am seeing the same transport: http2Server.HandleStreams failed to receive the preface from client: EOF, however the demo is starting and working as normal. Are you seeing the same behavior?

yanyanhu commented 7 years ago

@14gracel no... I found the following error in the log of "demo" docker instance:

Wait for the Hyperledger Fabric to start. while ! nc -q 1 membersrvc 7054 </dev/null; do sleep 1; done while ! nc -q 1 vp0 7050 </dev/null; do sleep 1; done vp0 [172.18.0.3] 7050 (?) : Connection refused vp0 [172.18.0.3] 7050 (?) : Connection refused vp0 [172.18.0.3] 7050 (?) : Connection refused

The 172.18.0.3 is the IP of VP0 instance. I noticed that the 7051 and 7053 ports of VP0 are reachable. However, 7050 and 7050 are inaccessible. Running "netsta" inside VP0 gave the following output:

root@d005a5183c55:/# netstat -ntpl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.11:40326 0.0.0.0: LISTEN -
tcp6 0 0 :::7051 :::
LISTEN 6/peer
tcp6 0 0 :::7053 :::* LISTEN 6/peer

liam-grace commented 7 years ago

That sounds like a docker configuration issue to me, that docker-compose.yaml file is asking docker to open 7050

yanyanhu commented 7 years ago

Yes, and I noticed the following port mapping defined in docker-compose.yaml. But I guess there should be a process listen to 7050 port inside VP0 docker instance and ack the "nc -q 1 vp0 7050" from demo instance?

ports:
  - "7050:7050"
  - "7051:7051"
  - "7052:7052"
  - "7053:7053"
liam-grace commented 7 years ago

The peer's REST API 7050 listens to port 7050, so we chose to wait for that to open before starting the demo

yanyanhu commented 7 years ago

Yes, understand. Just I didn't find any process listening to 7050 inside VP0... Is there any way I can verify the peer's REST API works as expected? Thanks!

liam-grace commented 7 years ago

If you try localhost:7050/chain, it should give you the current block height and a hash of the current and previous block height

yanyanhu commented 7 years ago

Looks like the REST API server is not running... Will debug it. Thank you so much for the help! @14gracel

yanyanhu commented 7 years ago

Seems the "hyperledger/fabric-peer" image I used is out of date. Updating to latest one resolved the problem.

@14gracel Just as you said, although transport: http2Server.HandleStreams failed to receive the preface from client: EOF error message was raised by membersrvc docker instance, the demo works correctly. Thanks!