<p>In bitcoin.conf, make sure you have the following lines:</p>

<pre><code>rpcuser=your-userid
rpcpassword=your-password
server=1
</code></pre>

CC BY-SA 3.0
2013-12-07T22:19:32.940Z
Hi. My current confi file looks like this:  
`rpcuser=xxxxxxxxxxxxxx  
rpcpassword=yyyyyyyyyyyyyyy  
rpcallowip=127.0.0.1  
rpcport=8332  
rpcthreads=10  
server=1`  
  
I started only with the first two lines, and then trying to fix it, added the remaining onese. But without luck.
Dimo
CC BY-SA 3.0
2013-12-07T22:25:11.910Z
That should work.  The only thing I can think of is your bitcoin.conf is not in the correct directory.  It should be in the bitcoin data directory (this directory contains wallet.dat as well as the blocks and chainstate subdirectories).
ScripterRon
CC BY-SA 3.0
2013-12-07T22:32:48.367Z
It uses this config file for sure. If I rename the file and restart the daemon, it throws an error. E.g.  `
   mv bitcoin.conf xxx.bitcoin.conf  
   kill #######  
   ./bitcoind -daemon  
   Bitcoin server starting  
   Error: To use the "-daemon" option, you must set a pcpassword in the configuration file:
   /home/thebitco/.bitcoin/bitcoin.conf
   It is recommended you use the following random password:
   ....`
Dimo
CC BY-SA 3.0
2013-12-07T22:34:44.047Z
Sorry for the bad formatting of the above, I still haven't learned how to put new lines and format code.
Dimo
CC BY-SA 3.0
2013-12-07T22:38:16.897Z
Have you tried issuing netstat to see if bitcoind is listening for connections on port 8332?  If it is, then I don't have any other suggestions.
ScripterRon
CC BY-SA 3.0
2013-12-07T22:49:24.433Z
See here. It's listening to 8333, not 8332. Is it a problem?<br/>

