I get this error:

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

when I use this code:

var bitcoin = require('bitcoin');
var client = new bitcoin.Client({
    host: 'localhost',
    port: 8332,
    user: 'Rohit',
    pass: '12345'
  • Can you post the contents of your bitcoin.conf file (censoring any passwords as necessary)?
    – Andrew Chow
    Mar 21 '18 at 19:52
  • 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
    Mar 22 '18 at 9:55

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**

  • The link is dead. Can you please write steps here so links won't be used.
    – LeanMan
    Mar 4 '20 at 4:24

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.