Unable to change log path from the default path

253 views
Skip to first unread message

Gayathri K

unread,
Nov 19, 2015, 7:33:48 AM11/19/15
to rabbitmq-users
Hi,
I am trying to change the log path of rabbitmq from the default one in my linux machine (/var/log/rabbitmq). I have installed rabbitmq RPM version 3.5.2
These are the steps that i tried:
  1. As per rabbitmq documentation, i did override the log path in

    /etc/rabbitmq/rabbitmq-env.conf  using the LOG_BASE variable. Directory where i want the logs to go is /root/g3/log/rabbitmq . I have this directory created and set the permissions appropriately:                         ls /root/g3/log/
    total 4
    drwxrwxrwx. 2 rabbitmq rabbitmq 4096 Nov 19 02:25 rabbitmq

  2. These are the contents of /etc/rabbitmq/rabbitmq-env.conf :

            LOG_BASE=/root/g3/log/rabbitmq


After doing this change, i restarted rabbitmq (service rabbitmq-server restart). But it is not starting. I have attached the contents of /var/log/rabbitmq. The logs from startup_log are:

BOOT FAILED

===========

 

Error description:

   {error,

       {cannot_log_to_file,"/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log",

           {error,

               {cannot_create_parent_dirs,

                   "/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log",eacces}}}}

 

Log files (may contain more information):

   /root/g3/log/rabbitmq/rab...@epmp-pre-bat.log

   /root/g3/log/rabbitmq/rab...@epmp-pre-bat-sasl.log

 

Stack trace:

   [{rabbit,ensure_working_log_handler,5},

    {rabbit,ensure_working_log_handlers,0},

    {rabbit,'-boot/0-fun-0-',0},

    {rabbit,start_it,1},

    {init,start_it,1},

    {init,start_em,1}]

 

{"init terminating in do_boot",{error,{cannot_log_to_file,"/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log",{error,{cannot_create_parent_dirs,"/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log",eacces}}}}}


Can someone please help me with this?

Regards,
Gayathri.

rabbitmq-logs.zip

Michael Klishin

unread,
Nov 19, 2015, 7:53:24 AM11/19/15
to rabbitm...@googlegroups.com, Gayathri K
 On 19 November 2015 at 15:33:51, Gayathri K (kgayath...@gmail.com) wrote:
> Error description:
>
>
> {error,
>
>
> {cannot_log_to_file,"/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log(mailto:/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log)",
>
>
> {error,
>
>
> {cannot_create_parent_dirs,
>
>
> "/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log(mailto:/root/g3/log/rabbitmq/rab...@epmp-pre-bat.log)",eacces}}}}

RabbitMQ tries an equivalent of `mkdir -p` on the path and fails.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages