Mnesia error preventing install

135 views
Skip to first unread message

Ryan Auger

unread,
Jul 11, 2017, 12:19:23 PM7/11/17
to rabbitmq-users
Hello all,


When I run :  sudo apt-get install rabbitmq-server

I encounter the error:

Unpacking rabbitmq-server (3.6.10-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up rabbitmq-server (3.6.10-1) ...
 * Starting message broker rabbitmq-server                                                                                   * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
                                                                                                                     [fail]
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing package rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)



When I inspect the error logs, it says the problem was with starting mnesia:


BOOT FAILED
===========

Error description:
   {could_not_start,mnesia,{killed,{mnesia_sup,start,[normal,[]]}}}

Log files (may contain more information):
   /var/log/rabbitmq/rab...@usr-VirtualBox.log
   /var/log/rabbitmq/rab...@usr-VirtualBox-sasl.log

{"init terminating in do_boot",{could_not_start,mnesia,{killed,{mnesia_sup,start,[normal,[]]}}}}


Any idea what it could be ?

Michael Klishin

unread,
Jul 11, 2017, 1:12:02 PM7/11/17
to rabbitm...@googlegroups.com
This particular line doesn't reveal much. Most likely Mnesia failed to initialize
or start but we don't know why.

Consider posting full server logs. If this is a new or development environment
installation, try purging the package (or wiping Rabbit node's directory).

The package should set up its directory with sufficient permissions and correct
ownership in most cases but that's another thing that comes to mind with the
amount of information provided.

Ryan Auger

unread,
Jul 11, 2017, 1:22:21 PM7/11/17
to rabbitmq-users
I just now sudo apt-get purge rabbitmq-server, re installed, and got the same error:

Here are my logs:

From rab...@user-Virtualbox.log:

=INFO REPORT==== 11-Jul-2017::13:03:06 ===
Error description:
   {aborted,undef}


Log files (may contain more information):
   /var/log/rabbitmq/rab...@ryan-VirtualBox.log
   /var/log/rabbitmq/rab...@ryan-VirtualBox-sasl.log

Stack trace:
   [{mnesia,abort,1,[{file,"mnesia.erl"},{line,313}]},
    {rabbit_node_monitor,legacy_cluster_nodes,1,
                         [{file,"src/rabbit_node_monitor.erl"},{line,801}]},
    {rabbit_node_monitor,prepare_cluster_status_files,0,
                         [{file,"src/rabbit_node_monitor.erl"},{line,121}]},
    {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,283}]},
    {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
    {init,start_it,1,[]},
    {init,start_em,1,[]}]


from

Michael Klishin

unread,
Jul 11, 2017, 2:26:07 PM7/11/17
to rabbitm...@googlegroups.com
"undef" means "undefined", "a function definition isn't found."

Debian and Ubuntu slice and dice Erlang/OTP into a lot of packages. It can
be that some are missing on your system.

You can install 19.3 (assuming you are installing a recent version, e.g. from rabbitmq.com's apt repo)
from the Erlang Solutions repository, see http://www.rabbitmq.com/install-debian.html.

On Tue, Jul 11, 2017 at 8:22 PM, Ryan Auger <rau...@g.clemson.edu> wrote:
I just now sudo apt-get purge rabbitmq-server, re installed, and got the same error:

Here are my logs:

From rab...@user-Virtualbox.log:

=INFO REPORT==== 11-Jul-2017::13:03:06 ===
Error description:
   {aborted,undef}

Log files (may contain more information):
   /var/log/rabbitmq/rabbit@ryan-VirtualBox.log
   /var/log/rabbitmq/rabbit@ryan-VirtualBox-sasl.log


Stack trace:
   [{mnesia,abort,1,[{file,"mnesia.erl"},{line,313}]},
    {rabbit_node_monitor,legacy_cluster_nodes,1,
                         [{file,"src/rabbit_node_monitor.erl"},{line,801}]},
    {rabbit_node_monitor,prepare_cluster_status_files,0,
                         [{file,"src/rabbit_node_monitor.erl"},{line,121}]},
    {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,283}]},
    {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
    {init,start_it,1,[]},
    {init,start_em,1,[]}]


from

On Tuesday, July 11, 2017 at 1:12:02 PM UTC-4, Michael Klishin wrote:
This particular line doesn't reveal much. Most likely Mnesia failed to initialize
or start but we don't know why.

