nginx dies/stops at the same time everyday!?

Discussion in 'General' started by zenny, May 13, 2018.

  1. zenny

    zenny Member

    Hi,

    Recently, I am getting a strange problem of nginx service dying at the same time everyday for the last two weeks despite the fact that the ISPConfig3 server (updated to v3.1.11) has been working as it should for years.

    The only place where I can figure out the log related to the above is at /var/log/ispconfig/cron.log as follows:

    There is hardly any reference to the problem in the DEBUG-level /var/log/ispconfig/ispconfig.log that referenced to the specific time related to the event. Likewise in letsencrypt.log:

    However, the cron-related file (/usr/local/ispconfig/server/le.restart) does not exist as reported above:

    Any inputs appreciated.

    Thanks and Cheers,
    /zenny
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you checked what cron starts at 03 hours?
    Code:
    crontab -l
    The files in /etc/cron.*
     
  3. zenny

    zenny Member

    @Taleman Thanks for your prompt response, please find attached what you have asked for:

    In detail:

    The details of the certbot cron entry:
     
    Last edited: May 13, 2018
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Can't see anything starting at 03 hours. But ispconfig/cron.log shows nginx being stopped. Can it be some other host starts something affecting this host? Maybe backup starts at 03 hours?
    Try to find what does the service stop nginx. Check all files in /var/log, see what happens at 03 hours.
    If all else fails, add to root crontab service start nginx at 04 hours every day.
     
  5. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    Have a look at your datalog before this happened, maybe there's a job in the queue still?
    Are you using letsencrypt? What happens if you disable LE completly*?
    As @Taleman asked, is it a multiserver setup?

    *) You can however copy the contents of the cert files and add them as manual/self signed ssl again
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be the ISPConfig LE cronjob which tries to restart nginx after a cert renewal and nginx fails during restart.
     
  7. zenny

    zenny Member

    @till: The cronjob for certbot appears not to be the culprit as the /etc/cron.d/certbot has:
    @ztk.me : I haven't tried by disabling LE. It is NOT a multiserver setup.

    Instead I created a bash script to check the status of nginx every minute and restart it if not running via cronjob. But this does not seem to be something desired, yet works!
     

Share This Page