Rescue mode not work Debian stretch. rescue mode does not work apache stands still Fri Apr 8 08:33:06 -03 2022 sh: -c: line 0: syntax error near unexpected token `&&' Fri Apr 8 08:33:06 -03 2022 sh: -c: line 0: ` && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null' Fri Apr 8 08:33:06 -03 2022 PHP Warning: exec(): Cannot execute the blank command in /usr/local/ispconfig/server/mods-available/rescue_core_module.inc.php on line 478 Fri Apr 8 08:33:06 -03 2022 finished server.php. Fri Apr 8 08:34:01 -03 2022 sh: -c: line 0: syntax error near unexpected token `&&' Fri Apr 8 08:34:01 -03 2022 sh: -c: line 0: ` && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null' Fri Apr 8 08:34:01 -03 2022 PHP Warning: exec(): Cannot execute the blank command in /usr/local/ispconfig/server/mods-available/rescue_core_module.inc.php on line 478 Fri Apr 8 08:34:02 -03 2022 finished server.php. Fri Apr 8 08:35:01 -03 2022 sh: -c: line 0: syntax error near unexpected token `&&' Fri Apr 8 08:35:01 -03 2022 sh: -c: line 0: ` && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null' Fri Apr 8 08:35:01 -03 2022 PHP Warning: exec(): Cannot execute the blank command in /usr/local/ispconfig/server/mods-available/rescue_core_module.inc.php on line 478 Fri Apr 8 08:35:01 -03 2022 finished server.php. Fri Apr 8 08:36:01 -03 2022 ipcrm: insufficient arguments Fri Apr 8 08:36:01 -03 2022 Fri Apr 8 08:36:01 -03 2022 Usage: Fri Apr 8 08:36:01 -03 2022 ipcrm [options] Fri Apr 8 08:36:01 -03 2022 ipcrm shm|msg|no <id>... Fri Apr 8 08:36:01 -03 2022 Fri Apr 8 08:36:01 -03 2022 Removes certain IPC features. Fri Apr 8 08:36:01 -03 2022 Fri Apr 8 08:36:01 -03 2022 Options: Fri Apr 8 08:36:01 -03 2022 -m, --shmem-id <id> remove shared memory segment by id Fri Apr 8 08:36:01 -03 2022 -M, --shmem-key <key> remove shared memory segment Fri Apr 8 08:36:01 -03 2022 by the key Fri Apr 8 08:36:01 -03 2022 -q, --queue-id <id> remove message queue by id Fri Apr 8 08:36:01 -03 2022 -Q, --queue-key <key> remove message file by key Fri Apr 8 08:36:01 -03 2022 -s, --semaphore-id <id> remove semaphore by id Fri Apr 8 08:36:01 -03 2022 -S, --semaphore-key <key> Fri Apr 8 08:36:01 -03 2022 remove semaphore by key Fri Apr 8 08:36:01 -03 2022 -a, --all[=<shm|msg|sem>] removes everything (in the specified category) Fri Apr 8 08:36:01 -03 2022 -v, --verbose explains what is being done Fri Apr 8 08:36:01 -03 2022 Fri Apr 8 08:36:01 -03 2022 -h, --help display this help and exit Fri Apr 8 08:36:01 -03 2022 -V, --version show version info and exit Fri Apr 8 08:36:01 -03 2022 Fri Apr 8 08:36:01 -03 2022 For more details, see ipcrm(1). Fri Apr 8 08:36:01 -03 2022 sh: -c: line 0: syntax error near unexpected token `&&' Fri Apr 8 08:36:01 -03 2022 sh: -c: line 0: ` && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null' Fri Apr 8 08:36:01 -03 2022 PHP Warning: exec(): Cannot execute the blank command in /usr/local/ispconfig/server/mods-available/rescue_core_module.inc.php on line 478
Code: Fri Apr 8 08:33:06 -03 2022 sh: -c: line 0: syntax error near unexpected token `&&' That makes me suspect wrong shell is used. Maybe it should be bash or something? What script is this error from? Rescue mode of what? Apache?
Please run: dpkg-reconfigure dash and choose 'no' in the dialog that appears then. And yes, it's 'dash' in the command and not 'bash'.
Is the listing Code: Fri Apr 8 08:33:06 -03 2022 sh: -c: line 0: syntax error near unexpected token `&&' Fri Apr 8 08:33:06 -03 2022 sh: -c: line 0: ` && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null' result of some command? What command exactly? Or is it from a log file? Which log? What shows command Code: systemctl status apache2.service
systemctl status apache2.service ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2022-04-08 08:47:20 -03; 1h 16min ago Process: 17760 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS) Process: 24970 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS) Process: 17770 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 17673 (code=exited, status=0/SUCCESS) Tasks: 442 (limit: 4915) CGroup: /system.slice/apache2.service ├─ 5631 /usr/sbin/apache2 -k start ├─ 5825 /usr/sbin/apache2 -k start ├─ 5949 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 5950 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 7213 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 7214 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 7215 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 7218 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 7219 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─ 7220 /usr/bin/php-cgi7.0 -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/us ├─17841 /usr/sbin/apache2 -k start ├─17866 vlogger (access log) ├─17867 /usr/sbin/apache2 -k start ├─17872 Passenger watchdog ├─17875 Passenger core ├─17887 Passenger ust-router └─17934 /usr/sbin/apache2 -k start abr 08 08:47:19 servidor1 systemd[1]: Starting The Apache HTTP Server... abr 08 08:47:19 servidor1 apachectl[17770]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enab abr 08 08:47:20 servidor1 systemd[1]: Started The Apache HTTP Server.
Ok, I just had a look at the code, it seems as if one of the daemons, the one that the rescue module tries to restart, is not enabled using systemctl command. As $app->system->getinitcommand($daemon, 'stop') returns an empty result at the moment.
I don't think so, it's more likely a configuration issue. The mentioned function can only return a start command if the service is properly enabled.
The symptom is that apache is running. But it doesn't respond to rescue mode. And it doesn't load the sites
Ok, but that's something different than what the initial post is about. What you posted in the initial post does not affect apache at all as not even a command to restart apache could be retrieved. So to your actual issue that apache can't load the sites, Try to kill all apache processes using kill command and then uses systemctl command to start apache.
I was able to reproduce the issue here now, it does not seem o occur every time. For now, you should disable the rescue module and follow instructions in post #13 to kill existing old processes manually and then start aapache2 again.
What was the reason you activated Apache rescue mode? Did you find documentation about that rescue mode? Have you tried stopping apache and starting manually? What about reboot, what happens with apache and what is in the logs?
I've always had rescue mode active for years. If the server stops some service. For different reasons. Like a configuration fault or memory segmentation. It recovers before customers know it. Of course, the service doesn't keep dropping all the time. But it can happen on rare occasions. From the last two ISPconfig updates onwards, I've noticed this issue.
I had the same problem and I found a bug in ispconfig with detailed analysis. The origin of the error is in git.ispconfig.org/ispconfig/ispconfig3/-/commit/139bbcaf8646e3ad7ab42b82bc31e4756feaba7f#95d85718c1b4577cff0b7cfb1ebca37ac99dba0b_2073_2078 FIX: in /usr/local/ispconfig/server/lib/classes/system.inc.php in function _getinitcommand replace array('restart','reload','force-reload') with array('start','stop','restart','reload','force-reload') ISSUE: git.ispconfig.org/ispconfig/ispconfig3/-/issues/6330