Erlang/OTP Forums

Author Message

<  RabbitMQ mailing list  ~  Problem running rabbit broker

Guest
Posted: Sun Jun 01, 2008 3:12 pm Reply with quote
Guest
hi devs,

I downloaded tarball of rabbit server and follow the installation guide. I've created a directory for MNESIA_BASE in /var/lib/rabbitmq/mnesia/ and left other default.
But once I try to start the broker it gives me this error, and as a new user to RabbitMQ I have no idea about what Mnesia database is. In the installation guide it tells like this
Defaults to /var/lib/rabbitmq/mnesia. Set this to the directory where Mnesia database files should be placed.
Guest
Posted: Sun Jun 01, 2008 3:31 pm Reply with quote
Guest
RabbitMQ will create the database files itself; you don't need to do anything besides ensure the directory is there with the appropriate privileges (i.e. it is writable for the process that starts RabbitMQ). More specifically, ensure that /var/lib/rabbitmq and all its subdirectories are writable by the process that starts RabbitMQ.

However, you need to post more information to get effective help. Saying you got "this error" without posting the error message itself is not going to yield useful responses from the mailing list.

Information you should post includes:
  • How did you start the broker (exact command line)?
  • Which operating system and version of Erlang are you using?
  • What is in the rabbit logs (on Linux, /var/log/rabbitmq/rabbit.log and rabbit-sasl.log)?
  • Did you faithfully follow every step of the RabbitMQ installation procedure?
Take a look at http://www.catb.org/~esr/faqs/smart-questions.html for more ideas.



On Sun, Jun 1, 2008 at 11:11 AM, lahiru gunathilake <glahiru@gmail.com (glahiru@gmail.com)> wrote:


Quote:

hi devs,

I downloaded tarball of rabbit server and follow the installation guide. I've created a directory for MNESIA_BASE in /var/lib/rabbitmq/mnesia/ and left other default.
But once I try to start the broker it gives me this error, and as a new user to RabbitMQ I have no idea about what Mnesia database is. In the installation guide it tells like this
Defaults to /var/lib/rabbitmq/mnesia. Set this to the directory where Mnesia database files should be placed.
Guest
Posted: Sun Jun 01, 2008 3:57 pm Reply with quote
Guest
Well, I think the error is pretty clear. You didn't ensure the /var/lib/rabbitmq directory and its subdirectories are writable by whichever user actually ran the rabbit broker:

/rabbitmq-server: 47: cannot create /var/log/rabbitmq/rabbit.log.bak: Permission denied
{"init terminating in do_boot",{{nocatch,{error, {cannot_log_to_file,"/var/log/rabbitmq/rabbit.log",eacces}}},[{init,start_it,1},{init,start_em,1}]}}

When you create directories as root, ensure that you set their mode appropriately so they are usable by non-root users. What I did to avoid this issue is as follows:
  • Created a user rabbitmq, in a group rabbitmq
  • Made all related directories to be owned by this user/group, and rwx by the user/group
  • Gave myself membership of the rabbitmq group
e.g.

# chown rabbitmq:rabbitmq /var/log/rabbitmq
# chown rabbitmq:rabbitmq /var/lib/rabbitmq
# chmod -R ug+rwx /var/log/rabbitmq
# chmod -R ug+rwx /var/lib/rabbitmq
# usermod -G rabbitmq iahiru


On Sun, Jun 1, 2008 at 11:43 AM, lahiru gunathilake <glahiru@gmail.com (glahiru@gmail.com)> wrote:
Quote:
hi Edwin,

I'm sorry I forgot to paste the error Sad

On Sun, Jun 1, 2008 at 8:59 PM, Edwin Fine <emofine@gmail.com (emofine@gmail.com)> wrote:

Quote:
RabbitMQ will create the database files itself; you don't need to do anything besides ensure the directory is there with the appropriate privileges (i.e. it is writable for the process that starts RabbitMQ). More specifically, ensure that /var/lib/rabbitmq and all its subdirectories are writable by the process that starts RabbitMQ.

