无法通过Hyperledger-Fabric v1.1预览

时间:2017-12-19 10:50:51

标签: blockchain hyperledger-fabric hyperledger

您好我无法使用fabric v1.1预览注册用户我正在使用node-sdk balance transfer示例 这是错误日志

2017/12/19 10:15:43 [DEBUG] Received request for /api/v1/register
2017/12/19 10:15:43 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin'
2017/12/19 10:15:43 [DEBUG] DB: Get certificate by serial (2579edfb30a98bc8200916a7898f0de00280865) and aki (e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011)
2017/12/19 10:15:43 [DEBUG] Received registration request from : { Name:Jim456 Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[{Role  false}] CAName:ca-org1  }
2017/12/19 10:15:43 [DEBUG] Sent error for /api/v1/register: scode: 401, local code: 30, local msg: Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' and serial '2579edfb30a98bc8200916a7898f0de00280865', remote code: 20, remote msg: Authorization failure

github.com/hyperledger/fabric-ca/lib.newAuthErr
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/servererror.go:145
github.com/hyperledger/fabric-ca/lib.(*serverRequestContext).TokenAuthentication
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/serverrequestcontext.go:157
github.com/hyperledger/fabric-ca/lib.registerHandler
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/serverregister.go:49
github.com/hyperledger/fabric-ca/lib.(*serverEndpoint).ServeHTTP
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/serverendpoint.go:44
net/http.(*ServeMux).ServeHTTP
    /opt/go/src/net/http/server.go:2254
net/http.serverHandler.ServeHTTP
    /opt/go/src/net/http/server.go:2619
net/http.(*conn).serve
    /opt/go/src/net/http/server.go:1801
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:2337
2017/12/19 10:15:43 [INFO] 172.19.0.1:56246 POST /api/v1/register 401 30 "Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' and serial '2579edfb30a98bc8200916a7898f0de00280865'"

1 个答案:

答案 0 :(得分:2)

错误:

  

“AKI未找到证书'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011'和串行'2579edfb30a98bc8200916a7898f0de00280865',远程代码:20,远程消息:授权失败”

建议CA找不到您提供的证书(来自管理员)。

如果您要向CA注册管理员以获取新证书,这应该可以解决您的问题。

您似乎可能正在使用存储在KVS存储文件中的旧证书,该证书与先前的网络有关。此问题只是由重新启动新网络并保留先前的KVS引起的,因此当您运行代码时,它会检查用户是否存储并使用这些凭据而不是获取新凭据。永远记得在重新启动网络时删除你的kvs。