Restarting Apache2 for fog vhost Failed!
-
apache2.conf line 140:
IncludeOptional mods-enabled/*.load
php.load line 1 (also happens to be the only line):
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
something to note the php.load file only exists after I run the installer for fog before it does not exist.
Edit: I checked the /usr/lib/apache2/modules/ folder and there is a libphp7.0.so I believe that is where the problem lies. though fixing it i am unsure how to do.
-
@jeffj said in Restarting Apache2 for fog vhost Failed!:
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
Change that to this:
LoadModule php7_module /usr/lib/apache2/modules/libphp7.so
And just see what happens. I don’t know if it will fix it or not.
-
@jeffj said in Restarting Apache2 for fog vhost Failed!:
Edit: I checked the /usr/lib/apache2/modules/ folder and there is a libphp7.0.so I believe that is where the problem lies. though fixing it i am unsure how to do.
In such case, make the line into:
LoadModule php7_module /usr/lib/apache2/modules/libphp7.0.so
Then try to restart apache.
service apache2 restart
service apache2 status -l
-
when doing that and trying to restart apache2 it errors out here are the error details
Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.
here is the systemctl status apache2.service output:
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2016-10-18 12:16:23 CDT; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 28519 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)Oct 18 12:16:23 fog apache2[28519]: * The apache2 configtest failed.
Oct 18 12:16:23 fog apache2[28519]: Output of config test was:
Oct 18 12:16:23 fog apache2[28519]: [Tue Oct 18 12:16:23.340112 2016] [:crit] [pid 28529:tid 3074751040] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
Oct 18 12:16:23 fog apache2[28519]: AH00013: Pre-configuration failed
Oct 18 12:16:23 fog apache2[28519]: Action ‘configtest’ failed.
Oct 18 12:16:23 fog apache2[28519]: The Apache error log may have more information.
Oct 18 12:16:23 fog systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 18 12:16:23 fog systemd[1]: Failed to start LSB: Apache2 web server.
Oct 18 12:16:23 fog systemd[1]: apache2.service: Unit entered failed state.
Oct 18 12:16:23 fog systemd[1]: apache2.service: Failed with result ‘exit-code’.here is the journalctl -xe output:
Unit apache2.service has failed.
– The result is failed.
Oct 18 12:16:23 fog systemd[1]: apache2.service: Unit entered failed state.
Oct 18 12:16:23 fog systemd[1]: apache2.service: Failed with result ‘exit-code’.
Oct 18 12:16:23 fog polkitd(authority=local)[905]: Unregistered Authentication Agent for unix-process:28506:7432110 (system bus name :1.902, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus) -
@jeffj I’m willing to keep helping you troubleshoot this - but from experience here with other people in your boat, it would most likely be faster to rebuild the server clean and fresh with Ubuntu 16 because rebuilding would only take perhaps a few hours. Your problems here could take days to try to resolve, just from past experience. You might also read through this: https://forums.fogproject.org/topic/8775/when-rebuilding-a-fog-server
-
as much as I hate giving up on fixing a problem it appears that rebuilding will be the easier route. thanks for the link for rebuilding fog server I was unaware of how to copy the images and and migrate them to a new server.
-
@jeffj I think this is overly much. Rebuilding is not necessary.
Please run: (if you haven’t rebuilt already):
rm -rf /etc/apache2 /etc/php* sudo apt-get remove lib*php* apache2* php5* php7*
Then rerun the installer.
-
okay after running those commands and re-running the installer it now fails when installing package php7.0-fpm
the fog error log has this to say:
Unpacking php7.0-fpm (7.0.12-1+deb.sury.org~xenial+1) …
Processing triggers for man-db (2.7.5-1) …
Processing triggers for ureadahead (0.100.0-19) …
Processing triggers for systemd (229-4ubuntu11) …
Setting up php7.0-fpm (7.0.12-1+deb.sury.org~xenial+1) …
Not replacing deleted config file /etc/php/7.0/fpm/php.ini
php_invoke: Enable module gettext for fpm sapi
php_invoke: Enable module iconv for fpm sapi
php_invoke: Enable module fileinfo for fpm sapi
php_invoke: Enable module exif for fpm sapi
php_invoke: Enable module ftp for fpm sapi
php_invoke: Enable module shmop for fpm sapi
php_invoke: Enable module sysvsem for fpm sapi
php_invoke: Enable module sockets for fpm sapi
php_invoke: Enable module sysvshm for fpm sapi
php_invoke: Enable module opcache for fpm sapi
php_invoke: Enable module readline for fpm sapi
php_invoke: Enable module bcmath for fpm sapi
php_invoke: Enable module sysvmsg for fpm sapi
php_invoke: Enable module json for fpm sapi
php_invoke: Enable module posix for fpm sapi
php_invoke: Enable module pdo for fpm sapi
php_invoke: Enable module ctype for fpm sapi
php_invoke: Enable module tokenizer for fpm sapi
php_invoke: Enable module calendar for fpm sapi
php_invoke: Enable module phar for fpm sapi
php_invoke: Enable module curl for fpm sapi
NOTICE: Not enabling PHP 7.0 FPM by default.
NOTICE: To enable PHP 7.0 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.0-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script ‘binfmt-support’ missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for scriptbinfmt-support' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script
binfmt-support’
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script ‘screen-cleanup’ missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for scriptscreen-cleanup' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script
screen-cleanup’
Job for php7.0-fpm.service failed because the control process exited with error code. See “systemctl status php7.0-fpm.service” and “journalctl -xe” for details.
invoke-rc.d: initscript php7.0-fpm, action “restart” failed.
dpkg: error processing package php7.0-fpm (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
php7.0-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1) -
@jeffj let me remote in and I had to enable two items to get things working. Once done I’ve added to the functions.sh file to make this more autonomous.
Fresh 16.04 should work fine, but an upgraded 16.04 should work too now (at least with minimal effort as needed/required.)
-
Thanks again tom! marking as solved.
-
@Tom-Elliott Cool. I’m still going to advise against updating the OS though. It causes way too much noise in my day, and imagine people coming from 10 and 12 ? No telling what sort of problems that brings.