# netstat --ip -lpa | grep bitcoin
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 *:8333                      *:*                         LISTEN      1020484/./bitcoind
Dimo
CC BY-SA 3.0
2013-12-07T23:41:19.580Z
8333 is the port used to listen for incoming connections from peer nodes.  8332 is the port used to listen for RPC connections.  So that explains why you can't issue commands.  A possible cause is bitcoind isn't authorized to listen on port 8332.  Does your firewall or operating system restrict who can listen on particular ports?
ScripterRon
CC BY-SA 3.0
2013-12-08T11:45:08.693Z
While I'm checking the 8332 port issue with my hosting provider, I pointed the daemon against testnet, to check 18332 port (it's listening), but still no luck with sending commands to the daemon :(

netstat -lp | grep bitcoin

tcp        0      0 localhost:18332             *:*                         LISTEN      448674/./bitcoind
tcp        0      0 *:18333                     *:*                         LISTEN      448674/./bitcoind
tcp        0      0 *:18333                     *:*                         LISTEN      448674/./bitcoind
Dimo
CC BY-SA 3.0
2013-12-08T11:48:07.707Z
Does it need an opened port to accept commands from the prompt actually?
Dimo
CC BY-SA 3.0
2013-12-08T14:37:19.463Z
Yes, the RPC commands are issued using the HTTP protocol over port 8332.  Try removing the rpcallowip, rpcport and rpcthreads lines in bitcoin.conf.  I have been successful using just rpcuser, rpcpassword and server (I'm on Windows 7 though).
ScripterRon
CC BY-SA 3.0
2013-12-08T15:18:59.573Z
the daemon is now listening on 8332, but no luck accepting a command.
i changed the .conf file to contain only rpcuser, rpcpassword, and server=1.

Anyway. Thanks for your time trying to help me!
Dimo
CC BY-SA 3.0
2013-12-07T22:13:52.350Z
2013-12-07T22:13:52.350Z
ScripterRon
<p>For some reason, the daemon doesn't accept commands neither RPC, nor command-line.
I'm running the prebuild 64 version of the bitcoind. It already downloaded all blocks etc and as is happyly running in the background, however it doesn't allow any commands to be sent. For example:</p>

<pre><code>./bitcoind getinfo
error: couldn't connect to server
</code></pre>

<p>I tried with a config file having only the rpc user and pass, then I extended it with different params, and of course have restarted the daemon each time. Still - no luck.</p>

<p>The debug.log is not telling anything either. It just dumps the normal intensive communication, like…</p>

<pre><code> 2013-12-07 22:01:40 received getdata for: tx  
 593f4528895f75bcd3df12fb09eedb7e5e6659a7a8a999d7e127eb131afde417)
</code></pre>

<p>but no trace from my attempts to call a simple command.</p>

<p>I tried to google the problem without luck.</p>

<bitcoind><daemon>
the bitcoind daemon doesn't respond to commands
Dimo
# the bitcoind daemon doesn't respond to commands

(Asked by: username_0 on 2013-12-07)

For some reason, the daemon doesn't accept commands neither RPC, nor command-line.
I'm running the prebuild 64 version of the bitcoind. It already downloaded all blocks etc and as is happyly running in the background, however it doesn't allow any commands to be sent. For example:

```
./bitcoind getinfo
error: couldn't connect to server

```

I tried with a config file having only the rpc user and pass, then I extended it with different params, and of course have restarted the daemon each time. Still - no luck.

The debug.log is not telling anything either. It just dumps the normal intensive communication, like…

```
 2013-12-07 22:01:40 received getdata for: tx  
 593f4528895f75bcd3df12fb09eedb7e5e6659a7a8a999d7e127eb131afde417)

```

but no trace from my attempts to call a simple command.

I tried to google the problem without luck.

**Tags:** bitcoind, daemon


---

## 1 answers

### Answer by username_1 on 2013-12-07. Score: 1

In bitcoin.conf, make sure you have the following lines:

```
rpcuser=your-userid
rpcpassword=your-password
server=1

```

> **Comments:**
> **username_0**: Hi. My current confi file looks like this:   `rpcuser=xxxxxxxxxxxxxx   rpcpassword=yyyyyyyyyyyyyyy   rpcallowip=127.0.0.1   rpcport=8332   rpcthreads=10   server=1`      I started only with the first two lines, and then trying to fix it, added the remaining onese. But without luck.  
> **username_1**: That should work.  The only thing I can think of is your bitcoin.conf is not in the correct directory.  It should be in the bitcoin data directory (this directory contains wallet.dat as well as the blocks and chainstate subdirectories).  
> **username_0**: It uses this config file for sure. If I rename the file and restart the daemon, it throws an error. E.g.  `    mv bitcoin.conf xxx.bitcoin.conf      kill #######      ./bitcoind -daemon      Bitcoin server starting      Error: To use the "-daemon" option, you must set a pcpassword in the configuration file:    /home/thebitco/.bitcoin/bitcoin.conf    It is recommended you use the following random password:    ....`  
> **username_0**: Sorry for the bad formatting of the above, I still haven't learned how to put new lines and format code.  
> **username_1**: Have you tried issuing netstat to see if bitcoind is listening for connections on port 8332?  If it is, then I don't have any other suggestions.  
> **username_0**: See here. It's listening to 8333, not 8332. Is it a problem?<br/>  # netstat --ip -lpa | grep bitcoin (Not all processes could be identified, non-owned process info  will not be shown, you would have to be root to see it all.) tcp        0      0 *:8333                      *:*                         LISTEN      1020484/./bitcoind  
> **username_1**: 8333 is the port used to listen for incoming connections from peer nodes.  8332 is the port used to listen for RPC connections.  So that explains why you can't issue commands.  A possible cause is bitcoind isn't authorized to listen on port 8332.  Does your firewall or operating system restrict who can listen on particular ports?  
> **username_0**: While I'm checking the 8332 port issue with my hosting provider, I pointed the daemon against testnet, to check 18332 port (it's listening), but still no luck with sending commands to the daemon :(  netstat -lp | grep bitcoin  tcp        0      0 localhost:18332             *:*                         LISTEN      448674/./bitcoind tcp        0      0 *:18333                     *:*                         LISTEN      448674/./bitcoind tcp        0      0 *:18333                     *:*                         LISTEN      448674/./bitcoind  
> **username_0**: Does it need an opened port to accept commands from the prompt actually?  
> **username_1**: Yes, the RPC commands are issued using the HTTP protocol over port 8332.  Try removing the rpcallowip, rpcport and rpcthreads lines in bitcoin.conf.  I have been successful using just rpcuser, rpcpassword and server (I'm on Windows 7 though).  
> **username_0**: the daemon is now listening on 8332, but no luck accepting a command. i changed the .conf file to contain only rpcuser, rpcpassword, and server=1.  Anyway. Thanks for your time trying to help me!  

---

