eos icon indicating copy to clipboard operation
eos copied to clipboard

cleos command error

Open lvyg opened this issue 8 years ago • 25 comments

I install EOS on Ubuntu 18.04. If I run cleos wallet command without running keosd, the error is: "/usr/local/bin/keosd" launched Unable to connect to keosd, if keosd is running please kill the process and try again.

If I run keosd first, then run cleos wallet list, the error is: 2490315ms thread-0 main.cpp:2756 main ] Failed with error: Assert Exception (10) response_content_length >= 0: Invalid content-length response

This command run well:

cleos --wallet-url http://127.0.0.1:8888 wallet list

but this error:

cleos --wallet-url http://localhost:8888 wallet list

Wallets: 1562262ms thread-0 main.cpp:2756 main ] Failed with error: Assert Exception (10) response_content_length >= 0: Invalid content-length response

the hosts file has added: 127.0.0.1:localhost

lvyg avatar Jul 11 '18 11:07 lvyg

the second error means that the --wallet-url (or default value) doesn't match the http(s)-listen-address provided to keosd. Can you post the values of those?

wanderingbort avatar Jul 11 '18 11:07 wanderingbort

@wanderingbort I run the keosd and cleos without options. So the --wallet-url (or default value) and http(s)-listen-address both are 127.0.0.1:8900

2152842ms thread-0 http_plugin.cpp:331 plugin_initialize ] configured http to listen on 127.0.0.1:8900 2152842ms thread-0 wallet_plugin.cpp:39 plugin_initialize ] initializing wallet plugin 2152842ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/keosd/stop 2152842ms thread-0 http_plugin.cpp:376 plugin_startup ] start listening for http requests 2152843ms thread-0 wallet_api_plugin.cpp:73 plugin_startup ] starting wallet_api_plugin 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/create 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/create_key 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/get_public_keys 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/import_key 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/list_keys 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/list_wallets 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/lock 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/lock_all 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/open 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/remove_key 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/set_timeout 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/sign_digest 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/sign_transaction 2152843ms thread-0 http_plugin.cpp:422 add_handler ] add api url: /v1/wallet/unlock

lvyg avatar Jul 11 '18 12:07 lvyg

Hi, same errors here on Ubuntu 16.04

opheelia avatar Jul 11 '18 13:07 opheelia

reproduced with 1.0.7, 1.0.8, 1.0.9 - and 1.0.6 works flawlessly.

infohata avatar Jul 11 '18 14:07 infohata

I am using the default port and it's reproducible.

jin-beyond avatar Jul 11 '18 21:07 jin-beyond

i have same errors on ubuntu 16.04 , i installed yerterday

nunettine avatar Jul 12 '18 02:07 nunettine

use last master ef654aa34c, get info reproduced same error:

2490315ms thread-0 main.cpp:2756 main ] Failed with error: Assert Exception (10) response_content_length >= 0: Invalid content-length response

spartucus avatar Jul 12 '18 03:07 spartucus

well, for 1.0.9 and later, add http-validate-host = false to your config.ini. https://github.com/EOSIO/eos/issues/4603#issuecomment-404372073

spartucus avatar Jul 12 '18 04:07 spartucus

@spartucus where is r config.ini on imac?

lvyg avatar Jul 12 '18 05:07 lvyg

@lvyg if you follow the document EOS developer, it is /tmp/eosio/config

jin-beyond avatar Jul 12 '18 06:07 jin-beyond

Has anybody fixed this? I tried changing http-validate-host to false in config.ini, but that didn't work.

sarojchintak avatar Jul 12 '18 06:07 sarojchintak

@sarojchintak it should work if you restart eosio

jin-beyond avatar Jul 12 '18 06:07 jin-beyond

@sarojchintak restart keosd and it will be fine

infohata avatar Jul 12 '18 07:07 infohata

What did you use to restart keosd/eosio? I've done both and no luck.

sarojchintak avatar Jul 12 '18 08:07 sarojchintak

well, for 1.0.9 and later, add http-validate-host = false to your config.ini.

works fine!

Vasiliy-Bondarenko avatar Jul 12 '18 08:07 Vasiliy-Bondarenko

I install eos follow the document, but can't find eosio finder in /tmp/.

lvyg avatar Jul 12 '18 11:07 lvyg

How to solve? i want freedom

chijunqing avatar Jul 12 '18 14:07 chijunqing

I have the same error in Ubuntu 16.04,add http-validate-host = false to my config.ini did not fix it

Danilo0120 avatar Jul 12 '18 14:07 Danilo0120

resolved config add “http-validate-host = false”

chijunqing avatar Jul 12 '18 14:07 chijunqing

OK,I solve it.

Danilo0120 avatar Jul 12 '18 14:07 Danilo0120