-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
创建合约账户,io.grpc.StatusRuntimeException: UNAVAILABLE #28
Comments
版本:xuperchain:5.1.0 sdk:0.2.0 为什么连不上区块链呢 |
@lamaxiyali |
还是一样的错误,请问有没有示例的demo我测试一下? 这是我的sdk.yaml文件,我就是linux按照官网起了一个单节点实例网络,用java sdk测试就是这个错误 endorseServiceHost: "ip地址:37101" |
你要连接本地自己搭建的节点还是要连接开放网络? |
自己在虚拟机上搭建的网络 |
先用 xchain-cli 试一下节点是否正常。 |
可以啦,刚节点确实是有问题,我重新搭建了一个可以连上创建账户了,谢谢哈 |
不客气,可以加入百度超级链微信群随时沟通。 |
Exception in thread "main" java.lang.RuntimeException: io.grpc.StatusRuntimeException: UNAVAILABLE
at com.baidu.xuper.api.Proposal.build(Proposal.java:193)
at com.baidu.xuper.api.XuperClient.invokeContract(XuperClient.java:114)
at com.baidu.xuper.api.XuperClient.createContractAccount(XuperClient.java:172)
at Demo2.main(Demo2.java:17)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:240)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:221)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:140)
at com.baidu.xuper.pb.XchainGrpc$XchainBlockingStub.preExecWithSelectUTXO(XchainGrpc.java:1763)
at com.baidu.xuper.api.Proposal.build(Proposal.java:187)
... 3 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)
at java.net.Socket.connect(Socket.java:606)
at java.net.Socket.connect(Socket.java:555)
at java.net.Socket.(Socket.java:451)
at java.net.Socket.(Socket.java:261)
at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:277)
at io.grpc.okhttp.OkHttpClientTransport$4.run(OkHttpClientTransport.java:552)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
代码
// 1、创建钱包账户
Account account = Account.create(1,1);
// 2、连接节点
XuperClient xuperClient = new XuperClient(ip+ ":37101");
// 3、创建合约账户
xuperClient.createContractAccount(account,"1111111111111112");
The text was updated successfully, but these errors were encountered: