had someone bring a bug to my attention. The latest FreePBX package used by the Debian installer essentially breaks FreePBX at an open-source level by introducing a commercial module dependency.
This is evident in the bug report where the user didn’t want to use any Sangoma commercial modules:
opened 06:59AM - 07 Dec 24 UTC
bug
triage
### FreePBX Version
FreePBX 17
### Issue Description
Installation fails if yo… u supply the option --opensourceonly, because the file /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh could not be found. After creating the file, make it executable and rerun the installation-script the installation finished successfully
### Operating Environment
Debian 12.7, latest installation script
### Relevant log output
```shell
024-12-07 07:47:46 - Uninstalling sysadmin17
2024-12-07 07:47:50 - Uninstalling ioncube-loader-82
2024-12-07 07:47:51 - Wrapping up the installation process
2024-12-07 07:47:52 - Installation failed at step Wrapping up the installation process. Please check log /var/log/pbx/freepbx17-install-2024.12.07-07.37.10.log for details.
2024-12-07 07:47:52 - Error at line: 1189 exiting with code 1 (last command was: systemctl restart apache2 >> "$log")
2024-12-07 07:47:52 - Exiting script
/tmp# cat /var/log/pbx/freepbx17-install-2024.12.07-07.37.10.log
[...]
To activate the new configuration, you need to run:
systemctl reload apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.
2024-12-07 07:47:52 - ****** INSTALLATION FAILED *****
2024-12-07 07:47:52 - Installation failed at step Wrapping up the installation process. Please check log /var/log/pbx/freepbx17-install-2024.12.07-07.37.10.log for details.
2024-12-07 07:47:52 - Error at line: 1189 exiting with code 1 (last command was: systemctl restart apache2 >> "$log")
2024-12-07 07:47:52 - Exiting script
/tmp# journalctl -xeu apache2
Dez 07 07:50:50 debian-test systemd[1]: apache2.service: Scheduled restart job, restart counter is at 34.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ Automatic restarting of the unit apache2.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Dez 07 07:50:50 debian-test systemd[1]: Stopped apache2.service - The Apache HTTP Server.
░░ Subject: A stop job for unit apache2.service has finished
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A stop job for unit apache2.service has finished.
░░
░░ The job identifier is 7894 and the job result is done.
Dez 07 07:50:50 debian-test systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: A start job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit apache2.service has begun execution.
░░
░░ The job identifier is 7894.
Dez 07 07:50:50 debian-test (pache.sh)[114926]: apache2.service: Failed to locate executable /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh: No such file or directory
░░ Subject: Process /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh could not be executed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The process /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh could not be executed and failed.
░░
░░ The error number returned by this process is 2.
Dez 07 07:50:50 debian-test (pache.sh)[114926]: apache2.service: Failed at step EXEC spawning /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh: No such file or directory
░░ Subject: Process /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh could not be executed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The process /var/www/html/admin/modules/sysadmin/hooks/check_ip_and_start_apache.sh could not be executed and failed.
░░
░░ The error number returned by this process is 2.
Dez 07 07:50:50 debian-test systemd[1]: apache2.service: Control process exited, code=exited, status=203/EXEC
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStartPre= process belonging to unit apache2.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 203.
Dez 07 07:50:50 debian-test systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Dez 07 07:50:50 debian-test systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit apache2.service has finished with a failure.
░░
░░ The job identifier is 7894 and the job result is failed.
```
Guess what? That isn’t allowed. Why? I’m glad you asked. Oh, you didn’t ask? Well, let me tell you. Apparently, there are no Linux, or at least no Debian folks, on the development team. There was an issue related to the commercial side where ionCube requires an IP? Why? Who knows. Someone locking licensing to an IP address seems insane, so I’m guessing it’s to “phone home.” Whatever the reason, the workaround solution was to replace the Apache systemd service with a random bash script installed with SysAdmin.
Yes, in order to run Apache for FreePBX, you must use this strange workaround shell script to start it. That shell script is in SysAdmin, a commercial module. This doesn’t affect only customers who, I assume, matter—those paying for commercial modules. But it does break things for everyone who doesn’t, at least on a fresh install. Even if your commercial modules need to phone home, that can be done WITHOUT BREAKING APACHE!
2 posts - 2 participants
Read full topic