error in create channel function

3,824 views
Skip to first unread message

Divneet singh

unread,
Oct 18, 2015, 8:17:24 AM10/18/15
to rabbitmq-users
hey ,
i'm a newbie to rabbitmq , so while following these tutorials and  i'm trying to execute the hello world i'm getting this error ,

conn.createChannel(function(err, ch) {
      ^
TypeError: Cannot read property 'createChannel' of undefined
(screen shot of the error attached)

was wondering if anyone could help me out and tell me where am i going wrong ,

thanks ,
Divneet
rabbitmq_error.png

Michael Klishin

unread,
Oct 18, 2015, 8:19:51 AM10/18/15
to rabbitm...@googlegroups.com, Divneet singh
This means there was a connection error. See the err argument to the callback.

Also see RabbitMQ log files. They will contain connection entries that
should provide a clue.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


SEBASTIAN NALKARA

unread,
Jan 13, 2017, 7:19:12 AM1/13/17
to rabbitmq-users, divnee...@gmail.com
If Rabbitmq is on local machine as your client client code then use "localhost" instead of IP address. This because default Admin user "guest" connection is limited to localhost. Alternate is create a new admin user and 
send those credentials with IP address.
If rabbit mq is on remote machine. Create a new admin user and use those creditials in the following format n connect method amqp.connect()

"amqp://username:password@hostName:portNumber/



Regards,
sebastian.

Jawahar

unread,
Jun 22, 2017, 9:41:21 PM6/22/17
to rabbitmq-users, divnee...@gmail.com
Thanks Sebastian!

In my case when specify the AMQP port number in the amqp URI, it worked.
"amqp://hostName:5672"

-Jawahar

Chandra Chevuru

unread,
Jan 23, 2018, 2:22:10 PM1/23/18
to rabbitmq-users
Thanks SEBASTIAN!
Reply all
Reply to author
Forward
0 new messages