Learn about Centmin Mod LEMP Stack today
Become a Member

Cron error

Discussion in 'Bug Reports' started by Rhodium, Jun 12, 2022.

  1. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    10:05 PM
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 130.00beta01

    I have this cron error yesterday:


    Code:
    /usr/bin/ngxreload: line 1: /etc/init.d/nginx: No such file or directory
    [Sat Jun 11 00:24:15 UTC 2022] Reload error for :xxx.com
    [Sat Jun 11 00:24:15 UTC 2022] Error renew xxx.com.
    /usr/bin/ngxreload: line 1: /etc/init.d/nginx: No such file or directory
    [Sat Jun 11 00:24:22 UTC 2022] Reload error for :xxx.com
    [Sat Jun 11 00:24:22 UTC 2022] Error renew xxx.com_ecc.
    I think it's releated to recent changes with nginx systemd.
     

    Attached Files:

  2. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    7:05 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You using 130.00beta01 or 124.00beta01? Only 130.00beta01 supports Nginx with systemd service file by default on CentOS 8/Alma Linux 8. On CentOS 7 130.00beta01 recently changed to systemd by default.

    Do you have in persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    SWITCH_NGINX_SYSTEMD='y'
    

    ?
    If you did, then run centmin.sh menu to apply the changes.
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    7:05 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If running centmin.sh once doesn't fix it, you can try manually making the command shortcut changes by using these 8 commands
    Code (Text):
    echo "service nginx stop" >/usr/bin/ngxstop ; chmod 700 /usr/bin/ngxstop
    echo "service nginx start" >/usr/bin/ngxstart ; chmod 700 /usr/bin/ngxstart
    echo "service nginx restart" >/usr/bin/ngxrestart ; chmod 700 /usr/bin/ngxrestart
    echo "service nginx reload" >/usr/bin/ngxreload ; chmod 700 /usr/bin/ngxreload
    echo "service nginx stop;service php-fpm stop" >/usr/bin/npstop ; chmod 700 /usr/bin/npstop
    echo "service nginx start;service php-fpm start" >/usr/bin/npstart ; chmod 700 /usr/bin/npstart
    echo "service nginx restart;service php-fpm restart" >/usr/bin/nprestart ; chmod 700 /usr/bin/nprestart
    echo "service nginx reload;service php-fpm reload" >/usr/bin/npreload ; chmod 700 /usr/bin/npreload
    
     
  4. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    10:05 PM
    I'm using 130.00beta01 and using nginx systemd with no problems, but acme.sh it's complaining not having this file /etc/init.d/nginx to renew certificate.
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    7:05 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what is output for command
    Code (Text):
    cminfo versions

    example output
    Code (Text):
    cminfo versions
    
    1st:
    1.2.3-eva2000.09.004 #Tue Apr  4 03:32:50 EDT 2017
    ..
    last 10:
    130.00beta01.b75 #Sat Jun 11 04:35:30 UTC 2022
    130.00beta01.b75 #Sat Jun 11 04:35:52 UTC 2022
    130.00beta01.b75 #Sat Jun 11 04:57:45 UTC 2022
    130.00beta01.b76 #Sat Jun 11 05:34:44 UTC 2022
    130.00beta01.b76 #Sat Jun 11 05:44:40 UTC 2022
    130.00beta01.b76 #Sat Jun 11 06:56:50 UTC 2022
    130.00beta01.b76 #Sat Jun 11 07:11:19 UTC 2022
    130.00beta01.b76 #Sat Jun 11 07:20:52 UTC 2022
    130.00beta01.b82 #Sun Jun 12 08:29:13 UTC 2022
    130.00beta01.b82 #Sun Jun 12 08:37:08 UTC 2022
    

    acmetool.sh references the command shortcut /usr/bin/ngxreload so that should be updated when SWITCH_NGINX_SYSTEMD='y' is set by default as in 130.00beta01 or if set in persistent config file. Then next centmin.sh run would apply these shortcuts at https://community.centminmod.com/threads/cron-error.22933/#post-93458 automatically or you can do it manually to be sure
     
  6. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    10:05 PM
    Code:
    cminfo versions
    
    1st:
    123.09beta01.b808 #Sun Apr 10 17:18:14 UTC 2022
    ..
    last 10:
    130.00beta01.b66 #Thu Jun  9 08:28:10 UTC 2022
    130.00beta01.b71 #Fri Jun 10 10:44:16 UTC 2022
    130.00beta01.b75 #Sat Jun 11 07:52:06 UTC 2022
    130.00beta01.b75 #Sat Jun 11 20:50:55 UTC 2022
    130.00beta01.b82 #Sun Jun 12 08:19:41 UTC 2022
    130.00beta01.b82 #Sun Jun 12 09:05:46 UTC 2022
    130.00beta01.b82 #Sun Jun 12 09:08:44 UTC 2022
    130.00beta01.b82 #Sun Jun 12 09:09:02 UTC 2022
    130.00beta01.b82 #Sun Jun 12 09:13:10 UTC 2022
    130.00beta01.b82 #Sun Jun 12 09:35:45 UTC 2022
    After doing https://community.centminmod.com/threads/cron-error.22933/#post-93458 now it's fine, but i have another server and if i read /usr/bin/ngxreload it's init.d too even with SWITCH_NGINX_SYSTEMD='y' in custom_config.inc, so something it's not updated automatically.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    7:05 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Updated 130.00beta01 with a fix, so run cmupdate command and centmin.sh once and exit and see if it's fixed
     
  8. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    10:05 PM
    Yes, fixed in my other server! Thanks! :D