<p>I hadn't started bitcored service ..that's why this error occurs
when I started, the error had gone</p>

<p>i followed these steps that given <a href="https://bitcore.io/start" rel="nofollow noreferrer">here</a></p>

<p>Anyway thanks**</p>

CC BY-SA 4.0
2020-03-04T04:24:26.167Z
The link is dead. Can you please write steps here so links won't be used.
LeanMan
CC BY-SA 3.0
2018-03-22T06:23:20.633Z
2018-03-22T06:23:20.633Z
Shashwat Gupta
<p>Bitcoin json rpc requires bitcoin core to actually start for it to work and won't work if it turn off</p>

CC BY-SA 4.0
2018-05-23T01:33:38.623Z
2018-05-23T01:33:38.623Z
zhiyan114
<p>I get this error:</p>

<pre><code>{ Error: connect ECONNREFUSED 127.0.0.1:8332
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 8332 }
</code></pre>

<p>when I use this code:</p>

<pre><code>var bitcoin = require('bitcoin');
var client = new bitcoin.Client({
    host: 'localhost',
    port: 8332,
    user: 'Rohit',
    pass: '12345'
});
</code></pre>

CC BY-SA 3.0
2018-03-21T19:52:42.870Z
Can you post the contents of your bitcoin.conf file (censoring any passwords as necessary)?
Ava Chow
CC BY-SA 3.0
2018-03-22T09:55:38.133Z
Welcome to Bitcoin.SE! You can help the site by marking answers as accepted if they are correct and address the question so that the question does not remain as "unanswered".
Willtech
<bitcoind>
Error: connect ECONNREFUSED 127.0.0.1:8332
Shashwat Gupta
# Error: connect ECONNREFUSED 127.0.0.1:8332

(Asked by: username_0 on 2018-03-21)

I get this error:

```
{ Error: connect ECONNREFUSED 127.0.0.1:8332
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 8332 }

```

when I use this code:

```
var bitcoin = require('bitcoin');
var client = new bitcoin.Client({
    host: 'localhost',
    port: 8332,
    user: 'Rohit',
    pass: '12345'
});

```

**Tags:** bitcoind

> **Comments:**
> **username_1**: Can you post the contents of your bitcoin.conf file (censoring any passwords as necessary)?  
> **username_2**: Welcome to Bitcoin.SE! You can help the site by marking answers as accepted if they are correct and address the question so that the question does not remain as "unanswered".  

---

## 2 answers

### Answer by username_0 on 2018-03-22. Score: 1

I hadn't started bitcored service ..that's why this error occurs
when I started, the error had gone

i followed these steps that given [here](https://bitcore.io/start)

Anyway thanks\*\*

> **Comments:**
> **username_3**: The link is dead. Can you please write steps here so links won't be used.  

---

### Answer by username_4 on 2018-05-23. Score: 0

Bitcoin json rpc requires bitcoin core to actually start for it to work and won't work if it turn off


---

