Open iamsaurabhc opened 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.
@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' ??
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.
@muralisrini Wow, yes that worked. Thanks again! :)
@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.
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.
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 ?
I assume you are running the peer ? can you do ps -ef | grep peer
and netstat -an | grep LISTEN
Yeah sure.
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??
Can you please guide me through the next step?
Should I insert the .json
{ "enrollId": "jim", "enrollSecret": "6avZQLwcUe9b" }
directly?
Best to follow "Option 1" from https://github.com/hyperledger-archives/fabric/blob/master/docs/Setup/Chaincode-setup.md without security.
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?
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.
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"]}'
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 :
What is the content referred to?
$peer node start --peer-chaincodedev
is showing this Error . Please help