Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

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

Open
iamsaurabhc opened this issue Sep 10, 2016 · 13 comments

Comments

@iamsaurabhc
Copy link

2016-09-10

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

@muralisrini
Copy link
Contributor

muralisrini commented Sep 10, 2016

@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
Copy link
Author

iamsaurabhc commented Sep 10, 2016

@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
Copy link
Contributor

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
Copy link
Author

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

@iamsaurabhc
Copy link
Author

@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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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

@iamsaurabhc
Copy link
Author

iamsaurabhc commented Sep 10, 2016

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
Copy link
Contributor

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

@iamsaurabhc
Copy link
Author

iamsaurabhc commented Sep 10, 2016

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
Copy link
Contributor

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
Copy link
Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants