gdaws/stompit

Connection refused 127.0.0.1:61613

Closed this issue · 3 comments

I am facing same issue i am using node 12 v. Error: connect ECONNREFUSED 127.0.0.1:61613. Error.isTranportError() method returning true.Kindly help me out. Here is my piece of code. I am able to login via console 127.0.0.1:8161/console using below credentials.

import stompit from 'stompit'
const connectOptions = {
    'host': 'localhost',
    'port': 61613,
    'connectHeaders':{
        'host':'/',
        login: 'admin',
        passcode: 'admin'
    }
  };
stompit.connect(connectOptions, function(error, client) {
if (error) {
      console.log('connect error ' ,error,error.isProtocolError(),error.isApplicationError());
      return;
    }
})

issue fixed

issue fixed

how?

actually i was running activemq in local machine and my connecting server is in docker in my local machine. so i moved activemq to docker , and it is working fine.
Thanks.