- fabric-sdk-java-scratch example code for Hyperledger Fabric SDK Java Basic Tutorial article.
scratch's Introduction
scratch's People
Forkers
javaer2012 blackwhites rayminr manishatgit 123mieto kemxx xuyangzhong glosfer-tbkim vishwajitmankar minsuk-jang arindbha sulaiman2016tc12034 mahirjhaveri01 shobhitjava yingziaiai ekesh ahsan541 yongarykim ssy1997 sushantdm ichigo-pasta txclovelyj feibor dataspider-fanscratch's Issues
Cannot join peer to channel "mychannel"
Executing the code steps you mentioned we always got "mychannel doesn't exist" and "access denied" when trying to join peer0
of org1
to mychannel
.
We we only able to join peer0
programmatically (i.e. via the HFClient
) only after joining the peer via the command line:
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/[email protected]/msp
export CORE_PEER_LOCALMSPID=Org1MSP
then
peer channel create -o <address_of_peer0.org1>:7050 -c mychannel
So my question is: were you able to join peer0
of org1
or org2
to mychannel
without running peer
on the command line?
Thanks
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
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.