<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Unfortunately, I am just now seeing this --<br>
<br>
<blockquote type="cite">
<h3 class="docHeading" style="font-family: Helvetica, Arial,
sans-serif; margin: 20px 0px 0.5em; padding: 0px; color:
rgb(255, 102, 0); font-size: 1.2em; font-style: normal;
font-variant: normal; letter-spacing: normal; line-height: 18px;
orphans: 2; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); ">Issues with hostname</h3>
<p style="clear: left; color: rgb(85, 85, 85); font-family:
Verdana, sans-serif; font-size: 13px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: 18px; orphans: 2; text-align: left;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); ">RabbitMQ names the database directory using the current
hostname of the system. If the hostname changes, a new empty
database is created. To avoid data loss it's crucial to set up a
fixed and resolvable hostname. For example:</p>
<pre class="ec2_sourcecode" style="background-color: rgb(238, 238, 238); padding: 5px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); font-family: 'Courier New', Courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; ">sudo -s # become root
echo "rabbit" > /etc/hostname
echo "127.0.0.1 rabbit" >> /etc/hosts
hostname -F /etc/hostname</pre>
<span style="color: rgb(85, 85, 85); font-family: Verdana,
sans-serif; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: 18px; orphans: 2; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); display: inline !important; float: none; ">Whenever the
hostname changes you should restart RabbitMQ:</span>
<pre class="ec2_sourcecode" style="background-color: rgb(238, 238, 238); padding: 5px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); font-family: 'Courier New', Courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; ">$ /etc/init.d/rabbitmq-server restart</pre>
</blockquote>
<br>
An EC2 server running RabbitMQ (2.2.0) was rebooted and received a
new hostname, and the new database is empty.<br>
<br>
I have succeeded in getting access to the database by setting the
RABBITMQ_NODENAME var to the old hostname.<br>
<br>
Is there some way of renaming it though, so I can retain the old
database and its configuration, while still implementing the hosts
changes described above?<br>
I tried renaming the directories, but that didn't work.<br>
<br>
Or, perhaps, copy it to the new more persistent hostname? I'd
rather not have to go through the setup again.<br>
<br>
Thanks in advance,<br>
Liam<br>
<br>
<pre class="moz-signature" cols="72">--
Liam Kirsher
PGP: <a class="moz-txt-link-freetext" href="http://liam.numenet.com/pgp/">http://liam.numenet.com/pgp/</a>
</pre>
</body>
</html>