How to use CA?
ygbingo opened this issue · 2 comments
I want to use CA, but I dont know how to make CA config . And I got this Error:
an 07, 2019 10:35:32 AM main.java.org.app.util.Util deleteDirectory
INFO: Deleting - users
org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Url:http://192.168.7.107:7054, Failed to enroll user admin
at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:346)
at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:254)
at main.java.org.app.client.CAClient.enrollAdminUser(CAClient.java:103)
at main.java.org.app.chaincode.invocation.InvokeChaincode.addRule(InvokeChaincode.java:302)
at main.java.org.app.chaincode.invocation.InvokeChaincode.main(InvokeChaincode.java:60)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 192.168.7.107:7054 [/192.168.7.107] failed: Connection refused (Connection refused)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:565)
at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:307)
... 4 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
... 15 more
@yanhuibin315 , what code changes you made and what actually you wanted to achieve? Given code uses CA and enrollment / registration all works fine.
@yanhuibin315 , the CA issue resolved? let us know if you need any help else we will close the issue. Thanks.