问题
we get this error whenever we try to run fabric-ca-client
. Example below:
# fabric-ca-client register --url https://ica-org:7054 --id.name user-org --id.affiliation=org
2019/03/19 20:18:07 [INFO] Configuration file location: /home/fabric-ca-client-config.yaml
2019/03/19 20:18:07 [INFO] TLS Enabled
2019/03/19 20:18:07 [ERROR] Enrollment check failed: Idemix enrollment information does not exist
Error: Enrollment information does not exist. Please execute enroll command first. Example: fabric-ca-client enroll -u http://user:userpw@serverAddr:serverPort
How can we fix this?
回答1:
This happens when fabric-ca-client
cannot find any X509 or Idemix identity. fabric-ca-client
needs to be initialized with an identity (except when its being used to enroll
a user). It first tries to load an X509 identity from the mspdir
location specified in the fabric-ca-client-config.yaml
file or the -M
command line argument which takes precedence over mspdir
in config file. And if its not able to find X509 identity it will look for an idemix identity. If this fails as well it displays the error in question.
For X509 identity:
- its public cert needs to be in
signcerts
- and private key needs to be in
keystore
- and the public cert of the authority who issued the public/private keypair needs to be in
cacerts
folder (if an intermediate ca was used then its cert needs to be inintermediatecerts
)
all the folders above are under the mspdir
回答2:
Since you use TLS, you should be using the --tls.certfiles
flag or set the FABRIC_CA_CLIENT_TLS_CERTFILES
environment variable when using the fabric-ca-client
command. This should hold the full path to your organisation's TLS certificate.
来源:https://stackoverflow.com/questions/55249365/hyperledger-fabric-enrollment-check-failed-idemix-enrollment-information-does