<p>You should try adding <code>daemon=1</code> to your <code>bitcoin.conf</code> file.</p>

CC BY-SA 3.0
2017-01-30T00:34:01.207Z
2017-01-31T18:17:48.763Z
2017-01-31T18:17:48.763Z
Carlos De la Garza
<p>I'm trying to put up a simple system for some penetration tests.
I have an Ubuntu server 16.04.1 with apache2 and bitcoin.
all running "Hiddn service" through tor (and bitcoind proxied 127.0.0.1:9050).
Now, using easybitcoin.php , the apache shows getinfo, send receive, all good.
but using bitcoin-cli nothing works! "couldn't connect to server"..</p>

<pre><code>my bitcoin.conf is:
server=1
listen=1
proxy=127.0.0.1:9050
rpcuser=myuser
rpcpassword=mypassword
</code></pre>

<p>Any ideas why bitcoin-cli can't connect?</p>

CC BY-SA 3.0
2016-12-19T09:56:39.560Z
Did you try using the rpcuser and password params from the cli
Shabahat M. Ayubi
CC BY-SA 3.0
2016-12-19T11:16:37.340Z
yes, same error.
Guy Dresher
CC BY-SA 3.0
2016-12-19T14:08:01.690Z
how do you run bitcoind? with regtest?
Badr Bellaj
CC BY-SA 3.0
2016-12-19T17:24:49.797Z
no, just with it's conf file, no parameters. in crontab on boot.
Guy Dresher
CC BY-SA 3.0
2016-12-20T22:23:35.737Z
Try issuing the command netstat -tulpn | grep bitcoin and report back what it returns
Shabahat M. Ayubi
CC BY-SA 3.0
2016-12-22T16:23:19.773Z
tcp        0      0 0.0.0.0:8333            0.0.0.0:*               LISTEN      1233/bitcoind
tcp6       0      0 ::1:8332                :::*                    LISTEN      1233/bitcoind
tcp6       0      0 :::8333                 :::*                    LISTEN      1233/bitcoind
Guy Dresher
<bitcoind><ubuntu><php><bitcoin-cli>
bitcoin-cli can't connect to server
Guy Dresher
# bitcoin-cli can't connect to server

(Asked by: username_0 on 2016-12-19)

I'm trying to put up a simple system for some penetration tests.
I have an Ubuntu server 16.04.1 with apache2 and bitcoin.
all running "Hiddn service" through tor (and bitcoind proxied 127.0.0.1:9050).
Now, using easybitcoin.php , the apache shows getinfo, send receive, all good.
but using bitcoin-cli nothing works! "couldn't connect to server"..
my bitcoin.conf is:
server=1
listen=1
proxy=127.0.0.1:9050
rpcuser=myuser
rpcpassword=mypassword

Any ideas why bitcoin-cli can't connect?

**Tags:** bitcoind, ubuntu, php, bitcoin-cli

> **Comments:**
> **username_1**: Did you try using the rpcuser and password params from the cli  
> **username_0**: yes, same error.  
> **username_2**: how do you run bitcoind? with regtest?  
> **username_0**: no, just with it's conf file, no parameters. in crontab on boot.  
> **username_1**: Try issuing the command netstat -tulpn | grep bitcoin and report back what it returns  
> **username_0**: tcp        0      0 0.0.0.0:8333            0.0.0.0:*               LISTEN      1233/bitcoind tcp6       0      0 ::1:8332                :::*                    LISTEN      1233/bitcoind tcp6       0      0 :::8333                 :::*                    LISTEN      1233/bitcoind  

---

## 1 answers

### Answer by username_3 on 2017-01-30. Score: -2

You should try adding `daemon=1` to your `bitcoin.conf` file.


---

