Author

Topic: bitcoind testnet rpc is no longer working (Read 1596 times)

member
Activity: 112
Merit: 10
Do you moo?
January 31, 2014, 01:18:23 AM
#5
Because the default port for testnet is 18332  Smiley

jlp
sr. member
Activity: 266
Merit: 264
January 30, 2014, 02:43:42 PM
#4
The other problem was using 127.0.0.1:8332 which didn't work, but localhost:8332 did work

I'm having a similar problem.  I'm running Bitcoin-QT on my Mac.  The following command in terminal works when I'm running Bitcoin-QT in mainnet:

curl --user bituser --data-binary '{"id":"t0", "method": "getinfo", "params": [] }' http://127.0.0.1:8332/

But I get 'curl: (7) couldn't connect to host' when I'm running Bitcoin-QT in testnet mode.  I've tried the following but it still does not work in testnet mode:

curl --user bituser --data-binary '{"id":"t0", "method": "getinfo", "params": [] }' http://localhost:8332/

My Library\Application Support\Bitcoin\bitcoin.conf file has the following:

rpcuser=bituser
rpcpassword=password
server=1
testnet = 1


I've put a copy of this bitcoin.conf file into the Library\Application Support\Bitcoin\testnet3 folder, but this does not fix the problem.

Does anyone have any suggestions?

Update:  I just got it to work by adding the following to bitcoin.conf.  I don't know why this is needed for testnet but not mainnet.

rpcport=8332
mav
full member
Activity: 169
Merit: 107
September 29, 2012, 09:08:11 PM
#3
Can it be that the current official release has 8332 as RPC port, even on testnet, did you try that?
The commit to change the default RPC port to 18332 was just recently merged to Github master.

Dia


https://github.com/bitcoin/bitcoin/pull/1862

Yes the rpc port is still on port 8332, lsof confirmed this.

The other problem was using 127.0.0.1:8332 which didn't work, but localhost:8332 did work

Thanks for the clarification Diapolo.
hero member
Activity: 772
Merit: 500
September 29, 2012, 06:08:17 AM
#2
Can it be that the current official release has 8332 as RPC port, even on testnet, did you try that?
The commit to change the default RPC port to 18332 was just recently merged to Github master.

Dia
mav
full member
Activity: 169
Merit: 107
September 28, 2012, 09:19:10 PM
#1
I'm trying to make a connection to bitcoind testnet but it fails with 'curl: (7) couldn't connect to host'

It used to work, but now it does not. I can connect to non-testnet without issues.

I noticed that I have a new folder in my .bitcoin directory called 'testnet3' - I put my old certificate and key files in that new directory for ssl (although both ssl and non-ssl rpc is broken for me on testnet). The certificate and key file is in .bitcoin and .bitcoin/testnet and .bitcoin/testnet3 so I am sure the file is not the problem.

When I try to connect with or without ssl to testnet via curl I get the response in the first line of this post.

Here is my command to testnet which does not work: (change port to 8332 and the commands work for me with non-testnet)

non-ssl
curl --user bob --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.7:18332/

ssl
curl --user bob --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' https://127.0.0.7:18332/ -k

Any ideas why this is no longer working? Can anyone else confirm rpc is not working for testnet? Am I missing something obvious here and just need a sanity check?

Bitcoin version from getinfo is 70003
Jump to: