# RabbitMQ startup fails because qpidd is using the same TCP port

**URL:** <https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400>\
**Category:** Chef Infra (archive)\
**Created:** [December 14, 2012, 2:03am UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400 "2012-12-14T02:03:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon94083085](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon94083085](https://discourse.chef.io/u/anon94083085)\
**Post date:** [December 14, 2012, 2:03am UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400/1 "2012-12-14T02:03:06Z")

</div>

Hi,

I tried to install rabbitmq on RHEL 6 but by default qpidd is using  
the same TCP port.

Does it make sense for the rabbitmq cookbook to stop qpidd?

Thanks,  
Ken

Transcript of issue:

starting networking  
…BOOT ERROR: FAILED  
Reason: {badmatch,  
{error,  
{shutdown,  
{child,undefined,‘rabbit\_tcp\_listener\_sup\_0.0.0.0:5672’,  
{tcp\_listener\_sup,start\_link,  
[{0,0,0,0},  
5672,  
[inet,binary,  
{packet,raw},  
{reuseaddr,true},  
{backlog,128},  
{nodelay,true},  
{exit\_on\_close,false}],  
{rabbit\_networking,tcp\_listener\_started,[amqp]},  
{rabbit\_networking,tcp\_listener\_stopped,[amqp]},  
{rabbit\_networking,start\_client,[]},  
“TCP Listener”]},  
transient,infinity,supervisor,  
[tcp\_listener\_sup]}}}}  
Stacktrace: [{rabbit\_networking,start\_listener0,4},  
{rabbit\_networking,’-start\_listener/4-lc$^0/1-0-’,4},  
{rabbit\_networking,start\_listener,4},  
{rabbit\_networking,’-boot\_tcp/0-lc$^0/1-0-’,1},  
{rabbit\_networking,boot\_tcp,0},  
{rabbit\_networking,boot,0},  
{rabbit,’-run\_boot\_step/1-lc$^1/1-1-’,1},  
{rabbit,run\_boot\_step,1}]  
{“Kernel pid terminated”,application\_controller,"{application\_start\_failure,rabbit,{bad\_return,{{rabbit,start,[normal,[]]},{‘EXIT’,{rabbit,failure\_during\_boot}}}}}"}  
[root@vm-opstest-tts rabbitmq]# ps ax | grep qppid  
7173 pts/2 S+ 0:00 grep qppid  
[root@vm-opstest-tts rabbitmq]# ps ax | grep qpidd  
4890 ? Ssl 0:00 /usr/sbin/qpidd --data-dir /var/lib/qpidd --daemon  
7190 pts/2 S+ 0:00 grep qpidd  
[root@vm-opstest-tts rabbitmq]# sudo service qpidd stop  
Stopping Qpid AMQP daemon: [OK]  
[root@vm-opstest-tts rabbitmq]# sudo chkconfig qpidd off

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [December 14, 2012, 3:02am UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400/2 "2012-12-14T03:02:55Z")

</div>

I would argue that the Qpid daemon (used by Matahari) should be either  
removed or stopped before you attempt to install Rabbit by the  
operator - if it's there, the RabbitMQ cookbook should probably not  
stop on anything already running.

You could write an intermediary cookbook to run before Rabbit fires  
off its directives that would ensure qpidd is not going to interrupt  
your flow.

Personally, I remove matahari and qpid from every system I've seen it  
on. But that's entirely up to you to decide why it's there.  
-M

On Thu, Dec 13, 2012 at 9:03 PM, Kenneth Stailey  
[kstailey.lists@gmail.com](mailto:kstailey.lists@gmail.com) wrote:

> Hi,
> 
> I tried to install rabbitmq on RHEL 6 but by default qpidd is using  
> the same TCP port.
> 
> Does it make sense for the rabbitmq cookbook to stop qpidd?
> 
> Thanks,  
> Ken
> 
> Transcript of issue:
> 
> starting networking  
> ...BOOT ERROR: FAILED  
> Reason: {badmatch,  
> {error,  
> {shutdown,  
> {child,undefined,'rabbit\_tcp\_listener\_sup\_0.0.0.0:5672',  
> {tcp\_listener\_sup,start\_link,  
> [{0,0,0,0},  
> 5672,  
> [inet,binary,  
> {packet,raw},  
> {reuseaddr,true},  
> {backlog,128},  
> {nodelay,true},  
> {exit\_on\_close,false}],  
> {rabbit\_networking,tcp\_listener\_started,[amqp]},  
> {rabbit\_networking,tcp\_listener\_stopped,[amqp]},  
> {rabbit\_networking,start\_client,},  
> "TCP Listener"]},  
> transient,infinity,supervisor,  
> [tcp\_listener\_sup]}}}}  
> Stacktrace: [{rabbit\_networking,start\_listener0,4},  
> {rabbit\_networking,'-start\_listener/4-lc$^0/1-0-',4},  
> {rabbit\_networking,start\_listener,4},  
> {rabbit\_networking,'-boot\_tcp/0-lc$^0/1-0-',1},  
> {rabbit\_networking,boot\_tcp,0},  
> {rabbit\_networking,boot,0},  
> {rabbit,'-run\_boot\_step/1-lc$^1/1-1-',1},  
> {rabbit,run\_boot\_step,1}]  
> {"Kernel pid terminated",application\_controller,"{application\_start\_failure,rabbit,{bad\_return,{{rabbit,start,[normal,]},{'EXIT',{rabbit,failure\_during\_boot}}}}}"}  
> [root@vm-opstest-tts rabbitmq]# ps ax | grep qppid  
> 7173 pts/2 S+ 0:00 grep qppid  
> [root@vm-opstest-tts rabbitmq]# ps ax | grep qpidd  
> 4890 ? Ssl 0:00 /usr/sbin/qpidd --data-dir /var/lib/qpidd --daemon  
> 7190 pts/2 S+ 0:00 grep qpidd  
> [root@vm-opstest-tts rabbitmq]# sudo service qpidd stop  
> Stopping Qpid AMQP daemon: [OK]  
> [root@vm-opstest-tts rabbitmq]# sudo chkconfig qpidd off

---

<div class="post-metadata">

**Author:** ![John\_E\_Vincent\_lusis](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@John\_E\_Vincent\_lusis](https://discourse.chef.io/u/John_E_Vincent_lusis)\
**Post date:** [December 14, 2012, 3:10am UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400/3 "2012-12-14T03:10:30Z")

</div>

What Mike said. It would be arrogant and misguided of chef to  
uninstall that package by default. Maybe you actually WANT qpid  
installed and didn't mean to assign the rabbitmq role to the node.

What ever is in your base image is your responsibility. You can either  
clean up your base image and go JeOS (which is what I do) or you can  
write a wrapper cookbook that calls another recipe that cleans it up.

Could the chef cookbook be smarter about something like that?  
Probably. It could do a check to see if anything is listening on that  
port. It could check if qpid is running. Lots of things but honestly  
none of those are the responsibility of the cookbook. The ONLY avenue  
outside of these options that might make sense is for the upstream  
package to declare a "Conflicts: qpid" in the rpm.

On Thu, Dec 13, 2012 at 9:02 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:

> I would argue that the Qpid daemon (used by Matahari) should be either  
> removed or stopped before you attempt to install Rabbit by the  
> operator - if it's there, the RabbitMQ cookbook should probably not  
> stop on anything already running.
> 
> You could write an intermediary cookbook to run before Rabbit fires  
> off its directives that would ensure qpidd is not going to interrupt  
> your flow.
> 
> Personally, I remove matahari and qpid from every system I've seen it  
> on. But that's entirely up to you to decide why it's there.  
> -M
> 
> On Thu, Dec 13, 2012 at 9:03 PM, Kenneth Stailey  
> [kstailey.lists@gmail.com](mailto:kstailey.lists@gmail.com) wrote:
> 
> > Hi,
> > 
> > I tried to install rabbitmq on RHEL 6 but by default qpidd is using  
> > the same TCP port.
> > 
> > Does it make sense for the rabbitmq cookbook to stop qpidd?
> > 
> > Thanks,  
> > Ken
> > 
> > Transcript of issue:
> > 
> > starting networking  
> > ...BOOT ERROR: FAILED  
> > Reason: {badmatch,  
> > {error,  
> > {shutdown,  
> > {child,undefined,'rabbit\_tcp\_listener\_sup\_0.0.0.0:5672',  
> > {tcp\_listener\_sup,start\_link,  
> > [{0,0,0,0},  
> > 5672,  
> > [inet,binary,  
> > {packet,raw},  
> > {reuseaddr,true},  
> > {backlog,128},  
> > {nodelay,true},  
> > {exit\_on\_close,false}],  
> > {rabbit\_networking,tcp\_listener\_started,[amqp]},  
> > {rabbit\_networking,tcp\_listener\_stopped,[amqp]},  
> > {rabbit\_networking,start\_client,},  
> > "TCP Listener"]},  
> > transient,infinity,supervisor,  
> > [tcp\_listener\_sup]}}}}  
> > Stacktrace: [{rabbit\_networking,start\_listener0,4},  
> > {rabbit\_networking,'-start\_listener/4-lc$^0/1-0-',4},  
> > {rabbit\_networking,start\_listener,4},  
> > {rabbit\_networking,'-boot\_tcp/0-lc$^0/1-0-',1},  
> > {rabbit\_networking,boot\_tcp,0},  
> > {rabbit\_networking,boot,0},  
> > {rabbit,'-run\_boot\_step/1-lc$^1/1-1-',1},  
> > {rabbit,run\_boot\_step,1}]  
> > {"Kernel pid terminated",application\_controller,"{application\_start\_failure,rabbit,{bad\_return,{{rabbit,start,[normal,]},{'EXIT',{rabbit,failure\_during\_boot}}}}}"}  
> > [root@vm-opstest-tts rabbitmq]# ps ax | grep qppid  
> > 7173 pts/2 S+ 0:00 grep qppid  
> > [root@vm-opstest-tts rabbitmq]# ps ax | grep qpidd  
> > 4890 ? Ssl 0:00 /usr/sbin/qpidd --data-dir /var/lib/qpidd --daemon  
> > 7190 pts/2 S+ 0:00 grep qpidd  
> > [root@vm-opstest-tts rabbitmq]# sudo service qpidd stop  
> > Stopping Qpid AMQP daemon: [OK]  
> > [root@vm-opstest-tts rabbitmq]# sudo chkconfig qpidd off

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [December 14, 2012, 3:13am UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400/4 "2012-12-14T03:13:35Z")

</div>

> ...or you can write a wrapper cookbook that calls another recipe that cleans it up.  
> Matt Ray put something a cookbook together for what he terms "annoyances".  
> [https://github.com/mattray/annoyances-cookbook/](https://github.com/mattray/annoyances-cookbook/)

On Thu, Dec 13, 2012 at 10:10 PM, John E. Vincent (lusis)  
[lusis.org+chef-list@gmail.com](mailto:lusis.org+chef-list@gmail.com) wrote:

> What Mike said. It would be arrogant and misguided of chef to  
> uninstall that package by default. Maybe you actually WANT qpid  
> installed and didn't mean to assign the rabbitmq role to the node.
> 
> What ever is in your base image is your responsibility. You can either  
> clean up your base image and go JeOS (which is what I do) or you can  
> write a wrapper cookbook that calls another recipe that cleans it up.
> 
> Could the chef cookbook be smarter about something like that?  
> Probably. It could do a check to see if anything is listening on that  
> port. It could check if qpid is running. Lots of things but honestly  
> none of those are the responsibility of the cookbook. The ONLY avenue  
> outside of these options that might make sense is for the upstream  
> package to declare a "Conflicts: qpid" in the rpm.
> 
> On Thu, Dec 13, 2012 at 9:02 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> 
> > I would argue that the Qpid daemon (used by Matahari) should be either  
> > removed or stopped before you attempt to install Rabbit by the  
> > operator - if it's there, the RabbitMQ cookbook should probably not  
> > stop on anything already running.
> > 
> > You could write an intermediary cookbook to run before Rabbit fires  
> > off its directives that would ensure qpidd is not going to interrupt  
> > your flow.
> > 
> > Personally, I remove matahari and qpid from every system I've seen it  
> > on. But that's entirely up to you to decide why it's there.  
> > -M
> > 
> > On Thu, Dec 13, 2012 at 9:03 PM, Kenneth Stailey  
> > [kstailey.lists@gmail.com](mailto:kstailey.lists@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > I tried to install rabbitmq on RHEL 6 but by default qpidd is using  
> > > the same TCP port.
> > > 
> > > Does it make sense for the rabbitmq cookbook to stop qpidd?
> > > 
> > > Thanks,  
> > > Ken
> > > 
> > > Transcript of issue:
> > > 
> > > starting networking  
> > > ...BOOT ERROR: FAILED  
> > > Reason: {badmatch,  
> > > {error,  
> > > {shutdown,  
> > > {child,undefined,'rabbit\_tcp\_listener\_sup\_0.0.0.0:5672',  
> > > {tcp\_listener\_sup,start\_link,  
> > > [{0,0,0,0},  
> > > 5672,  
> > > [inet,binary,  
> > > {packet,raw},  
> > > {reuseaddr,true},  
> > > {backlog,128},  
> > > {nodelay,true},  
> > > {exit\_on\_close,false}],  
> > > {rabbit\_networking,tcp\_listener\_started,[amqp]},  
> > > {rabbit\_networking,tcp\_listener\_stopped,[amqp]},  
> > > {rabbit\_networking,start\_client,},  
> > > "TCP Listener"]},  
> > > transient,infinity,supervisor,  
> > > [tcp\_listener\_sup]}}}}  
> > > Stacktrace: [{rabbit\_networking,start\_listener0,4},  
> > > {rabbit\_networking,'-start\_listener/4-lc$^0/1-0-',4},  
> > > {rabbit\_networking,start\_listener,4},  
> > > {rabbit\_networking,'-boot\_tcp/0-lc$^0/1-0-',1},  
> > > {rabbit\_networking,boot\_tcp,0},  
> > > {rabbit\_networking,boot,0},  
> > > {rabbit,'-run\_boot\_step/1-lc$^1/1-1-',1},  
> > > {rabbit,run\_boot\_step,1}]  
> > > {"Kernel pid terminated",application\_controller,"{application\_start\_failure,rabbit,{bad\_return,{{rabbit,start,[normal,]},{'EXIT',{rabbit,failure\_during\_boot}}}}}"}  
> > > [root@vm-opstest-tts rabbitmq]# ps ax | grep qppid  
> > > 7173 pts/2 S+ 0:00 grep qppid  
> > > [root@vm-opstest-tts rabbitmq]# ps ax | grep qpidd  
> > > 4890 ? Ssl 0:00 /usr/sbin/qpidd --data-dir /var/lib/qpidd --daemon  
> > > 7190 pts/2 S+ 0:00 grep qpidd  
> > > [root@vm-opstest-tts rabbitmq]# sudo service qpidd stop  
> > > Stopping Qpid AMQP daemon: [OK]  
> > > [root@vm-opstest-tts rabbitmq]# sudo chkconfig qpidd off

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [December 14, 2012, 7:13pm UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400/5 "2012-12-14T19:13:43Z")

</div>

Ohai!

On 12/13/12 7:03 PM, "Kenneth Stailey" [kstailey.lists@gmail.com](mailto:kstailey.lists@gmail.com) wrote:

> I tried to install rabbitmq on RHEL 6 but by default qpidd is using  
> the same TCP port.
> 
> Does it make sense for the rabbitmq cookbook to stop qpidd?

I think it makes more sense to have a qpid cookbook that has a disable  
recipe. It is clearer about the intent, and you can compose that with the  
rabbitmq recipe in the appropriate role.

What is installing and enabling qpidd by default? That seems weird for  
RHEL systems, don't most services _not_ start by default? It isn't  
installed by default on my base CentOS 6 system, anyway.

--  
Opscode, Inc  
Joshua Timberman, Technical Community Manager  
IRC, Skype, Twitter, Github: jtimberman

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [December 14, 2012, 7:25pm UTC](https://discourse.chef.io/t/rabbitmq-startup-fails-because-qpidd-is-using-the-same-tcp-port/3400/6 "2012-12-14T19:25:16Z")

</div>

Apparently, if you install CentOS 6.x Minimal in Graphical mode,  
Matahari & Qpidd are included.  
[http://kyotera.net/2012/02/extra-packages-in-minimal-installation-of-centos-6-2/](http://kyotera.net/2012/02/extra-packages-in-minimal-installation-of-centos-6-2/)

Gah.

On Fri, Dec 14, 2012 at 2:13 PM, Joshua Timberman [joshua@opscode.com](mailto:joshua@opscode.com) wrote:

> Ohai!
> 
> On 12/13/12 7:03 PM, "Kenneth Stailey" [kstailey.lists@gmail.com](mailto:kstailey.lists@gmail.com) wrote:
> 
> > I tried to install rabbitmq on RHEL 6 but by default qpidd is using  
> > the same TCP port.
> > 
> > Does it make sense for the rabbitmq cookbook to stop qpidd?
> 
> I think it makes more sense to have a qpid cookbook that has a disable  
> recipe. It is clearer about the intent, and you can compose that with the  
> rabbitmq recipe in the appropriate role.
> 
> What is installing and enabling qpidd by default? That seems weird for  
> RHEL systems, don't most services _not_ start by default? It isn't  
> installed by default on my base CentOS 6 system, anyway.
> 
> --  
> Opscode, Inc  
> Joshua Timberman, Technical Community Manager  
> IRC, Skype, Twitter, Github: jtimberman
