[rabbitmq-discuss] rabbitmq and invalid hostname

Tim Watson tim at rabbitmq.com
Mon Feb 25 15:27:08 GMT 2013


Hi Prabodh,

On 22 Feb 2013, at 15:44, Prabodh Upreti wrote:

> Hello
> 
> I can install/run rabbitmq perfectly fine in my normal setup.  The problem
> is when I have to install it in a box where hostname can't be validated at
> time of rpm install.   For instance, let's say host name is set as
> xyz.abc.com.
> 
> I see that in my working environment(where hostname is resolvable), database
> and log files are created as rabbit at xyz.log etc.
> 
> what happens in the above senarios where the hostname is not resolvable. Is
> the install going to work fine?  

No, I wouldn't expect it to work at all.

> Just to validate this I went ahead and
> changed the hostname to testhostname.abc.com in my rabbitmq working
> environment.  I went ahead and modified rabbitmq-evn.conf NODENAME to
> rabbit at testhostname. Getting a lot of errors.
> 

Indeed. The hostname can be changed, but it has to be resolved for the broker to run.

> The reason, I have to do all this is because I need to package everything
> before shipping to customer environment.  The hostname/FQDN specified can't
> be validated in my environment but I still need to make sure everything is
> setup correctly.

This all depends on what you mean by 'setup' - are you wanting to configure queues,
exchanges and bindings on you machine and make these available at the install-site
later on? If so, you could export these definitions from your machine and make
them available at startup (or just once using the admin cli) using the RabbitMQ
management plugin: see http://www.rabbitmq.com/management.html for details.

>  The customer is just going to put it in their environment
> and everything should work fine.  I would appreciate some guidance from you.
> Thank you.
> 

Why can't you package the .rpm along with the pre-requisites and deal with
this by having a sequence of actions that run at the install site:

1. unpack the rpm and install it directly
2. unpack the configuration settings/changes and apply them

Or something like that?

Of course, you can override the various locations of things using the advice
specified in http://rabbitmq.com/relocate.html. You're not going to get far with
an unresolved hostname.



More information about the rabbitmq-discuss mailing list