Bitcoin Forum
May 29, 2024, 11:54:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: when trying to send http requests to bitcoin core I'm being actively refused  (Read 72 times)
Stacks1959 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 17, 2023, 11:50:14 PM
 #1

Im trying to get my rpc working but when trying to send the requests im getting an error of "No connection could be made because the target machine actively refused it". I am wanting to be able to send requests from multiple locations so i read to use the allowip as 0.0.0.0
this is my .conf file:

server=1
rpcuser=-----
rpcpassword=-----
rpcallowip=0.0.0.0
rpcport=8332

Could somebody help me resolve this im new to running a node so some help would be great.
BitMaxz
Legendary
*
Offline Offline

Activity: 3262
Merit: 2979


:( My PC broke due trying to recover an old wallet


View Profile WWW
July 18, 2023, 12:16:18 AM
 #2

What do you mean by multiple locations is it in the same network? Or you are using a different server(e.g. DigitalOcean)?

You might need to add to rpcbind= on Bitcoin.conf like this sample below


Code:
server=1
rpcbind=0.0.0.0
rpcuser=-----
rpcpassword=-----
rpcallowip=192.168.1.10
rpcport=8332

The rpcallowip should be the IP where you perform RPC commands and take note after changing the bitcoin.conf file make sure to restart the daemon to apply the changes.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Stacks1959 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 18, 2023, 12:21:31 AM
 #3

yes i have tried i entered my ip where my node is running under rpcallowip but it still refuses the requests. I am trying to set up so i can send http requests.
Stacks1959 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 18, 2023, 12:28:13 AM
 #4

What would the format be for: http://login:password@ip:port
Maybe i am going wrong there? i have http://user:pass@rpcallowip:8332

i have re tried the .conf like you said and i still get the same error
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6659


Just writing some code


View Profile WWW
July 18, 2023, 01:54:42 AM
Merited by ABCbits (1)
 #5

yes i have tried i entered my ip where my node is running under rpcallowip but it still refuses the requests. I am trying to set up so i can send http requests.
You need to set rpcbind as well. rpcbind=0.0.0.0 will expose the rpc server on all interfaces, you may want to restrict that to just the interfaces that your other machines can see.

nc50lc
Legendary
*
Offline Offline

Activity: 2422
Merit: 5658


Self-proclaimed Genius


View Profile
July 18, 2023, 09:59:34 AM
 #6

i have re tried the .conf like you said and i still get the same error
Bitcoin Core has to be restarted in order for the new config to apply.

Also, are you using Bitcoind or Bitcoin-qt, have you set the data directory via the GUI?
Because depending on the setup, Bitcoin core may not be loading your bitcoin.conf file in the default data directory.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!