"No init script, we quit here."

Discussion in 'General' started by wrkilu, Oct 27, 2025.

  1. wrkilu

    wrkilu Member

    Hi,
    I have This Version: 3.2.12p1 on Debian 12.
    Sometimes (or always ? because changes we do rarely) is problem with make any change because Apache don't want to reload after change in panel.

    In ispconfig.log there is:
    Code:
    27.10.2025-19:15 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    27.10.2025-19:15 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'php8.2-fpm' 2>&1 - return code: 0
    27.10.2025-19:15 - DEBUG [web module.inc:316] - Restarting php-fpm: systemctl reload php8.2-fpm.service
    27.10.2025-19:15 - DEBUG [apache2 plugin.inc:2010] - Apache status is: running
    
    27.10.2025-19:15 - DEBUG [services.inc:56] - Calling function 'restartHttpd' from module 'web_module'.
    27.10.2025-19:15 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    27.10.2025-19:15 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'httpd' 2>&1 - return code: 1
    27.10.2025-19:15 - DEBUG [system.inc:2106] - Failed to use Systemd to restart service httpd, we try init script instead.
    27.10.2025-19:15 - DEBUG [system.inc:2116] - Using init script to restart service
    27.10.2025-19:15 - WARNING - No init script, we quit here.
    27.10.2025-19:15 - DEBUG [web module.inc:246] - Restarting httpd:
    27.10.2025-19:15 - WARNING - We got no init command, restart or reload of service aborted.
    
    
    27.10.2025-19:15 - DEBUG [apache2 plugin.inc:2013] - Apache restart return value is: 0
    

    How to fix it then ?
    Thank you.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The actual error is before that, trying a init script is just a fallback in case systemd fails. The issue is that systemctl is-enabled 'httpd' fails, which means your system is using systemd, but httpd systemd unit is not enabled. You must enable it. I wonder just why it says httpd and not apache2 as you are on Debian and not RHEL, maybe you set something wrong under System > server config > web for the web server.
     
  3. wrkilu

    wrkilu Member

    Code:
    root@h3-virt~# systemctl list-units --type=service
      UNIT                               LOAD   ACTIVE SUB     DESCRIPTION                                  
      apache2.service                    loaded active running The Apache HTTP Server
      console-getty.service              loaded active running Console Getty
      cron.service                       loaded active running Regular background program processing daemon
      csf.service                        loaded active exited  ConfigServer Firewall & Security - csf
    
    so as you see apache2 is enabled, and there isn't any httpd service which is logical in this situation.
    BUT :) ..... I have to admit this Linux is as LXD container and he has also troubles with starting Pureftpd from systemctl (and I exactly run it manually via rc.local) . So this is probably the same reason that Apache don't want to restart/reload via systemctl.

    So in that case please tell me in which file or files of ispconfig panel I should change command of reloading Apache from systemctl to some other manual command of restarting Apache ?
     
  4. wrkilu

    wrkilu Member

    The problem was for example when we tried to add subdomain with redirect - and then this error occured.
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    LXC is never known to work with ISPConfig without any issues and is not supported.

    If you mentioned this earlier, we would have suggested you to use a VM instead, so you did not have to use your time fixing the LXC issues that cannot easily be fixed.

    So there you are, use a VM or you are on your own with ISPConfig LXC fixing a lot of things that you need not to if you use a VM which will just work out of box.
     
    Last edited: Oct 28, 2025
  6. wrkilu

    wrkilu Member

    Just please tell me in which file is command responsible for reloading Apache after adding subdomain. I will fix it myself in my way and thats it.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Code:
    grep -Rn 'No init script, we quit here.' /usr/local/ispconfig/server/
     
  8. wrkilu

    wrkilu Member

    Ok, I've found workaround for LXD maniacs ;)
    In /usr/local/ispconfig/server/mods-enabled/web_module.inc.php near 251 line change as following:
    Code:
                    if($cmd != '') {
                            exec($cmd.' 2>&1', $retval['output'], $retval['retval']);
                    } else {
                            $app->log('We got no init command, restart or reload of service aborted.',LOGLEVEL_WARN);
                    }
    
    to
    Code:
    
                    if($cmd != '') {
                            exec($cmd.' 2>&1', $retval['output'], $retval['retval']);
                    } else {
                            //  $app->log('We got no init command, restart or reload of service aborted.',LOGLEVEL_WARN);
                            exec('apache2ctl graceful 2>&1', $retval['output'], $retval['retval']);
                    }
    
    and just comment line 2164 in /usr/local/ispconfig/server/lib/classes/system.inc.php with logging:
    Code:
    if($full_init_script_path == '') {
                      // $app->log('No init script, we quit here.',LOGLEVEL_WARN);
                      return false;
    }
    
    Now all is working :) I mean Apache is reloading after changes in panel.

    Thanks ISPConfig3 developers for great work! and cheers!
    P.S. We look forward for adding to panel Wordpress instalator ;)
     

Share This Page