However, you need to post more information to get effective help. Saying you got "this error" without posting the error message itself is not going to yield useful responses from the mailing list.


Information you should post includes:Erlang (ASYNC_THREADS) (BEAM) emulator version 5.5.5

  • How did you start the broker (exact command line)? by running the script in sbin/rabbitmq-server
  • Which operating system and version of Erlang are you using? I'm using Ubunut 8.04
Guest
Posted: Sun Jun 01, 2008 4:13 pm Reply with quote
Guest
Ah - a typo. What I should have written is

# chown -R rabbitmq:rabbitmq /var/log/rabbitmq
# chown -R rabbitmq:rabbitmq /var/lib/rabbitmq

Another clue (which I missed on the first reading of your reply) is:

{"init terminating in do_boot",{undef,[{mnesia ,system_info,[directory]},{rabbit_mnesia,ensure_mnesia_dir,0},{rabbit,start,0},{init,start_it,1},{init,start_em,1}]}}


Looks as if the Mnesia directory was either not created or was created with the wrong ownership/permissions.
If all else fails, my recommendations in your case are to rm -rf /var/lib/rabbitmq, re-create it with the proper permissions as mentioned in my previous email, ensure any other Rabbit directories have the right permissions,
Guest
Posted: Sun Jun 01, 2008 4:15 pm Reply with quote
Guest
Please see my last email.


On Sun, Jun 1, 2008 at 12:12 PM, lahiru gunathilake <glahiru@gmail.com (glahiru@gmail.com)> wrote:
Quote:
hi Edwin,

On Sun, Jun 1, 2008 at 9:26 PM, Edwin Fine <rabbitmq-discuss_efine@usa.net (rabbitmq-discuss_efine@usa.net)> wrote:
Quote:
Well, I think the error is pretty clear. You didn't ensure the /var/lib/rabbitmq directory and its subdirectories are writable by whichever user actually ran the rabbit broker:

/rabbitmq-server: 47: cannot create /var/log/rabbitmq/rabbit.log.bak: Permission denied
{"init terminating in do_boot",{{nocatch,{error, {cannot_log_to_file,"/var/log/rabbitmq/rabbit.log",eacces}}},[{init,start_it,1},{init,start_em,1}]}}


but why it give a core dump when I run it as a super user Sad

lahiru


Quote:


When you create directories as root, ensure that you set their mode appropriately so they are usable by non-root users. What I did to avoid this issue is as follows:
  • Created a user rabbitmq, in a group rabbitmq
  • Made all related directories to be owned by this user/group, and rwx by the user/group
  • Gave myself membership of the rabbitmq group
e.g.

# chown rabbitmq:rabbitmq /var/log/rabbitmq
# chown rabbitmq:rabbitmq /var/lib/rabbitmq
# chmod -R ug+rwx /var/log/rabbitmq
# chmod -R ug+rwx /var/lib/rabbitmq
# usermod -G rabbitmq iahiru



On Sun, Jun 1, 2008 at 11:43 AM, lahiru gunathilake <glahiru@gmail.com (glahiru@gmail.com)> wrote:
Quote:
hi Edwin,

I'm sorry I forgot to paste the error Sad

On Sun, Jun 1, 2008 at 8:59 PM, Edwin Fine <emofine@gmail.com (emofine@gmail.com)> wrote:

Quote:
RabbitMQ will create the database files itself; you don't need to do anything besides ensure the directory is there with the appropriate privileges (i.e. it is writable for the process that starts RabbitMQ). More specifically, ensure that /var/lib/rabbitmq and all its subdirectories are writable by the process that starts RabbitMQ.

However, you need to post more information to get effective help. Saying you got "this error" without posting the error message itself is not going to yield useful responses from the mailing list.


Information you should post includes:Erlang (ASYNC_THREADS) (BEAM) emulator version 5.5.5

  • How did you start the broker (exact command line)? by running the script in sbin/rabbitmq-server
  • Which operating system and version of Erlang are you using? I'm using Ubunut 8.04
tonyg
Posted: Sun Jun 01, 2008 9:33 pm Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi,

> {"init terminating in do_boot",{undef,[{mnesia
> ,system_info,[directory]},{*rabbit_mnesia,ensure_mnesia_dir,0*},{rabbit,start,0},{init,start_it,1},{init,start_em,1}]}}

This often indicates that mnesia isn't installed. (It's complaining that
it can't find the function mnesia:system_info/1.)

Some operating systems have mnesia in an optional erlang package that's
not installed as part of the base erlang system - for instance, Ubuntu
is rumoured to need you to "apt-get install erlang", rather than simple
erlang-base, in order to get things to work. (This isn't something I've
experienced personally, so I could have the details wrong!)

(I'm not sure if this is a bug in our Debian package dependencies or
not. Any reports from the field?)

Regards,
Tony


_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
View user's profile Send private message MSN Messenger
Guest
Posted: Mon Jun 02, 2008 6:42 am Reply with quote
Guest
Tony Garnock-Jones wrote:
> Some operating systems have mnesia in an optional erlang package that's
> not installed as part of the base erlang system - for instance, Ubuntu
> is rumoured to need you to "apt-get install erlang", rather than simple
> erlang-base, in order to get things to work. (This isn't something I've
> experienced personally, so I could have the details wrong!)

The Erlang debian packages have mnesia and all the other otp modules in
the 'erlang-nox' package. That module depends on 'erlang-base', which
contains the vm.

> (I'm not sure if this is a bug in our Debian package dependencies or
> not. Any reports from the field?)

The rabbitmq-server debian packages depends on 'erlang-nox', so mnesia
should definitely be dragged in as a dependency if users install the
RabbitMQ .debs.

However, I believe Lahiru installed the generic unix packages rather
than the .debs, otherwise he would not have had to set up paths and
permissions; the .debs take care of all that.


Matthias.

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
tonyg
Posted: Mon Jun 02, 2008 10:06 am Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi Lahiru,

What was the exact command you used to install Erlang? If you haven't
already, please try "apt-get install erlang-nox".

What is the output of the command

file /usr/lib/erlang/lib/*/ebin/mnesia.beam /usr/lib/erlang

?

My output is:

/usr/lib/erlang/lib/mnesia-4.3.5/ebin/mnesia.beam: data
/usr/lib/erlang: directory


Another alternative is to delete the partial installation you have, and
to use our debian repository (instructions here:
http://www.rabbitmq.com/debian.html) to automatically install rabbitmq
with "apt-get install rabbitmq-server".


Tony


lahiru gunathilake wrote:
> Hi Tony,
>
>
> On Mon, Jun 2, 2008 at 3:02 AM, Tony Garnock-Jones <tonyg@lshift.net
> <mailto:tonyg@lshift.net>> wrote:
>
> Hi,
>
>
> {"init terminating in do_boot",{undef,[{mnesia
> ,system_info,[directory]},{*rabbit_mnesia,ensure_mnesia_dir,0*},{rabbit,start,0},{init,start_it,1},{init,start_em,1}]}}
>
>
> This often indicates that mnesia isn't installed. (It's complaining
> that it can't find the function mnesia:system_info/1.)
>
> I didn't install any thing called mnesia and I have installed erlang
> using apt.
>
> Any thoughts Sad
>
> lahiru
>
>
>
> Some operating systems have mnesia in an optional erlang package
> that's not installed as part of the base erlang system - for
> instance, Ubuntu is rumoured to need you to "apt-get install
> erlang", rather than simple erlang-base, in order to get things to
> work. (This isn't something I've experienced personally, so I could
> have the details wrong!)
>
> (I'm not sure if this is a bug in our Debian package dependencies or
> not. Any reports from the field?)
>
> Regards,
> Tony
>
>
>
>
> --
> East or West
> Mahindians are the
> Best... !

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist
View user's profile Send private message MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum