Bitcoin Forum
May 13, 2024, 02:31:25 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to allow the Bitcoind Server to listen to Port 8332 ?  (Read 686 times)
chegmarco (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 10


View Profile
May 04, 2017, 11:53:10 AM
 #1

How do I make the Bitcoind server listen to or link to the 8332 port of my Linux distribution via "netstat"? Because I noticed that this is because the Bitcoin does not listen to 8332 as I get the error below:

Quote
Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: HTTP request failed! HTTP/1.0 401 Unauthorized in /home/cheg/Downloads/piwallet/jsonRPCClient.php on line 133

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://cheg:chego1@127.0.0.1:8332/' in /home/cheg/Downloads/piwallet/jsonRPCClient.php:141 Stack trace: #0 /home/cheg/Downloads/piwallet/classes/Client.php(17): jsonRPCClient->__call('getbalance', Array) #1 /home/cheg/Downloads/piwallet/classes/Client.php(17): jsonRPCClient->getbalance('zelles(chegadmi...', 6) #2 /home/cheg/Downloads/piwallet/index.php(22): Client->getBalance('chegadmin') #3 {main} thrown in /home/cheg/Downloads/piwallet/jsonRPCClient.php on line 141

So help me link the "Bitcoind" to 8332 with Netstat please.
1715567485
Hero Member
*
Offline Offline

Posts: 1715567485

View Profile Personal Message (Offline)

Ignore
1715567485
Reply with quote  #2

1715567485
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715567485
Hero Member
*
Offline Offline

Posts: 1715567485

View Profile Personal Message (Offline)

Ignore
1715567485
Reply with quote  #2

1715567485
Report to moderator
bitfawkes
Sr. Member
****
Offline Offline

Activity: 336
Merit: 250

Would you be willing to buy a sealed bonnet car?


View Profile
May 04, 2017, 04:02:34 PM
 #2

How do I make the Bitcoind server listen to or link to the 8332 port of my Linux distribution via "netstat"? Because I noticed that this is because the Bitcoin does not listen to 8332 as I get the error below:

Quote
Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: HTTP request failed! HTTP/1.0 401 Unauthorized in /home/cheg/Downloads/piwallet/jsonRPCClient.php on line 133

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://cheg:chego1@127.0.0.1:8332/' in /home/cheg/Downloads/piwallet/jsonRPCClient.php:141 Stack trace: #0 /home/cheg/Downloads/piwallet/classes/Client.php(17): jsonRPCClient->__call('getbalance', Array) #1 /home/cheg/Downloads/piwallet/classes/Client.php(17): jsonRPCClient->getbalance('zelles(chegadmi...', 6) #2 /home/cheg/Downloads/piwallet/index.php(22): Client->getBalance('chegadmin') #3 {main} thrown in /home/cheg/Downloads/piwallet/jsonRPCClient.php on line 141

So help me link the "Bitcoind" to 8332 with Netstat please.
I'm not sure to full understand your problem but if you put this row of code in /home/user/.bitcoin/bitcoin.conf it should works as you want

Code:
rpcport=8332
daemon=1

goditela Wink

Sometimes people who no one imagined could do certain things, those who do things that no one can imagine.
chegmarco (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 10


View Profile
May 04, 2017, 04:40:58 PM
 #3

How do I make the Bitcoind server listen to or link to the 8332 port of my Linux distribution via "netstat"? Because I noticed that this is because the Bitcoin does not listen to 8332 as I get the error below:

Quote
Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: HTTP request failed! HTTP/1.0 401 Unauthorized in /home/cheg/Downloads/piwallet/jsonRPCClient.php on line 133

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://cheg:chego1@127.0.0.1:8332/' in /home/cheg/Downloads/piwallet/jsonRPCClient.php:141 Stack trace: #0 /home/cheg/Downloads/piwallet/classes/Client.php(17): jsonRPCClient->__call('getbalance', Array) #1 /home/cheg/Downloads/piwallet/classes/Client.php(17): jsonRPCClient->getbalance('zelles(chegadmi...', 6) #2 /home/cheg/Downloads/piwallet/index.php(22): Client->getBalance('chegadmin') #3 {main} thrown in /home/cheg/Downloads/piwallet/jsonRPCClient.php on line 141

So help me link the "Bitcoind" to 8332 with Netstat please.
I'm not sure to full understand your problem but if you put this row of code in /home/user/.bitcoin/bitcoin.conf it should works as you want

Code:
rpcport=8332
daemon=1

goditela Wink

Thanks for your answer but I would like to know if you tried with rpcport=8332 ? And it worked ?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
May 04, 2017, 05:15:42 PM
 #4

The fact that you are getting an HTTP 401 error from connecting to port 8332 means that something (probably bitcoind) is listening on that port and can understand http. Thus bitcoind the issue is likely not related to bitcoind not connecting to the port but rather that you have configured it incorrectly.

You will get a HTTP 401 Unauthorized error if you do not have the "authorization" header or if the username/password in your auth header is incorrect. For the latter case, if you look in the debug.log file for Bitcoin Core, you will see a line like this:
Code:
ThreadRPCServer incorrect password attempt from 127.0.0.1
for each attempt at connecting.

Make sure that you are actually sending the username and password correctly and that what you set as username and password is the same thing as you have set in your bitcoin.conf file.

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!