FISCO-BCOS / evidenceSample

A sample of using FISCO BCOS to build an evidence application
Apache License 2.0
101 stars 76 forks source link

执行./evidence deploy user.jks 出错 #4

Open zhige2003 opened 6 years ago

zhige2003 commented 6 years ago

我执行./evidence deploy user.jks '123456' '123456' 命令,提醒错误“at org.bcos.evidence.app.BcosApp.deployContract(BcosApp.java:98)”,详见如下。 对应的代码是 evidenceSignersData = EvidenceSignersData.deploy(web3j, credentials, gasPrice, gasLimited, initialValue,evidenceSigners).get(); 检查了applicationContext.xml按照要求的配置,读取也应该正常,烦请看一下原因。

333 + /root/mydata/evidenceSample-master/evidence_toolkit
22 + /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/bin/java
11 +  
四月 06, 2018 6:24:52 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@45ff54e6: startup date [Fri Apr 06 18:24:52 CST 2018]; root of context hierarchy
四月 06, 2018 6:24:52 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
四月 06, 2018 6:24:52 下午 org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor initialize
信息: Initializing ExecutorService  'pool'

命令输入参考如下! 
工厂合约部署:./evidence deploy keyStoreFileName keyStorePassword keyPassword  
创建新证据:./evidence new  keyStoreFileName keyStorePassword keyPassword deployAddress evidence_id evidence_hash  
发送签名:./evidence send keyStoreFileName keyStorePassword keyPassword newEvidenceAddress evidence_hash 
获取证据:./evidence get keyStoreFileName keyStorePassword keyPassword newEvidenceAddress 
证据和签名校验:./evidence verify keyStoreFileName keyStorePassword keyPassword newEvidenceAddress 
获取公钥:./evidence getPublicKey keyStoreFileName keyStorePassword keyPassword  

java.util.concurrent.ExecutionException: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 0]
        at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
        at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
        at org.bcos.evidence.app.BcosApp.deployContract(BcosApp.java:98)
        at org.bcos.evidence.app.Main.main(Main.java:47)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 0]
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3854)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3799)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2858)
        at org.bcos.web3j.protocol.channel.ChannelEthereumService.send(ChannelEthereumService.java:50)
        at org.bcos.web3j.protocol.core.Request.send(Request.java:69)
        at org.bcos.web3j.tx.RawTransactionManager.signAndSend(RawTransactionManager.java:106)
        at org.bcos.web3j.tx.RawTransactionManager.sendTransaction(RawTransactionManager.java:90)
        at org.bcos.web3j.tx.TransactionManager.executeTransaction(TransactionManager.java:45)
        at org.bcos.web3j.tx.ManagedTransaction.send(ManagedTransaction.java:43)
        at org.bcos.web3j.tx.Contract.executeTransaction(Contract.java:207)
        at org.bcos.web3j.tx.Contract.create(Contract.java:309)
        at org.bcos.web3j.tx.Contract.deploy(Contract.java:284)
        at org.bcos.web3j.tx.Contract.lambda$deployAsync$25(Contract.java:326)
        at org.bcos.web3j.utils.Async.lambda$run$29(Async.java:22)
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
        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)
Exception in thread "main" java.lang.NullPointerException
        at org.bcos.evidence.app.BcosApp.deployContract(BcosApp.java:102)
        at org.bcos.evidence.app.Main.main(Main.java:47)
zlm919 commented 6 years ago

我也遇到了同样的问题

fisco-dev commented 6 years ago

https://github.com/FISCO-BCOS/web3sdk/issues/4

zlm919 commented 6 years ago

1、检查配置是否连接的是channelPort,需要配置成channelPort。 2、检查channelPort是否能telnet通,需要能telnet通。 3、服务端和客户端ca.crt是否一致,需要一致。 4、节点listen ip是否正确,最好直接监听0.0.0.0。 image conf文件夹里的ca.crt是从服务器的/mydata/nodedata-1/data/ca.crt 下下来的 这几项都检查了,还是没成功跑通这个例子。。。 image

➜  bin git:(master) ✗ ./evidence deploy user.jks '123456' '123456'
Apr 14, 2018 1:10:03 PM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@bebdb06: startup date [Sat Apr 14 13:10:03 CST 2018]; root of context hierarchy
Apr 14, 2018 1:10:03 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [applicationContext.xml]
Apr 14, 2018 1:10:04 PM org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor initialize
INFO: Initializing ExecutorService  'pool'

命令输入参考如下!
工厂合约部署:./evidence deploy keyStoreFileName keyStorePassword keyPassword
创建新证据:./evidence new  keyStoreFileName keyStorePassword keyPassword deployAddress evidence_id evidence_hash
发送签名:./evidence send keyStoreFileName keyStorePassword keyPassword newEvidenceAddress evidence_hash
获取证据:./evidence get keyStoreFileName keyStorePassword keyPassword newEvidenceAddress
证据和签名校验:./evidence verify keyStoreFileName keyStorePassword keyPassword newEvidenceAddress
获取公钥:./evidence getPublicKey keyStoreFileName keyStorePassword keyPassword

java.util.concurrent.ExecutionException: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 0]
        at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
        at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
        at org.bcos.evidence.app.BcosApp.deployContract(BcosApp.java:83)
        at org.bcos.evidence.app.Main.main(Main.java:47)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 0]
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3854)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3799)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2858)
        at org.bcos.web3j.protocol.channel.ChannelEthereumService.send(ChannelEthereumService.java:50)
        at org.bcos.web3j.protocol.core.Request.send(Request.java:69)
        at org.bcos.web3j.tx.RawTransactionManager.signAndSend(RawTransactionManager.java:106)
        at org.bcos.web3j.tx.RawTransactionManager.sendTransaction(RawTransactionManager.java:90)
        at org.bcos.web3j.tx.TransactionManager.executeTransaction(TransactionManager.java:45)
        at org.bcos.web3j.tx.ManagedTransaction.send(ManagedTransaction.java:43)
        at org.bcos.web3j.tx.Contract.executeTransaction(Contract.java:207)
        at org.bcos.web3j.tx.Contract.create(Contract.java:309)
        at org.bcos.web3j.tx.Contract.deploy(Contract.java:284)
        at org.bcos.web3j.tx.Contract.lambda$deployAsync$25(Contract.java:326)
        at org.bcos.web3j.utils.Async.lambda$run$29(Async.java:22)
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.lang.NullPointerException
        at org.bcos.evidence.app.BcosApp.deployContract(BcosApp.java:87)
        at org.bcos.evidence.app.Main.main(Main.java:47)

服务器上的一些错误日志

ERROR|2018-04-14 12:12:54:038|SSL handshake错误: sslv3 alert certificate unknown
ERROR|2018-04-14 12:12:56:039|SSL handshake错误: sslv3 alert certificate unknown
ERROR|2018-04-14 12:12:58:039|SSL handshake错误: sslv3 alert certificate unknown
ERROR|2018-04-14 12:13:00:045|SSL handshake错误: sslv3 alert certificate unknown
ERROR|2018-04-14 12:13:02:051|SSL handshake错误: sslv3 alert certificate unknown
ERROR|2018-04-14 12:28:55:896|连接空闲,断开本连接 220.112.16.220:22019
ERROR|2018-04-14 12:28:55:896|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:28:55:896|移除该session: 220.112.16.220:22019 成功
ERROR|2018-04-14 12:28:56:004|连接空闲,断开本连接 220.112.16.220:22021
ERROR|2018-04-14 12:28:56:004|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:28:56:004|移除该session: 220.112.16.220:22021 成功
ERROR|2018-04-14 12:29:00:782|read错误:2,End of file
ERROR|2018-04-14 12:29:00:782|read错误:2,End of file
ERROR|2018-04-14 12:29:05:782|连接空闲,断开本连接 220.112.16.220:22019
ERROR|2018-04-14 12:29:05:782|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:29:05:782|移除该session: 220.112.16.220:22019 成功
ERROR|2018-04-14 12:29:05:782|连接空闲,断开本连接 220.112.16.220:22021
ERROR|2018-04-14 12:29:05:782|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:29:05:782|移除该session: 220.112.16.220:22021 成功
ERROR|2018-04-14 12:30:11:681|read错误:335544539,short read
ERROR|2018-04-14 12:30:11:681|错误: -1, read失败,连接断开
ERROR|2018-04-14 12:30:11:681|移除该session: 220.112.16.220:22020 成功
ERROR|2018-04-14 12:30:42:072|SSL handshake错误: End of file
ERROR|2018-04-14 12:30:47:182|连接空闲,断开本连接 220.112.16.220:22022
ERROR|2018-04-14 12:30:47:182|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:30:47:182|移除该session: 220.112.16.220:22022 成功
ERROR|2018-04-14 12:30:52:079|read错误:2,End of file
ERROR|2018-04-14 12:30:57:079|连接空闲,断开本连接 220.112.16.220:22022
ERROR|2018-04-14 12:30:57:079|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:30:57:079|移除该session: 220.112.16.220:22022 成功
ERROR|2018-04-14 12:36:30:700|read错误:335544539,short read
ERROR|2018-04-14 12:36:30:700|错误: -1, read失败,连接断开
ERROR|2018-04-14 12:36:30:700|移除该session: 220.112.16.220:22024 成功
ERROR|2018-04-14 12:38:54:876|连接空闲,断开本连接 220.112.16.220:22027
ERROR|2018-04-14 12:38:54:876|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:38:54:876|移除该session: 220.112.16.220:22027 成功
ERROR|2018-04-14 12:38:54:946|连接空闲,断开本连接 220.112.16.220:22026
ERROR|2018-04-14 12:38:54:946|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:38:54:946|移除该session: 220.112.16.220:22026 成功
ERROR|2018-04-14 12:38:59:771|read错误:2,End of file
ERROR|2018-04-14 12:38:59:772|read错误:2,End of file
ERROR|2018-04-14 12:39:04:771|连接空闲,断开本连接 220.112.16.220:22027
ERROR|2018-04-14 12:39:04:771|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:39:04:771|移除该session: 220.112.16.220:22027 成功
ERROR|2018-04-14 12:39:04:772|连接空闲,断开本连接 220.112.16.220:22026
ERROR|2018-04-14 12:39:04:772|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:39:04:772|移除该session: 220.112.16.220:22026 成功
ERROR|2018-04-14 12:43:45:315|read错误:335544539,short read
ERROR|2018-04-14 12:43:45:315|错误: -1, read失败,连接断开
ERROR|2018-04-14 12:43:45:315|移除该session: 220.112.16.220:22025 成功
ERROR|2018-04-14 12:45:15:058|连接空闲,断开本连接 220.112.16.220:22029
ERROR|2018-04-14 12:45:15:058|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:45:15:058|移除该session: 220.112.16.220:22029 成功
ERROR|2018-04-14 12:45:15:160|连接空闲,断开本连接 220.112.16.220:22028
ERROR|2018-04-14 12:45:15:160|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:45:15:160|移除该session: 220.112.16.220:22028 成功
ERROR|2018-04-14 12:45:19:942|read错误:2,End of file
ERROR|2018-04-14 12:45:19:943|read错误:2,End of file
ERROR|2018-04-14 12:45:24:942|连接空闲,断开本连接 220.112.16.220:22029
ERROR|2018-04-14 12:45:24:942|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:45:24:942|移除该session: 220.112.16.220:22029 成功
ERROR|2018-04-14 12:45:24:943|连接空闲,断开本连接 220.112.16.220:22028
ERROR|2018-04-14 12:45:24:943|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:45:24:943|移除该session: 220.112.16.220:22028 成功
ERROR|2018-04-14 12:49:08:034|read错误:335544539,short read
ERROR|2018-04-14 12:49:08:034|错误: -1, read失败,连接断开
ERROR|2018-04-14 12:49:08:034|移除该session: 220.112.16.220:22030 成功
ERROR|2018-04-14 12:50:35:412|连接空闲,断开本连接 220.112.16.220:22033
ERROR|2018-04-14 12:50:35:412|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:50:35:412|移除该session: 220.112.16.220:22033 成功
ERROR|2018-04-14 12:50:35:481|连接空闲,断开本连接 220.112.16.220:22032
ERROR|2018-04-14 12:50:35:481|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:50:35:481|移除该session: 220.112.16.220:22032 成功
ERROR|2018-04-14 12:50:40:308|read错误:2,End of file
ERROR|2018-04-14 12:50:40:309|read错误:2,End of file
ERROR|2018-04-14 12:50:45:308|连接空闲,断开本连接 220.112.16.220:22033
ERROR|2018-04-14 12:50:45:308|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:50:45:308|移除该session: 220.112.16.220:22033 成功
ERROR|2018-04-14 12:50:45:309|连接空闲,断开本连接 220.112.16.220:22032
ERROR|2018-04-14 12:50:45:309|错误: -1, 连接空闲,断开
ERROR|2018-04-14 12:50:45:309|移除该session: 220.112.16.220:22032 成功
ERROR|2018-04-14 13:06:26:652|read错误:335544539,short read
ERROR|2018-04-14 13:06:26:652|错误: -1, read失败,连接断开
ERROR|2018-04-14 13:06:26:652|移除该session: 220.112.16.220:22031 成功
ERROR|2018-04-14 13:10:23:198|SSL handshake错误: End of file
ERROR|2018-04-14 13:10:28:310|连接空闲,断开本连接 220.112.16.220:22035
ERROR|2018-04-14 13:10:28:310|错误: -1, 连接空闲,断开
ERROR|2018-04-14 13:10:28:310|移除该session: 220.112.16.220:22035 成功
ERROR|2018-04-14 13:10:33:200|read错误:2,End of file
ERROR|2018-04-14 13:10:38:200|连接空闲,断开本连接 220.112.16.220:22035
ERROR|2018-04-14 13:10:38:200|错误: -1, 连接空闲,断开
ERROR|2018-04-14 13:10:38:200|移除该session: 220.112.16.220:22035 成功
ERROR|2018-04-14 13:13:30:709|read错误:335544539,short read
ERROR|2018-04-14 13:13:30:709|错误: -1, read失败,连接断开
SongJayJay commented 6 years ago

1,检查evidenceSample/evidencetoolkit/conf/ca.crt应该和节点mydata/nodedate/data/ca.crt一致; 2,检查mydata/nodedata_/config.json中的channelPort字段和mydata/nodedate_*/data/node.json中的id字段,与evidenceSample/evidence_toolkit/conf/applicationContext.xml区块链节点信息配置 id@IP:channelPort