scratch
scratch copied to clipboard
enroll user to fabric throwing error
The getAdmin method in the HFJavaSDKBasicExample class is not throwing error. I have my fabric network running on a ubuntu vm. From my mac machine I'm running your HFJavaSDKBasicExample to execute a chaincode application. This is the error I get.
2018-08-31 17:52:37,477 main WARN Config:110 - Failed to load any configuration from: config.properties. Using toolkit defaults 2018-08-31 17:52:37,845 main WARN Config:78 - Failed to load any configuration from: config.properties. Using toolkit defaults 2018-08-31 17:52:38,271 main ERROR HFCAClient:501 - Connection reset java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:210) at java.net.SocketInputStream.read(SocketInputStream.java:141) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:1170) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:460) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:404) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExample.getAdmin(HFJavaSDKBasicExample.java:194) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExample.main(HFJavaSDKBasicExample.java:51) Exception in thread "main" org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Url:http://192.168.1.105:7050, Failed to enroll user admin at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:500) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:404) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExample.getAdmin(HFJavaSDKBasicExample.java:194) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExample.main(HFJavaSDKBasicExample.java:51) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:210) at java.net.SocketInputStream.read(SocketInputStream.java:141) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:1170) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:460) ... 3 more