Closed jcalfee closed 5 years ago
If cleos is launching the wallet with defaults like this:
keosd --wallet-dir ~/eosio-wallet --http-server-address=127.0.0.1:8900
Then can these be defaults when keosd is launched as follows (should behave like the command above):
keosd &
Thanks Todd for having a look.
There is one more case for the error:
response_content_length >= 0: Invalid content-length response
I'm stuck updating eosjs because I can't create a wallet in the test environment. I did however find a easy way to re-create the error. Here it is:
$ docker run --rm -it eosio/eos:v1.0.9 bash
Is not related to the error above so a simple pkill will not help:
root@f3d38caeff01:/# ps -eaf|egrep nodeos
root 12 1 0 13:34 pts/0 00:00:00 grep -E --color=auto nodeos
root@f3d38caeff01:/# ps -eaf|egrep keos
root 14 1 0 13:34 pts/0 00:00:00 grep -E --color=auto keos
Make sure there are no invalid wallet directories:
root@b8617cba70af:/# ls /root/eosio-wallet /opt/eosio/bin/data-dir
ls: cannot access '/root/eosio-wallet': No such file or directory
/opt/eosio/bin/data-dir:
Start nodeos as documented in: https://developers.eos.io/eosio-cpp/docs/introduction-to-smart-contracts
root@f3d38caeff01:/# nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin 2>&1 | egrep -v 'Produced block 0' &
[1] 17
root@f3d38caeff01:/# 1052252ms thread-0 chain_plugin.cpp:209 plugin_initialize ] initializing chain plugin
1052252ms thread-0 chain_plugin.cpp:395 plugin_initialize ] Starting up fresh blockchain with default genesis state.
...
Now what is this error??
root@f3d38caeff01:/# cleos wallet create
"/opt/eosio/bin/keosd" launched
1068085ms thread-0 main.cpp:2756 main ] Failed with error: Assert Exception (10)
response_content_length >= 0: Invalid content-length response
The 1.0.9 docker image is currently broken. Bart's working on a fix.
Unfortunately no, keosd &
can not currently be equivalent to keosd --wallet-dir ~/eosio-wallet --http-server-address=127.0.0.1:8900
. It would solve many problems, but right now, keosd
links to http_plugin
to provide its HTTP support, and the default port is embedded in the plugin. If it's changed in the plugin, then nodeos
would have the wrong port since it also links to http_plugin
.
Various changes merged to address multiple issues, including defaulting keosd to Unix sockets, improving error messages, and tolerating removal of a wallet file while keosd is running.
print the wallet path somewhere
--help
and when creating the walletfix this error if the wallet directly gets reset and keosd is still running