title: Could not connect to rabbitmq broker via nodejs client
body: <p>I am using amqplib to create amqp clients. it works fine when running on localhost, but when I change it to the server's IP address 192.168.1.44, I get an error that indicates the conn object is undefined.</p>
  
  <p>this is the client's code</p>
  
  <pre><code>var amqp = require('amqplib/callback_api');
  amqp.connect('amqp://guest:guest@192.168.1.44:5672', function(err, conn) { 
      conn.createChannel(function(err, ch) {
      var q = 'hello';
      ch.assertQueue(q, {durable: false});
      console.log(" [*] Waiting for messages in %s. To exit press CTRL+C", q);
      ch.consume(q, function(msg) {
      console.log(" [x] Received %s", msg.content.toString());
      }, {noAck: true});
    });
  });
  </code></pre>
  
  <p>and this is the error message</p>
  
  <pre><code>/home/pi/Desktop/mqtt_example/receive.js:14
  conn.createChannel(function(err, ch) {
      ^
  
  TypeError: Cannot read property 'createChannel' of undefined
     at /home/pi/Desktop/mqtt_example/receive.js:14:5
     at /home/pi/Desktop/mqtt_example/node_modules/amqplib/callback_api.js:16:10
     at /home/pi/Desktop/mqtt_example/node_modules/amqplib/lib/connect.js:164:12
     at bail (/home/pi/Desktop/mqtt_example/node_modules/amqplib/lib/connection.js:176:5)
     at afterStartOk (/home/pi/Desktop/mqtt_example/node_modules/amqplib/lib/connection.js:219:7)
     at /home/pi/Desktop/mqtt_example/node_modules/amqplib/lib/connection.js:160:12
     at Socket.recv (/home/pi/Desktop/mqtt_example/node_modules/amqplib/lib/connection.js:498:12)
     at Object.onceWrapper (events.js:314:30)
     at emitNone (events.js:105:13)
     at Socket.emit (events.js:207:7)
     at emitReadable_ (_stream_readable.js:502:10)
     at emitReadable (_stream_readable.js:496:7)
     at addChunk (_stream_readable.js:263:7)
     at readableAddChunk (_stream_readable.js:239:11)
     at Socket.Readable.push (_stream_readable.js:197:10)
     at TCP.onread (net.js:588:20)
  </code></pre>