[rabbitmq-discuss] After weekly log rotatation was done, the command "rabbitmqctl rotate-logs" never stop

Simon MacMullen simon at rabbitmq.com
Mon May 13 10:32:40 BST 2013


Which version of RabbitMQ are you running? There are some bugs in log 
rotation in old versions.

Cheers, Simon

On 13/05/2013 10:25, Nate wrote:
> I setup a 3 node rabbitmq cluster for online service and everything works
> fine; however, after weekly log rotatation was done, I found that two
> rabbitmq-servers still wrote the logs into rabbitmqX.log.1, not
> rabbitmqX.log. At the meantime, I use the command "ps axjf" to check the
> system and I got some following information.
>
>   1905  8550  1905  1905 ?           -1 S        0   0:00  \_ crond
>   8550  8567  8567  8567 ?           -1 Ss       0   0:00      \_ /bin/bash
> /usr/bin/run-parts /etc/cron.daily
>   8567  8942  8567  8567 ?           -1 S        0   0:00          \_ /bin/sh
> /etc/cron.daily/logrotate
>   8942  8943  8567  8567 ?           -1 S        0   0:00          |   \_
> /usr/sbin/logrotate /etc/logrotate.conf
>   8943  8944  8567  8567 ?           -1 S        0   0:00          |       \_
> sh -c ?            /sbin/service rabbitmq-server rotate-logs > /dev/null? ?
>   8944  8946  8567  8567 ?           -1 S        0   0:00          |
> \_ /bin/sh /sbin/service rabbitmq-server rotate-logs
>   8946  8951  8567  8567 ?           -1 S        0   0:00          |
> \_ /bin/sh /etc/init.d/rabbitmq-server rotate-logs
>   8951  8954  8567  8567 ?           -1 S        0   0:00          |
> \_ /bin/sh /usr/sbin/rabbitmqctl rotate_logs
>   8954  8963  8567  8567 ?           -1 S        0   0:00          |
> \_ su rabbitmq -s /bin/sh -c /usr/lib/rabbitmq/bin/rabbitmqctl  "ro
>   8963  8972  8972  8972 ?           -1 Ssl    101   0:00          |
> \_ /usr/lib/erlang/erts-5.9/bin/beam.smp -- -root /usr/lib/erla
>
> It seems like system is doing postrotate command "/sbin/service
> rabbitmq-server rotate-logs > /dev/null", but system cannot finish the task.
>   /var/log/rabbitmq/*.log {
>          weekly
>          missingok
>          rotate 20
>          compress
>          delaycompress
>          notifempty
>          sharedscripts
>          postrotate
>              /sbin/service rabbitmq-server rotate-logs > /dev/null
>          endscript
> }
>
> Rabbitmq still work fine for sending message, but log roatation is getting
> stuck.
> I have no idea about this case and don't know how to recover the log without
> stopping the system. I need a help..
>
> Thanks in advance,
>
> Nate
>
>
>
>
>
>
> --
> View this message in context: http://rabbitmq.1065348.n5.nabble.com/After-weekly-log-rotatation-was-done-the-command-rabbitmqctl-rotate-logs-never-stop-tp26603.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>



More information about the rabbitmq-discuss mailing list