Consider posting full server logs. If this is a new or development environment
installation, try purging the package (or wiping Rabbit node's directory).

The package should set up its directory with sufficient permissions and correct
ownership in most cases but that's another thing that comes to mind with the
amount of information provided.

> On 11 Jul 2017, at 19:19, Ryan Auger <rau...@g.clemson.edu> wrote:
>
> {"init terminating in do_boot",{could_not_start,mnesia,{killed,{mnesia_sup,start,[normal,[]]}}}}

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Ryan Auger

unread,
Jul 12, 2017, 8:54:59 AM7/12/17
to rabbitmq-users
Michael,

 I have Erlang 19.2 installed using kerl. Is this not a high enough version?

Thanks,
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Luke Bakken

unread,
Jul 12, 2017, 10:03:22 AM7/12/17
to rabbitmq-users
Hi Ryan,

That version is fine. Is your kerl installed Erlang used system-wide? Could you please provide the output of which -a erl from your system, running it as both your normal user and the rabbitmq user?

Thanks -
Luke

Michael Klishin

unread,
Jul 12, 2017, 10:41:12 AM7/12/17
to rabbitm...@googlegroups.com
Hi Ryan,

19.2 is perfectly fine for RabbitMQ versions starting with 3.6.4.
You can find the list of supported versions on http://www.rabbitmq.com/which-erlang.html.

I concur with Luke, `kerl` is a great tool and we use it quite a bit ourselves but unless you activate
it in shell profile or similar, system-wide Erlang will kick in in some cases, creating an
opportunity for confusion.


To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ryan Auger

unread,
Jul 12, 2017, 11:11:50 AM7/12/17
to rabbitmq-users
Luke,

I believe I can verify my erlang version by running the erlang terminal:
ryan@ryan-VirtualBox:~/repos$ erl
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]

Eshell V8.2  (abort with ^G)

As for kerl:

which -a kerl
/usr/local/bin/kerl
 kerl list installations
19.2 /home/ryan/kerl/19.2

Then, for sanity's sake I can purge and rebuild :

ryan@ryan-VirtualBox:~/repos$ . /home/ryan/kerl/19.2/activate
ryan@ryan-VirtualBox:~/repos$ sudo apt-get purge rabbitmq-server

Then, when I try to apt-get install I get the same error again



Luke Bakken

unread,
Jul 13, 2017, 10:22:46 AM7/13/17
to rabbitmq-users
Hi Ryan,

When installed from packages and started by the system start scripts, RabbitMQ runs as the rabbitmq user, who has no knowledge of your Erlang installation in /home/ryan/kerl/19.2

So, to verify the Erlang VM being used by the rabbitmq user, you'll have to run erl as that user:

sudo su - rabbitmq
erl

Ryan Auger

unread,
Jul 13, 2017, 10:51:48 AM7/13/17
to rabbitmq-users
Hi Luke,

Here it is, you were right, however, it didn't affect anything when I changed over:

sudo su - rabbitmq
[sudo] password for ryan:
ryan@ryan-VirtualBox:~$ erl
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]

Eshell V7.2  (abort with ^G)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution

ryan@ryan-VirtualBox:~$ . /home/ryan/kerl/19.2/activate

When I run sudo apt-get install rabbitmq-server, I get the same error log again:

BOOT FAILED
===========


Error description:
   {aborted,undef}

Log files (may contain more information):
   /var/log/rabbitmq/rab...@ryan-VirtualBox.log
   /var/log/rabbitmq/rab...@ryan-VirtualBox-sasl.log


Stack trace:
   [{mnesia,abort,1,[{file,"mnesia.erl"},{line,313}]},
    {rabbit_node_monitor,legacy_cluster_nodes,1,
                         [{file,"src/rabbit_node_monitor.erl"},{line,801}]},
    {rabbit_node_monitor,prepare_cluster_status_files,0,
                         [{file,"src/rabbit_node_monitor.erl"},{line,121}]},
    {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,283}]},
    {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
    {init,start_it,1,[]},
    {init,start_em,1,[]}]

{"init terminating in do_boot",{aborted,undef}}




Luke Bakken

unread,
Jul 13, 2017, 10:59:56 AM7/13/17
to rabbitmq-users
Hi Ryan -

kerl only modifies the current shell environment. It has no way to modify future shell environments for the rabbitmq user or your system Erlang, which is what is being used when you run sudo apt-get install rabbitmq-server

What you need to do is use your system's package manager (not kerl!) to remove the currently installed Erlang and install one that includes all of the libraries necessary for RabbitMQ

The easiest solution would be to download the correct package from here and install it using dpkg:



On Thursday, July 13, 2017 at 7:51:48 AM UTC-7, Ryan Auger wrote:
Hi Luke,

Here it is, you were right, however, it didn't affect anything when I changed over:

sudo su - rabbitmq
[sudo] password for ryan:
ryan@ryan-VirtualBox:~$ erl
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]

Eshell V7.2  (abort with ^G)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution

ryan@ryan-VirtualBox:~$ . /home/ryan/kerl/19.2/activate

When I run sudo apt-get install rabbitmq-server, I get the same error log again:

BOOT FAILED
===========

Error description:
   {aborted,undef}

Log files (may contain more information):
   /var/log/rabbitmq/rabbit@ryan-VirtualBox.log
   /var/log/rabbitmq/rabbit@ryan-VirtualBox-sasl.log

Ryan Auger

unread,
Jul 13, 2017, 11:19:39 AM7/13/17
to rabbitmq-users
Luke,

It works!

Thanks for taking the time to help me with that!

Michael Klishin

unread,
Jul 13, 2017, 11:30:29 AM7/13/17
to rabbitm...@googlegroups.com
I second Luke's advice to use Erlang Solutions apt repo (or .deb packages with dpkg, if this
is your cup of tea). kerl is suitable tool for active development or testing on a particular version
but arguably not meant to be used to provision Erlang/OTP system-wide, even though
you can set it up that way technically.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages