Error: connect ECONNREFUSED 127.0.0.1:8332

0

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'
});

ngCourse

Posted 2018-03-21T06:19:42.300

Reputation: 101

Can you post the contents of your bitcoin.conf file (censoring any passwords as necessary)?Andrew Chow 2018-03-21T19:52:42.870

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 2018-03-22T09:55:38.133

Answers

0

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

Anyway thanks**

ngCourse

Posted 2018-03-21T06:19:42.300

Reputation: 101

0

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

zhiyan114

Posted 2018-03-21T06:19:42.300

Reputation: 528