Hyperledger Fabric failed to send proposal to peers Unable to resolve host peer0 org1

0 votes

While compiling the app, peers status is down. I tried to restart the docker container in order to change the peers status but no luck. Can someone tell me how to solve this problem?


...
...
        >java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Unable to resolve host peer0.org1.digitalberry-infra
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
            at com.digitalberry.bcncore.CoreApp.main(CoreApp.java:71)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
        Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Unable to resolve host peer0.org1.digitalberry-infra
            at io.grpc.Status.asRuntimeException(Status.java:526)
            at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:467)
        Caused by: java.net.UnknownHostException: peer0.org1.digitalberry-infra
            at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
            at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
            at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
            at java.net.InetAddress.getAllByName0(Unknown Source)
            at java.net.InetAddress.getAllByName(Unknown Source)
            at java.net.InetAddress.getAllByName(Unknown Source)
            at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:335)
            at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:173)
            ... 3 common frames omitted
...
...
>2018-08-13 12:50:08.301 ERROR 980 --- [  restartedMain] o.s.boot.SpringApplication               : Application startup failed

property config:

application:
    basedir: @project.basedir@
    fabric: 
        peerUserPath : ${application.basedir}/target/classes/crypto-config/peerOrganizations/org1.digitalberry-infra/users/Admin@org1.digitalberry-infra/msp
        peerCAPath : ${application.basedir}/target/classes/crypto-config/peerOrganizations/org1.digitalberry-infra/users/Admin@org1.digitalberry-infra/tls
        ordererCAPath : ${application.basedir}/target/classes/crypto-config/ordererOrganizations/digitalberry-infra/users/Admin@digitalberry-infra/tls
        sampleStoreFilePath : ${application.basedir}/HFCSampletest.properties
        peer0Name: peer0.org1.digitalberry-infra
        peer0Address: grpcs://peer0.org1.digitalberry-infra:7051
        peer1Name: peer1.org1.digitalberry-infra
        peer1Address: grpcs://peer1.org1.digitalberry-infra:8051
        eventHub0Address: grpcs://peer0.org1.digitalberry-infra:7053
        eventHub1Address: grpcs://peer1.org1.digitalberry-infra:8053
        ordererName: orderer.digitalberry-infra
        ordererAddress: grpcs://orderer.digitalberry-infra:7050
        channelName: mychannel


 */

Nov 16, 2018 in Blockchain by digger
• 26,740 points
2,034 views

1 answer to this question.

0 votes

This peer address does not exist on the internet

peer0Address: grpcs://peer0.org1.digitalberry-infra:7051

So you should change it to localhost. And also replace grpcs with grpc:

peer0Address: grpc://localhost:7051

This should work.

answered Nov 16, 2018 by Omkar
• 69,210 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

Hyperledger Fabric CA "Failed to get user: User not found"

The problem could be because of the ...READ MORE

answered Jul 23, 2018 in Blockchain by digger
• 26,740 points
2,272 views
+2 votes
3 answers
0 votes
2 answers
+2 votes
1 answer
0 votes
1 answer
0 votes
3 answers
0 votes
1 answer
0 votes
1 answer

Hyperledger fabric: Unable to query result

In Hyperledger Fabric v1.0.0 your chaincode should confirm ...READ MORE

answered Oct 30, 2018 in Blockchain by Omkar
• 69,210 points
790 views
+4 votes
2 answers

Hyperledger Fabric issue: orderer client failed to connect to orderer.xxx.net:7050: failed to create new connection

Hey @gujiwork, Try making the following changes: docker-compose-base.yaml and ...READ MORE

answered Nov 5, 2018 in Blockchain by Omkar
• 69,210 points
18,682 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP