Open alenn-m opened 6 years ago
Are you connecting to the correct endpoint?
https://github.com/steemit/steem/blob/master/contrib/steemd.run#L103-L130
ws://127.0.0.1:8091
is only the steemd endpoint if you specified running steemd behind nginx.
Thanks @mvandeberg now the cli_wallet
can connect to the steemd
, but now I can't connect to the cli_wallet
, I tried connecting from the same server and from my computer but it refuses connection.
This is the command I used:
docker exec -it steemd-exchange /usr/local/steemd-default/bin/cli_wallet --server-rpc-endpoint=ws://0.0.0.0:8090 -w /var/steemwallet/wallet.json -H 127.0.0.1:8093 --rpc-http-allowip 213.91.104.54 127.0.0.1 0.0.0.0
And this is the output:
2411371ms th_a main.cpp:101 main ] allowed_ips: ["213.91.104.54","127.0.0.1","0.0.0.0"]
Logging RPC to file: logs/rpc/rpc.log
2411382ms th_a main.cpp:154 main ] wdata.ws_server: ws://0.0.0.0:8090
2411391ms th_a main.cpp:159 main ] wdata.ws_user: wdata.ws_password:
2422847ms th_a websocket_api.cpp:88 on_message ] message: {"id":1,"result":true}
2422852ms th_a websocket_api.cpp:88 on_message ] message: {"id":2,"result":0}
2422852ms th_a websocket_api.cpp:88 on_message ] message: {"id":3,"result":3}
2422854ms th_a main.cpp:227 main ] Listening for incoming HTTP RPC requests on 127.0.0.1:8093
As you can see it's listening to 127.0.0.1:8093
and I allowed my IP address, but when I try to execute any command with curl, my connection is rejected.
If you are attempting to connect from the host machine you will need to map the endpoint for the Docker container when you launch the container.
Yes, I was attempting to connect from the host machine. I exposed the port 8093 in docker. How do I map the endpoint?
It's probably a stupid question but I can't fix this issue. I'm running a Steem node which is built with docker, everything is ok there, I can connect to RPC with curl and commands are executing properly. I need some commands from the wallet but they are not available when I list all commands. After reading the documentation I figured out I need to start the
cli_wallet
and connect it to thesteemd
, so I tried with this command:docker exec -it steemd-exchange /usr/local/steemd-default/bin/cli_wallet --server-rpc-endpoint=ws://127.0.0.1:8091 -w /var/steemwallet/wallet.json
and this is the error:What am I doing wrong? How to use wallet commands with RPC so I can programmatically control my account?