Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-network error "Cannot run peer because error when setting up MSP of type bcssp" #877

Open
JamesHHoustonII opened this issue Dec 1, 2022 · 5 comments

Comments

@JamesHHoustonII
Copy link

I have followed the test-network documentation this command in the Interacting With The Network section causes and error:

peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'

Error:
"Cannot run peer because error when setting up MSP of type bcssp"

@Zijun0819
Copy link

I have a similar problem to yours, did you solve this problem?

@Zijun0819
Copy link

Below is my problem

2023-03-3120:48:19.385 CST ERRO001 Cannot run peer because error when setting up MSP of type bccsp from directory /home/upc/fabric-samples/test-network/organizations/peerorganizations/org1.example.com/users/Admindorg1.example.com/msp:KeyMaterial not found in signingIdentityInfo

And I utilize this command line to solve above problem:

sudo chmod -R 777 ~/fabric-samples/

I think the mainly reason maybe is the permission of current user is not allowed to execute some commands

@Zijun0819
Copy link

When execute next command:

peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n fabcar --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"changeCarOwner","Args":["CAR9","Dave"]}'

Maybe you will also encounter a problem like this:

Error:error getting endorser client for invoke:unable to load TLS root cert file from /home/upc/fabric-samples/test-network/organizations/organizations/peerOrganizations/org1.example.com/peers/peero.org1.example.com/tls/ca.crt:open /home
/upc/fabric-samples/test-network/organizations/organizations/peerorganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:no such file or directory

I think the method to solve above problem is to bring up the fabric blockchain network with below command:

sudo ./network.sh up createChannel -ca

Rather than

sudo ././network.sh up createChannel

FYI, I'm using Fabric 2.1.1

@JamesHHoustonII
Copy link
Author

Sorry for the late response. Thanks for the reply I have put block chain down for now the tech is too spontaneous some days it works more often then not it doesn't for some weird reason.

@FawazMalik-jjj
Copy link

do
sudo chmod -R 777 where this MSP is located
make sure to have recursive access to the organizations and peer organizations and subdirectories in it

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

No branches or pull requests

3 participants