EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

/v1/chain/get_info bad request error #4663

Closed kujaomega closed 6 years ago

kujaomega commented 6 years ago

I'm using 16.04.1-Ubuntu and 18.03.1-ce docker version. I runned EOSIO Dev docker image with the following commands: docker pull eosio/eos-dev sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:8888 --access-control-allow-origin=* --contracts-console"

I have checked that sudo docker logs --tail 10 eosio is producing blocks(OK).

But when I make a GET of http://localhost:8888/v1/chain/get_info I get a Bad request(400)

andriantolie commented 6 years ago

Try adding --verbose-http-errors to your nodeos command above and then share the result of calling get_info here

crazyxrp commented 6 years ago

I have the same problem as @kujaomega .Add --verbose-http-errors not show more message. @andriantolie

andriantolie commented 6 years ago

How about adding --http-validate-host=false to your nodeos command?

sunrye commented 6 years ago

@andriantolie I have the same question, it works to add --http-validate-host=false thanks

crazyxrp commented 6 years ago

add --http-validate-host=false works for me . @kujaomega @andriantolie thanks.

kujaomega commented 6 years ago

Yes, with --http-validate-host=false works for me. Thanks @andriantolie