bitshares1-core icon indicating copy to clipboard operation
bitshares1-core copied to clipboard

Enabling HTTP server via GUI returns undefined

Open sidhujag opened this issue 10 years ago • 6 comments

  1. Open GUI & goto console
  2. enable http server (make sure you specify a port)

Notice return is "undefined"

any subsequent calls all return "undefined".

Default config.json on 0.4.24

sidhujag avatar Dec 04 '14 18:12 sidhujag

@valzav ?

vikramrajkumar avatar Dec 04 '14 18:12 vikramrajkumar

@sidhujag why do you need to enable it? Accessing GUI means that http server is up and running..

valzav avatar Dec 04 '14 18:12 valzav

I was connecting via HTTP RPC to access wallet transactions as per #1086 however I need the port to be non random. I wanted to see transactions coming in visually as I paid the wallet to confirm all was working.

Will I have access to RPC if I simply change the port in the config.json?

I tried to change the "rpc" json tag to this: { "rpc": { "enable": true, "rpc_user": "user", "rpc_password": "pass", "rpc_endpoint": "127.0.0.1:0", "httpd_endpoint": "127.0.0.1:1234", "htdocs": "./htdocs" },

enabled set to true, user/pass changed and endpoint set to port 1234... however my connection is refused when I try to curl into it... it works with bitshares_client using this config.json setup

sidhujag avatar Dec 04 '14 18:12 sidhujag

I think there is no workaround for this - qt wallet uses random port and user/password combination, I suggest you to use bitshares_client, not qt wallet if you need RPC access. Enabling http server via console won't help because it's already enabled.

valzav avatar Dec 04 '14 19:12 valzav

ok, I understand to use the client.. but just opened this issue as it was a valid bug...if there is no forseeable way around it and it was designed as such, does it make sense to filter out commands (with a message) that don't apply in GUI/client mode?

sidhujag avatar Dec 04 '14 19:12 sidhujag

The work around is to have the GUI respect the config file settings if they are set and otherwise use random user/password.

bytemaster avatar Dec 04 '14 20:12 bytemaster