In fact, I built the fabric environment in August, but recently I want to build it again under Ubuntu for various reasons. Everything was going well until go run assettransfer.go
Occurrence
Execute the following instructions in sequence:
1 ./network.sh up createChannel 2 ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go 3 docker ps //Can be ignored, mainly to view the current container 4 cd .. 5 cd asset-transfer-basic/application-go 6 go run assetTransfer.go
The following message will appear:
2021/11/26 09:12:03 ============ application-golang starts ============ [fabsdk/core] 2021/11/26 01:12:03 UTC - cryptosuite.GetDefault -> INFO No default cryptosuite found, using default SW implementation 2021/11/26 09:12:13 Failed to get network: Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: QueryBlockConfig failed: queryChaincode failed: Transaction processing for endorser [localhost:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [localhost:7051]: waiting for connection failed: context deadline exceeded exit status 1
Solution:
Open the application go folder, delete the keystore and wallet folders under the folder, and then re execute go run assettransfer.go.
After re execution, the results are as follows.
You can see that the problem has been solved!
Cause of occurrence
The reason for this problem may be that I ran once before and he generated these two folders. Just delete these two folders.
reminder
In the assettransfer.go code given by fabric, the file name of a place is wrong and needs to be manually changed, otherwise an error will be reported. The place to change is in line 130 of the code. After modification, as shown in the figure.
certPath := filepath.Join(credPath, "signcerts", "[email protected]")
Of course, you can also run again, find the corresponding file name under the error folder, and then change it.
Finally, I would like to thank the author of “fabric appears when trying to use application call: Unknown: access denied: Channel [mychannel] creator org [org1msp]” for enabling me to solve this problem early in the morning.
Similar Posts:
- Idea Maven dependencies is marked with red and an error is reported
- [Solved] Nginx 502Bad Gateway: some static resources cannot be accessed
- SVN Commit Error: is scheduled for addition, but is missing
- ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports/f7eaf0bb-fb46-4a18-ab13-5dca89e7ec51.json
- [Soloved] Gradle sync failed: Failed to open zip file
- This network connection does not exist
- ORA-12537 Senator-12560 Senator-0530 ora-603593599;209157;
- Centos7 Restart NIC error: Job for network.service failed because the control process exited with error code
- cleartext http traffic to 192.168.1.106 not permitted
- CentOS7 Failed to start LSB: Bring up/down [How to Solve]