Monday, January 17, 2011

Issue on starting RabbitMQ 2.2.0 After Installation via MacPorts

I used MacPorts to install RabbitMq 2.2.0 on  my Mc OS X (Snow Leopard) laptop. After installing I tried running the command sudo rabbitmq-server and I get an error saying there's already a rabbitmq process running. The startupitem.log from /opt/local/var/log/rabbitmq indicated the broker started successfully, using the domain localhost. I was expecting it to use the domain mycomputername since that is what i have configured in my /etc/hosts file. I cannot connect to the node rabbit@mycomputername when I try to run the command rabbitmqctl. Somehow rabbitmq-server is using localhost domain while rabbitmqctl is using mycomputername domain.

Did more digging and found out that the daemon generated by MacPorts after it installed RabbitMQ was getting spawned when my computer starts up. But the problem is it's using localhost as the domain instead of mycomputername. When I try to kill that spawned process, rabbitmq automatically re-starts and now using the node rabbit@mycomputername. So I can now use rabbitmqctl command and query the rabbitmq server. To permanently fix the issue, I have to remove the plist file org.macports.rabbitmq-server.plit which defines the start/stop behavior of rabbitmq-server which is registered as a global daemon process that will automatically kick-off when my computer boots up.

After removing the plist file, and manually starts rabbitmq by typing sudo rabbitmq-server, I no longer see any errors. I wasn't sure why MacPorts generated that plist file that always uses localhost as it's domain instead of mycomputername when it starts rabbitmq-server initially.

If your erl_crash.dump file contains the string below you might have the same problem. Either check to see if you have configured your /etc/hosts file properly or that you are having the exact same problem I just came across with.


no_hosts_file
'Warning: No HOSTSFILE specified!'
address
'Warning: No NAMESERVER or RESOLVFILE specified!'

Glad I can start playing around with RabbitMQ!

5 comments:

  1. Hi! This is my 1st comment here so I just wanted to give a quick shout out and say I truly enjoy reading your blog posts.
    Can you recommend any other blogs/websites/forums that cover the
    same topics? Many thanks!

    My website :: mypinoyvideos.net
    Here is my website : asphalt driveway

    ReplyDelete
  2. Wow! This blog looks just like my old one! It's on a completely different topic but it has pretty much the same page layout and design. Outstanding choice of colors!

    Here is my blog post strec

    ReplyDelete
  3. Hello! I realize this is somewhat off-topic however I had to ask.
    Does running a well-established website like yours take a massive
    amount work? I am brand new to writing a blog however I do write in my journal everyday.
    I'd like to start a blog so I can share my personal experience and feelings online. Please let me know if you have any kind of recommendations or tips for brand new aspiring blog owners. Appreciate it!

    Also visit my page ... stump removal

    ReplyDelete
  4. Hi there! I'm at work surfing around your blog from my new apple iphone! Just wanted to say I love reading your Blog and look forward to all your posts! Carry on the superb work!

    ReplyDelete
  5. My coder is trying to persuade me to move
    to .net from PHP. I have always disliked the idea because of the expenses.

    But he's tryiong none the less. I've been using Movable-type on various websites for about
    a year and am worried about switching to another platform.
    I have heard fantastic things about blogengine.net. Is there a way I
    can import all my wordpress posts into it? Any help would be greatly appreciated!


    Look into my blog post: stumps

    ReplyDelete