CMK version: 2.1.0p9 OS version: Ubuntu 20.04 (running CMK in docker container)
Error message: I constantly get a CRITICAL alert with Service Description “Postfix status” and Summary/Details “Status: PID file exists but instance is not running!”. Postfix is running and working in my instance. I figured out that the alert is triggered by this line:
The issue is that readlink -- "/proc/${postfix_pid}/exe" returns an empty string in my case, so then the alert is triggered.
What can I do to successfully monitor my postfix instance?
I agree. I don’t have too much experience with postfix. But you can run the below simple commands to reproduce the issue with the official check-mk-raw docker image. Maybe this is an issue with the image?
The issue is that the last line returns an empty string. This is why checkmk reports CRIT status for the postfix service. But the postfix service is indeed running (was started in the entry point script because the MAIL_RELAY_HOST env var was set). You can check this with service postfix status.
@tog I am having the same issue. I have PID file in right location, when i test the bash script, I get postfix is up in running. but the problem dashboard still list postfix as not running. have you made any progress on this?
@JeremyC No, unfortunately not. As you can see from my above post, the issue occurs using the official docker image. I don’t have too much experience with checkmk and postfix, but I assume an issue with the postfix installation in the official docker image.
I could easily run one or multiple commands in the post-create hook of the entry point script. But somebody would have to point out a solution …
Hi,
New user here on the dockerized free trial version.
I am also having hard time with this Status: PID file exists but instance is not running! issue.
My agent is on Version: 2.1.0p20, OS: linux, Agent plugins: 0, Local checks: 0.
I have a postfix running in an other docker container and I am able to send emails through that.
So, yeah something is up.
Here is the relevant docker log:
### PREPARE POSTFIX (Hostname: 739be51280ca, Relay host: 192.168.1.50:2525)
### STARTING MAIL SERVICES
739be51280ca syslogd: /dev/xconsole: No such file or directory
postfix/postfix-script: starting the Postfix mail system
...done.
### STARTING XINETD
Thank you very much for your response and your hint. Looked really promising … I now updated to v2.1.0p20, but the alert is still there. Do I have to do something in order to kind of “force” the check to reset?
Also @Imperial7693 reported these days that he also experiences the issue with 2.1.0p20 …
This is exactly my issue: to avoid a time-out starting CMK in a docker I need to suppress the Relay env variable which then means postfix is not started.
I have bodged this with a custom up -d script which runs a command in the running CMK to start postfix but clearly there is still an issue in the raw docker image when Relay is set on.
Checked this post again since the error still persists.
@dennis.ehmer: As stated already above, I meanwhile use v2.1.0p20 of the check_mk_raw container and agent but the issue still persists. Do I maybe have to do something in order to kind of “force” the check to reset?
@Imperial7693, @predmijat: My issue is maybe not the same as yours. Mail services are starting up seamlessly in my case and also e-mail notifications work. service postfix status returns postfix is running. Even though this “Postfix status” service reports critical state. As stated above, the issue is that readlink -- "/proc/${postfix_pid}/exe" returns an empty string. Also tried cd /proc/${postfix_pid}/exe and cat /proc/${postfix_pid}/exe but both return “permission denied”.