2017-09-15 81 views
0

我也跟着下面的鏈接安裝面料:未能初始化Hyperledger面料CA, 「無法取得用戶」

https://www.mlgblockchain.com/setup-hyperledger-client.html

但得到一個錯誤

服務器端

[email protected]:/home/amit# fabric-ca-server init -b 「admin:adminpw」 
2017/09/15 10:40:20 [INFO] Home directory for default CA: /opt/Fabric-CA/server 
2017/09/15 10:40:20 [INFO] Listening on http://0.0.0.0:7054 
2017/09/15 10:41:07 [INFO] 127.0.0.1:59210 POST /enroll 401 23 "Failed to get user: User not found 

兩者都在同一臺服務器上運行。

+0

你可以在調試模式下運行服務器:fabric-ca-server start -d -b「admin:adminpw」? –

+0

/root/Documents/Blockchain/src/github.com/hyperledger/fabric-ca/lib/serverendpoint.go:44 net/http。(* ServeMux).ServeHTTP/usr/local/go/src/net/http /server.go:2238 net/http.serverHandler.ServeHTTP /usr/local/go/src/net/http/server.go:2568 net/http。(* conn).serve /usr/local/go/src/net/http/server.go:1825 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:2197 2017/09/19 09:53:41 [INFO] 127.0。 0.1:43548 POST /註冊401 23「無法獲取用戶:未找到用戶」 –

+0

您能向我們展示CA Server配置文件的內容嗎? – Urko

回答

0

嘗試刪除命令中的逗號逗號。

刪除服務器和客戶端文件夾,並按照博客中的說明避免引號。

1.Initialize服務器

fabric-ca-server init -b admin:adminpw 

2.啓動服務器

fabric-ca-server start -b admin:adminpw 

3.Enroll管理

fabric-ca-client enroll -u http://admin:[email protected]:7054 

4.Create新用戶,並將其註冊

fabric-ca-client register -u http://localhost:7054 --id.name test --id.secret testpw --id.type client --id.affiliation org1.department1 

希望你不會面對你收到的錯誤!

假設您已成功構建fabric ca server和client。