hyperledger-archives / fabric

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted
https://gerrit.hyperledger.org/
Apache License 2.0
1.17k stars 1.01k forks source link

ClientConn.resetTransport failed to create client transport: connection error #2402

Open iamsaurabhc opened 8 years ago

iamsaurabhc commented 8 years ago
2016-09-10

$peer node start --peer-chaincodedev is showing this Error . Please help

muralisrini commented 8 years ago

@iamsaurabhc I assume you have security: enabled: true in fabric/peer/core.yaml. In that mode, you need member service to be started. In another window try starting member service as

membersrvc

if that's not found

cd fabric/membersrvc
go build
./membersrvc

Then restart the peer.

By the way the instructions for running the system with security on should be in the documentation which you'd need for sending transactions once you get past this.

iamsaurabhc commented 8 years ago

@muralisrini Thanks for the quick reply. I actually did membersrvc already but it's not ending the execution. It is stuck at : TLSCA Started [Snap attached]. What to do now?

Well, yes I tweaked the security.enabled and security.privacy to be 'true' as instructed by the file : Chaincode-setup.md Should I change it back to 'false' ??

e2
muralisrini commented 8 years ago

That snapshot shows memberservice is started and running correctly.

If memberservice were running (as shown in the picture) at the time peer was started, I would not expect to see the connection errors seen in the log.

Using security is not necessary while learning and playing with the fabric. Its ok to set security:enabled:false during initial phases. You would not need memberservice to be started.

iamsaurabhc commented 8 years ago

@muralisrini Wow, yes that worked. Thanks again! :)

iamsaurabhc commented 8 years ago

@muralisrini Got another error while compiling the example02. The command is : $ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02 Do I need to configure my Peer address by any chance? Sorry I'm new to this.

e4
muralisrini commented 8 years ago

I believe you are mixing docs from a later release (such as the ongoing work on gerritt ) with the commands for this archives release. If you check fabric/peer/core.yaml, you'll see peer:address:0.0.0.0:30303.

netstat -an | grep LISTEN should show listening port as 30303.

Try CORE_PEER_ADDRESS=127.0.0.1:30303 please.

iamsaurabhc commented 8 years ago

I'm referring to the Online Article as it looks clearer. I wasn't aware that it isn't updated.

But even after setting CORE_PER_ADDRESS=127.0.0.30303 , I'm getting the same error. I tried the ports 2222 and 50051 too. What might be causing this ?

e5
muralisrini commented 8 years ago

I assume you are running the peer ? can you do ps -ef | grep peer and netstat -an | grep LISTEN

iamsaurabhc commented 8 years ago

Yeah sure.

e6

Hey, I think I got what was going wrong.. Not doing the peer node start --peer-chaincodedev in a separate bash before doing the ./chaincode_example02 Does the status look good now??

e7

Can you please guide me through the next step?

Should I insert the .json { "enrollId": "jim", "enrollSecret": "6avZQLwcUe9b" } directly?

muralisrini commented 8 years ago

Best to follow "Option 1" from https://github.com/hyperledger-archives/fabric/blob/master/docs/Setup/Chaincode-setup.md without security.

iamsaurabhc commented 8 years ago

I followed accordingly, and I changed the Security settings to 'false' I know I'm close, but when trying to Rest Request

POST localhost:30303/registrar
{
  "enrollId": "jim",
  "enrollSecret": "6avZQLwcUe9b"
}

or while Chainode Deploy , peer chaincode deploy -n mycc -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'

nothing is happening to the bash. Am I missing something?

e8
muralisrini commented 8 years ago

you have do the deploy from a new terminal (the doc says "Terminal 3 (CLI or REST API)") . The idea is that you are sending a "deploy" transaction (and similarly invoke and query in the doc) to the peer.

iamsaurabhc commented 8 years ago

Thanks, I did that. Getting the expected response. But I'm getting an update only while Query. The response is : Query Response : {"Name":"a","Amount":"80"}

But there is no Update while Invoke or Deploy. I'm using the CLI command: peer chaincode deply -n mycc -c '{Function:"init","Args":["a","100","b","200"]}'

e1

Also, If I want to use REST API, what should be my command or Step?? If I insert directly in vagrant, I'm getting this :

e2

What is the content referred to?