Bitcoin Forum
November 13, 2024, 10:40:26 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can't connect to my node  (Read 288 times)
zirf45 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
July 01, 2018, 06:46:29 PM
Merited by Foxpup (2)
 #1

Hi all,

I can't connect to my node using bitcoin-cli. The node seems to be reachable from the outside since I get more than eight connections, so I think I've correctly forwarded the posts on my router. Also, https://bitnodes.earn.com/nodes/31.6.41.78-8333/ says my node is online and reachable. I can not connect through the local LAN IP and also not through the  public internet IP.
I can only find standard bitcoin entries in the bitcoind log file.


Server:
Bitcoin Client Software and Version Number: Bitcoin Core 0.16.1
Operating System: Linux / Ubuntu Server 18.04 LTS
Hardware: https://www.asrock.com/mb/Intel/Q1900-ITX/

ufw is inactive

bitcoin.conf:
Code:
server=1
daemon=1
txindex=1
disablewallet=1

# Connection settings
rpcuser=***
rpcpassword=***
rcpallowip=*
zmqpubrawblock=tcp[Suspicious link removed]cuted on the server directly:
[b][i]bitcoin-cli -getinfo[/i][/b]
[code]{
  "version": 160100,
  "protocolversion": 70015,
  "walletversion": null,
  "balance": null,
  "blocks": 530069,
  "timeoffset": 0,
  "connections": 13,
  "proxy": "",
  "difficulty": 5077499034879.017,
  "testnet": false,
  "keypoololdest": null,
  "keypoolsize": null,
  "paytxfee": null,
  "relayfee": 0.00001000,
  "warnings": ""
}


Following commands are executed from my client computer:
Bitcoin Client Software and Version Number: Bitcoin Core 0.16.1
Operating System: Linux / Arch

Try to connect using the LAN IP of the server computer:
bitcoin-cli -rpcconnect=192.168.1.80 -rpcport=8332 -rpcuser=*** -rpcpassword=*** -getinfo
Code:
error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)
I get the same error as above when trying to connect via public internet IP

connect using a bogus LAN IP, I get a different error:
bitcoin-cli -rpcconnect=192.168.1.84 -rpcport=8332 -rpcuser=*** -rpcpassword=*** -getinfo
Code:
error: couldn't connect to server: EOF reached (code 1)
(make sure server is running and you are connecting to the correct RPC port)

Any idea? Thanks!
[/code]
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
July 01, 2018, 06:55:41 PM
 #2

The RPC port is different from the network port. Make sure that you are forwarding the RPC port which is 8332 by default.

Additionally, you need to make sure that the correct IP address(es) are set for rpcallowip.

Lastly, run bitcoind with -debug=rpc and your debug.log file may contain some additional information about why you are unable to connect.

A-Bolt
Legendary
*
Offline Offline

Activity: 2335
Merit: 2384


View Profile
July 01, 2018, 07:27:17 PM
Merited by Foxpup (3), achow101 (3), xtraelv (1)
 #3

bitcoin.conf:
Code:
server=1
daemon=1
txindex=1
disablewallet=1

# Connection settings
rpcuser=***
rpcpassword=***
rcpallowip=*

Wrong:
rcpallowip=*

Correct:
rpcallowip=192.168.1.0/24
zirf45 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
July 01, 2018, 07:37:23 PM
 #4

Thank you both so much!

rpcallowip=192.168.1.0/24 <== Did the trick!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!