我们在尝试启动同级时会看到此错误,并且想知道如何解决?
2019-03-21 00:17:33.657 UTC [main] InitCmd -> ERRO 001 Cannot run peer because error when setting up MSP of type bccsp from directory /home/mydir: the supplied identity is not valid: x509: certificate signed by unknown authority
答案 0 :(得分:0)
要解决此错误,请验证msp目录中是否包含文件夹cacerts
,其中包含在signcerts
和admincerts
文件夹下用于获取证书的授权证书。如果使用的是中间CA,则在msp目录下还应该有一个intermediatecerts
文件夹。正确设置msp的示例:
root@1741bbd6e1ee:/home# tree peer05-jnj
peer05-jnj
|-- admincerts
| `-- cert.pem
|-- cacerts
| `-- ica-jnj-7054.pem
|-- intermediatecerts
| `-- ica-jnj-7054.pem
|-- keystore
| `-- 75446a991f94558a0821a8cf8258746171359580f907bae88aa5f937e197bbc5_sk
|-- signcerts
| `-- cert.pem
|-- tlscacerts
| `-- tls-ica-jnj-7054.pem
|-- tlsintermediatecerts
| `-- tls-ica-jnj-7054.pem
`-- user
启动对等体时,admincerts
是必需的。如果没有admincert,则会出现以下错误:
2019-03-21 18:00:10.985 UTC [main] InitCmd -> ERRO 001 Cannot run peer because error when setting up MSP of type bccsp from directory /home/peer03-jnj: could not load a valid admin certificate from directory /home/peer03-jnj/admincerts: stat /home/peer03-jnj/admincerts: no such file or directory