Author

Topic: How to allow the Bitcoind Server to listen to Port 8332 ? (Read 716 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
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.
jr. member
Activity: 56
Merit: 10
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://[email protected]: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:[email protected]: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 ?
sr. member
Activity: 336
Merit: 250
Would you be willing to buy a sealed bonnet car?
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://[email protected]: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:[email protected]: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
jr. member
Activity: 56
Merit: 10
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://[email protected]: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:[email protected]: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.
Jump to: