RPC server (litecoin-qt) does not work


iam using: ubuntu 16, 64Bit, litecoin version 14 (latest version to download)

First of all: Please remove the RPC help informations from litecoind. It is not good to have a help explain of this program and then getting the response by the program “rpc is no more possible in litecoind”.

I let litecoin-qt running with the rpc comand line optiions (-server -rest -rpcbind, -rpcport, -rpcallowip… ). The program listen on 9332 as expected. With tring a HTTP-GET Request from a browser the server send “Json-rpc is only with post requests possible” So … i used post requests … I tried to use / not to use the parameter rpclogin in some tests …

My testing clients (curl / java) will get a tcp-connect but after/while sending the json-rpc request the litecoin.qt will just drop the tcp-connection. In detail: tcp-socket is accepted, request bytes are fullywritten - tcp socket is closedby forign host)

i send a typical json request like: {“jsonrpc”: “1.0”, “id”:“curltest”, “method”: “getblockcount”, “params”: [] }.
I tried it with different values like “2.0” , with/without params-array, different methods … noting worked for me.

Any hints?

remark: setting -debug=rpc or -debug=1 did not produce any relevant information except that socket listener was started.

so if the socket is open…connect your miner to that port


i do not “mine”. I just want to connect to the wallet via rpc to make/handle paymenta with a web-shop which i am developing. I would liketo use json-rpc to e.g. getnewadresses, get balance of the wallet , …

Connecting to that port - via curl or java-httpclient leads to a “outputstream was closed” without any bytes received…

that’s because you need to create an HD wallet in order to do commands like that I am pretty sure…the reason the http was closed is because you were connecting to a mining port…you just need to api-allow-port in your .conf file in order for that to work…your .conf file (configuration file) is what makes or breaks external calls to the server…its basically your API setup

Thank you. Your answer pointed in the right way.

I did not have that conf file. Any command line setting have been irgnored … but after having the same command settings placed in the litecoin.conf file - the server response to me …

Thank you…