Sighup caught re-opening log file




















It's a small chance, but possible -- and you might not want to lose your modsecurity audit logs. Second, not all systems have logrotate with copytruncate installed. For example, FreeBSD's newsyslog does not support copytruncate. I've had to install logrotate simply to rotate the modsecurity audit log.

Ubuntu's logrotate doesn't seem to support copytruncate either it seems. Unless it has to be re-compiled with that option. So what's the solution? This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. I suspect modsec kept open the file handle during rename. Unfortunately this way logcheck wasn't able to alert us about security incidents as it was set to process the.

We'll get to it when possible. Thank you. This should stay open until is merged. Any other thought would be appreciated. Firstly, its origin is from the concept of a hang-up, i. In modern parlance this generally means it has lost its controlling tty. Unless you've taken care to detach from your tty, any program started in a given terminal will receive a SIGHUP when the terminal is closed.

See here for details on how to do this in your program. Other options include:. The other possibility is something is deliberately sending your process a SIGHUP which by "tradition" is often used to signal a process that it should re-read its configuration. Signals can be sent using kill utility or kill syscall. Of course, you can try and find out who is sending that signal or disconnecting your terminals or network connections, but there is simpler practical way to fix your problem.

When code is supposed to run as a daemon, but really isn't just like yours , there is a wrapper that can turn any program into daemon. Surprise - this wrapper is called daemon! It has lots of options, probably most importantly for you, option to automatically restart your utility should it ever die for any reason.

If this command is not installed on your Ubuntu, just sudo apt-get install daemon , and man daemon to get started. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Is there a way to know why a service is restarted and who did it? Ask Question. Asked 6 years, 4 months ago. Active 6 years, 4 months ago.

Viewed times. Ubuntu As you can see: it did not happened at 29 and 30 Aug it often restarted around the which is the time cron. I thought about it. Here's the log: Sep 1 x-master freshclam[]: Received signal: wake up Sep 1 x-master freshclam[]: ClamAV update process started at Tue Sep 1 Sep 1 x-master freshclam[]: main.

Sep 1 x-master freshclam[]: Sep 1 x-master clamd[]: SelfCheck: Database status OK. I can confirm this is correct by doing a test: edit the freshclam. Improve this question. Error messages are still printed to. Prints a message and. After stopping, no. Use this. Syslog import syslog. Utils import LogStdErr. We pad it 6 hours just to be safe. ESRCH: raise. Return the hostname, pid, and tempfile. Find out if the process exists by calling kill with a signal 0.

Be sure we can acquire the master qrunner lock. If not, it means some. The master qrunner lock could not be acquired because it appears as if another. The master qrunner lock could not be acquired. It appears as though there is. Try re-running mailmanctl with the -s flag. The master qrunner lock could not be acquired, because it appears as if some. We can't test for stale. Or, if you. Craft the command line arguments for the exec call. Set the process's supplimental groups. Python 2. You may encounter permission problems.

This will.



0コメント

  • 1000 / 1000