Announcement

Collapse
No announcement yet.

error: error running non-shared postrotate script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • error: error running non-shared postrotate script

    Hi guys,

    For the past week, I’ve been receiving an email every day that says this:

    error: error running non-shared postrotate script for /var/log/imunify360/imunify360-wafd.log of '/var/log/imunify360/imunify360-wafd.log'

    I'm not sure if this is a serious issue or how it can be resolved.

    Can someone help or guide me?

    Thank you very much!

  • #2
    Hello,

    Please try to restart the service with:

    HTML Code:
    # systemctl restart imunify360-wafd
    If the error still occurs after this, please provide the output of the following:

    HTML Code:
    # cat /etc/logrotate.d/imunify360-wafd
    # ps aux | grep wafd_imunify_daemon | grep -v grep

    Comment


    • #3
      [root@vps ~]# cat /etc/logrotate.d/imunify360-wafd
      /var/log/imunify360/imunify360-wafd.log {
      daily
      missingok
      notifempty
      size 30k
      compress
      delaycompress
      rotate 14
      create 0600 root root
      postrotate
      #if pidof -q /usr/sbin/wafd_imunify_daemon; then
      if pidof /usr/sbin/wafd_imunify_daemon > /dev/null; then
      pkill -USR2 -f /usr/sbin/wafd_imunify_daemon
      fi
      endscript
      }


      [root@vps ~]# ps aux | grep wafd_imunify_daemon | grep -v grep
      root 662859 0.0 0.1 1382436 7460 ? Ssl Oct07 0:07 /usr/sbin/wafd_imunify_daemon



      Thanks for the help!

      Comment


      • #4
        Hi,

        As I can see, the file `/etc/logrotate.d/imunify360-wafd` contains the fix that is confirmed by developers and located between ‘postrotate’ and ‘endscript’ strings:

        HTML Code:
        wafd_pid=$(pidof /usr/sbin/wafd_imunify_daemon)
        if [ -n "$wafd_pid" ];then
        kill -USR2 $wafd_pid || :
        fi
        Click image for larger version

Name:	wafdlog.png
Views:	66
Size:	103.7 KB
ID:	40324

        Besides this fix, the issue should be fixed in terms of the following task: DEF-29652.

        Additionally, you can check if the agent is running the latest version and if necessary, update it from the rollout with:

        HTML Code:
        # wget -O imunify-force-update.sh https://repo.imunify360.cloudlinux.com/defence360/imunify-force-update.sh
        
        # bash imunify-force-update.sh​

        Comment

        Working...
        X