[Solved] Hyperledger Fabric Execute assetTransfer.go Error: UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]

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


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


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.


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: