Open dklesev opened 7 years ago
This usually indicates a vendoring issue. Funny that I'm not seeing these errors. Can you try re-vendoring, i.e. delete vendor/ and run: $ govendor init && govendor add +external
[lab@localhost fabric-cli]$ go run fabric-cli.go query info --cid mychannel [fabriccli] 2018/01/10 06:06:46 UTC - query.glob..func4 -> ERRO Error while running queryInfoAction: Error getting admin channel client: NewUser returned error: Enroll failed: enrollmentSecret required
How to address this error? Thanks for you help!
This error means that a password is required for the user (you can provide the password with --pw). If you don't specify a user (with --user) then the CLI assumes "User1", which is a pre-enrolled user in the sample fixtures (./fixtures). If you're not starting fabric using the sample fixtures then you'll need to provide a user/password that's valid for your fabric instance.
If you're running fabric from ./fixtures then the following sequence of commands should work:
(1) Start fabric: $ cd ./fixtures $ docker-compose up --force-recreate (2) Create channel (mychannel): $ go run fabric-cli.go channel create (3) Join peers to channel: $ go run fabric-cli.go channel join --user admin (4) go run fabric-cli.go query info
[lab@localhost fabric-cli]$ go run fabric-cli.go query info --cid judes-supply-chain --peer grpc://peer0.judes.com:7051,grpc://peer1.judes.com:7051 [fabriccli] 2018/01/24 08:06:59 UTC - query.glob..func4 -> ERRO Error while initializing queryInfoAction: NewPeer return error: open /home/lab/go_projects/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fixtures/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem: no such file or directory
[lab@localhost fabric-cli]$ go run fabric-cli.go query channels --peer grpc://peer0.dauto.com:7051 --user username --pw password --orgid DetroitAuto [fabriccli] 2018/01/24 09:29:20 UTC - query.glob..func2 -> ERRO Error while initializing queryChannelsAction: Error getting MSP ID for org [DetroitAuto]: MSP ID is empty for org: DetroitAuto
It can not find the corresponding MSP ID when I specified --orgid parameter.
I'm receiving this here: