简体   繁体   English

Fabric-Ca服务器设置问题

[英]Fabric-Ca server setup issue

I am using the given link for exploring the fabric-ca http://fabric-ca.readthedocs.io/en/latest/users-guide.html 我正在使用给定的链接来探索fabric-ca http://fabric-ca.readthedocs.io/en/latest/users-guide.html

Following the content in the link, I am trying to setup fabric-ca-server with mysql as DB and I am specifying the below config for the same in the fabric-ca-server-config.yaml 按照链接中的内容,我尝试使用mysql作为DB设置fabric-ca-server,并在fabric-ca-server-config.yaml中指定相同的以下配置

db:
  type: mysql
  datasource: root:**123#@tcp(localhost:3306)/fabric_ca?parseTime=true
  tls:
      enabled: false
      certfiles:
        - db-server-cert.pem
      client:
        certfile: db-client-cert.pem
        keyfile: db-client-key.pem

I do not pass the argument tls=custom in 'datasource' above as I am not using the TLS 我没有在上面的“数据源”中传递参数tls = custom,因为我没有使用TLS

Upon server startup I get 服务器启动后,我得到

root@Openwhisk-Node2-172:~/fabric-ca/fabric-ca-server# fabric-ca-server start -b admin:adminpw
2017/09/05 15:25:17 [INFO] Configuration file location: /root/fabric-ca/fabric-ca-server/fabric-ca-server-config.yaml
2017/09/05 15:25:17 [INFO] Starting server in home directory: /root/fabric-ca/fabric-ca-server
2017/09/05 15:25:17 [INFO] The CA key and certificate already exist
2017/09/05 15:25:17 [INFO] The key is stored by BCCSP provider 'SW'
2017/09/05 15:25:17 [INFO] The certificate is at: /root/fabric-ca/fabric-ca-server/ca-cert.pem
2017/09/05 15:25:17 [INFO] Initialized mysql database at root:Nokia123#@tcp(localhost:3306)/fabric_ca?parseTime=true
2017/09/05 15:25:17 [INFO] Home directory for default CA: /root/fabric-ca/fabric-ca-server
2017/09/05 15:25:17 [INFO] Listening on %!s(int=7054)%!(EXTRA string=http://0.0.0.0:7054)

but when I try to use the client for enroll bootstrap identity, I get 但是当我尝试使用客户端注册引导程序身份时,我得到

fabric-ca-client enroll -u http://admin:adminpw@localhost:7054
2017/09/05 15:27:40 [INFO] User provided config file: /root/fabric-ca/fabric-ca-client1/admin/fabric-ca-client-config.yaml
2017/09/05 15:27:40 [INFO] Created a default configuration file at /root/fabric-ca/fabric-ca-client1/admin/fabric-ca-client-config.yaml
2017/09/05 15:27:40 [INFO] generating key: &{A:ecdsa S:256}
2017/09/05 15:27:40 [INFO] encoded CSR
Error: Error response from server was: Authorization failure

The database is up. 数据库已启动。 I have also created a database with name fabric_ca NO_ZERO_DATE related changes are also done 我还创建了一个名称为fabric_ca NO_ZERO_DATE的数据库,相关更改也已完成

Kindly help. 请帮助。 let me know if some steps I have missed or if I have done something wrong 让我知道是否错过了某些步骤或做错了什么

If you actually created the database prior to running the fabric-ca-server that's likely the issue. 如果您实际上是在运行fabric-ca-server之前创建数据库的,则可能是问题所在。 The code currently just checks to see if the database exists. 该代码当前仅检查数据库是否存在。 If it exists, then it does not run any of the SQL setup scripts. 如果存在,则它不会运行任何SQL安装脚本。 So the best best is to just start with a clean MYSQL which does not have any database instance created. 因此,最好的办法是从一个没有创建任何数据库实例的干净的MYSQL开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM