iost-official / go-iost

Official Go implementation of the IOST blockchain
https://developers.iost.io/
GNU Lesser General Public License v3.0
565 stars 112 forks source link

ERROR: rpc error: code = Unknown desc = tx not found #986

Closed fanyangyang closed 5 years ago

fanyangyang commented 5 years ago
iwallet --account admin call 'token.iost' 'transfer' '["iost","admin","lispczz3","100",""]'
Connecting to server localhost:30002 ...
Sending transaction...
Transaction:
{
    "time": "1553158428340691035",
    "expiration": "1553158518340691035",
    "gasRatio": 1,
    "gasLimit": 1000000,
    "delay": "0",
    "chainId": 1024,
    "actions": [
        {
            "contract": "token.iost",
            "actionName": "transfer",
            "data": "[\"iost\",\"admin\",\"lispczz3\",\"100\",\"\"]"
        }
    ],
    "amountLimit": [
        {
            "token": "*",
            "value": "unlimited"
        }
    ],
    "signers": [
    ],
    "signatures": [
    ],
    "publisher": "admin",
    "publisherSigs": [
        {
            "algorithm": "ED25519",
            "signature": "8EqHTWgSs82vb6avxpmITYkilTDIXU2KG4YlLRlh2vb1JJw4J6sQmzmPKd+6qFSPpiz/A4IAdOUztzZIaYbTAw==",
            "publicKey": "VzGt610agH7JxDglOJ5e3/cEEuRkOpRimmUq8b/PLwg="
        }
    ]
}
Transaction has been sent.
The transaction hash is: 291uAGsdW5po2iLgUteRhB8HCuKRXhkZrFwBZTwB8MEb
Checking transaction receipt...
ERROR: rpc error: code = Unknown desc = tx not found

what i did is :

and then, i get this error, anyone knows the reason?

QwertyJack commented 5 years ago

The error is caused by error: invalid account lispczz3. The account lispczz3 is not included in genesis, thus it does not exist unless you create it first. Upgrade to the latest version (both iserver and iwallet) will show you detailed error message.

fanyangyang commented 5 years ago

@QwertyJack i try upgrade to 3.0.6 and start the iserver, and create account lispczz3 first, but while i running the command ./iwallet --server 127.0.0.1:30002 --account admin --amount_limit "ram:1000|iost:10" account create lispczz3 --initial_balance 0 --initial_gas_pledge 10 --initial_ram 0, it still print the Error image

this time, i did not run transfer command, just run account create

QwertyJack commented 5 years ago

You may reopen this issue if the problem still exists.

lispc commented 5 years ago

old version of iwallet prints misleading err msg. I am afraid the 'iwallet' in go/src/bin/ in not newest. Can you 'make build install' and then 'target/iwallet --server 127.0.0.1:30002 --account admin --amount_limit "ram:1000|iost:10" account create lispczz3 --initial_balance 0 --initial_gas_pledge 10 --initial_ram 0'? I run the same command, and I did not encounter error

fanyangyang commented 5 years ago

@QwertyJack sorry, i can reopen this issue, because i did not close it, you did it

@lispc Mr.张, please have a look at this screenshot image

我重新编译的最新的tag版本,应该没问题吧

lispc commented 5 years ago

cannot reproduce the problem locally myself. Did the iserver print any error log msg?

fanyangyang commented 5 years ago

no, i modify config/iserver.yml set log level as err and restart the iserver, and retry the action, the log file just has contract base.iost do exec actions, no more other message

image

ziranliu commented 5 years ago

看截图确实重新编译了最新版 iserver,但是 tmux a -t iost 是用编译后的 iserver 重启吗? 可以运行 "iwallet state" 看看 iserver 的运行状态和版本信息

QwertyJack commented 5 years ago

欢迎加入 slack 社区 ! 详见 #994

fanyangyang commented 5 years ago

@ziranliu 对的,tmux a -t iost是编译后重启iserver, 运行iwallet state的结果好像也没什么问题。这是截图 image

另外,slack的使用不太方便

ziranliu commented 5 years ago

iwallet state 显示的 git_hash 并不是最新版,是很老的版本。 而且很多字段为0也说明了你运行的是老版本。

fanyangyang commented 5 years ago

我将旧的target目录都删除了,重新编译了一遍,在编译的时候这个gitHash和iwallet state查询的gitHash也不一定,不知道问题是否是出在这里,我是用的是最新的tagv3.0.7版本进行编译的 image

ziranliu commented 5 years ago

你编译没问题,问题应该是你没运行编译后的二进制文件。你没有杀掉老进程。

fanyangyang commented 5 years ago

明白,再来一次,我这次同样是删除了target目录,然后重新编译,再次运行

image

这次运行的是重新编译的二进制文件,应该是没错了,之前的进程Ctrl+C 停止的。 这应该是运行的新的编译后的二进制文件了。

QwertyJack commented 5 years ago

运行iwallet state的结果?

fanyangyang commented 5 years ago

而且我确定就只有一个我运行的iserver服务,这次错误就更严重了,iwallet state都连不上rpc服务了

image

QwertyJack commented 5 years ago

iserver有造块吗? sudo lsof -i:30002 输出是?

fanyangyang commented 5 years ago

image 有造块

QwertyJack commented 5 years ago

sudo lsof -i:30002 输出是?

fanyangyang commented 5 years ago

lsof没打印出来东西,说明rpc服务没启动

QwertyJack commented 5 years ago

可能日至里会有需要的信息。建议level开到info,把从启动到开始造块完整的日至贴上来。

QwertyJack commented 5 years ago

BTW,不妨试试docker方式运行iserver

fanyangyang commented 5 years ago

image 哈哈,docker运行不是不可以,但是现在咱们在分析解决这个问题嘛,说实话,在另一台服务器上已经正常运行了一套iserver服务呢

ziranliu commented 5 years ago

看日志没发现什么问题,你现在再运行 iwallet state 有返回吗?如果没有,那 sudo lsof -i :30002 呢?

fanyangyang commented 5 years ago

都没有任何返回信息

ziranliu commented 5 years ago

我们先尝试复现这个问题,研究一下。

QwertyJack commented 5 years ago

@fanyangyang 是不是你之前的 iserver 把 30002 端口占用了? 试试重启iserver

fanyangyang commented 5 years ago

@QwertyJack @lispc @ziranliu 首先,谢谢各位的支持,@QwertyJack提醒了我,同事使用另一个账户确实通过docker的方式启动了一个节点,我现在将docker也停止了,就能连上我自己的节点了,也看到了错误信息 image 这样问题就简单了

QwertyJack commented 5 years ago

私钥错误 默认 admin 私钥在这里 如过改了 genesis/genesis.yml 请使用对应的私钥

fanyangyang commented 5 years ago

@QwertyJack 真的是万分感谢,麻烦了。可以关闭这个issue啦

QwertyJack commented 5 years ago

@fanyangyang 欢迎加入开发者社区。除了 slack,还有 telegram 和 wx 。

fanyangyang commented 5 years ago

@QwertyJack 有微信的更好哦,能提供一下吗?