Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection refused on all RPC API thetacli key CMD #75

Closed
Yoruba opened this issue Jan 18, 2020 · 6 comments
Closed

Connection refused on all RPC API thetacli key CMD #75

Yoruba opened this issue Jan 18, 2020 · 6 comments

Comments

@Yoruba
Copy link
Contributor

Yoruba commented Jan 18, 2020

For example List Keys cmd

curl -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"thetacli.ListKeys","params":[],"id":1}' http://localhost:16889/rpc

Gives an error.

curl: (7) Failed to connect to localhost port 16889: Connection refused

This was working a year ago.
Maybe it is refused because of security reasons?

Thanks

@Yoruba Yoruba changed the title Connection refused on all thetacli key CMD Connection refused on all RPC API thetacli key CMD Jan 18, 2020
@jieyilong
Copy link
Member

Is your RPC port 16889 or 16888? Also did you enable RPC in config.yaml?

@Yoruba
Copy link
Contributor Author

Yoruba commented Jan 21, 2020

RPC ports are the default ports and not set in the config.yaml
RPC is enabled

Calls to theta API with port 16888 are working
Calls to thetacli API with port 16889 are not working

if I do a netstat port, 16889 is not listening

@jieyilong
Copy link
Member

yeah if you didn't specify 16889 as the RPC port in config.yaml, by default the node will use 16888 as the RPC port

@Yoruba
Copy link
Contributor Author

Yoruba commented Jan 21, 2020

There are 2 ports needed. 1 for Theta API (node) and 1 for Theta cli API (wallet).
Port 16888 is for node API that one is working.
Port 16889 is for the wallet API and that port is not listening by default.

The node calls are working but you can call the wallet calls on the same port as the node port.

Maybe the documentation is out dates.
And I use the wrong calls. theta.command-name instead of thetacli.command-name.

@jieyilong
Copy link
Member

I see, did you run the thetacli deamon? Need the deamon process in the background to enable the API on port 16889

thetacli daemon start --port=16889

@Yoruba
Copy link
Contributor Author

Yoruba commented Jan 23, 2020

Thanks @jieyilong it is working.

@Yoruba Yoruba closed this as completed Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants