• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Restarting Apache2 for fog vhost Failed!

Scheduled Pinned Locked Moved Solved
FOG Problems
3
13
3.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    jeffj
    last edited by jeffj Oct 18, 2016, 10:34 AM Oct 18, 2016, 4:22 PM

    Server
    • FOG Version: 1.3 RC-14
    • OS: Ubuntu 16.04
    Description

    So I have been working on getting fog installed on the ubuntu 16.04…

    obligatory I know I shouldn’t upgrade the os willy nilly because it causes problems most of the time.

    never the less I have done it and I am having problems on the install. this is an upgrade, btw it was on 14.04 and the fog version was 1.3 RC-8.

    I have read though the other posts pertaining to installing on 16.04 and it appears some people have had mixed results when installing this. Unfortunately, I have not had any luck getting it to work.

    I have commented out the packages line in the .fogsettings and deleted the php version info from php-var and php-varadd lines. everything appears to install fine up to the restarting of apache2 which fails.

    when checking the status of apache2 after the failed install shows it is failed (result: exit code).
    I also checked the fog error log in the /foginstalllocation/bin/error_log(s) folder and this is what is at the end of the log:

    Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []:Email Address []:
    Please enter the following ‘extra’ attributes
    to be sent with your certificate request
    A challenge password []:An optional company name []:Signature ok
    subject=/CN=10.3.1.100
    Getting CA Private Key
    ln: failed to create symbolic link ‘/var/www/html/fog/fog’: File exists
    Enabling module php.
    To activate the new configuration, you need to run:
    service apache2 restart
    Enabling module rewrite.
    To activate the new configuration, you need to run:
    service apache2 restart
    Considering dependency setenvif for ssl:
    Module setenvif already enabled
    Considering dependency mime for ssl:
    Module mime already enabled
    Considering dependency socache_shmcb for ssl:
    Enabling module socache_shmcb.
    Enabling module ssl.
    See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
    To activate the new configuration, you need to run:
    service apache2 restart
    Enabling site 001-fog.
    To activate the new configuration, you need to run:
    service apache2 reload
    Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.
    ● apache2.service - LSB: Apache2 web server
    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 10:00:50 CDT; 2s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 20583 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
    Oct 18 10:00:50 fog apache2[20583]: *
    Oct 18 10:00:50 fog apache2[20583]: * The apache2 configtest failed.
    Oct 18 10:00:50 fog apache2[20583]: Output of config test was:
    Oct 18 10:00:50 fog apache2[20583]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
    Oct 18 10:00:50 fog apache2[20583]: Action ‘configtest’ failed.
    Oct 18 10:00:50 fog apache2[20583]: The Apache error log may have more information.
    Oct 18 10:00:50 fog systemd[1]: apache2.service: Control process exited, code=exited status=1
    Oct 18 10:00:50 fog systemd[1]: Failed to start LSB: Apache2 web server.
    Oct 18 10:00:50 fog systemd[1]: apache2.service: Unit entered failed state.
    Oct 18 10:00:50 fog systemd[1]: apache2.service: Failed with result ‘exit-code’.

    After the failed install apache2 will not restart until i purge and re-install it

    I noticed these lines in particular

    Oct 18 10:00:50 fog apache2[20583]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory

    I am guessing some config file for apache is being changed which breaks it.

    Thank you ahead of time for your help!

    Edit: Here is some more information to maybe help resolve this problem.

    when running dpkg -l | grep php this is the output

    ii libapache2-mod-php7.0 7.0.12-1+deb.sury.org~xenial+1 i386 server-side, HTML-embedded scripting language (Apache 2 module)
    ii php-common 1:45+deb.sury.org~xenial+1 all Common files for PHP packages
    ii php-gettext 1.0.11-2+deb.sury.org~xenial+1 all read gettext MO files directly, without requiring anything other than PHP
    ii php-pear 1:1.10.1+submodules+notgz-8+donate.sury.org~xenial+2 all PEAR Base System
    ii php-xml 1:7.0+45+deb.sury.org~xenial+1 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
    ii php7.0 7.0.12-1+deb.sury.org~xenial+1 all server-side, HTML-embedded scripting language (metapackage)
    ii php7.0-bcmath 7.0.12-1+deb.sury.org~xenial+1 i386 Bcmath module for PHP
    ii php7.0-cli 7.0.12-1+deb.sury.org~xenial+1 i386 command-line interpreter for the PHP scripting language
    ii php7.0-common 7.0.12-1+deb.sury.org~xenial+1 i386 documentation, examples and common module for PHP
    ii php7.0-curl 7.0.12-1+deb.sury.org~xenial+1 i386 CURL module for PHP
    ii php7.0-fpm 7.0.12-1+deb.sury.org~xenial+1 i386 server-side, HTML-embedded scripting language (FPM-CGI binary)
    ii php7.0-gd 7.0.12-1+deb.sury.org~xenial+1 i386 GD module for PHP
    ii php7.0-json 7.0.12-1+deb.sury.org~xenial+1 i386 JSON module for PHP
    ii php7.0-ldap 7.0.12-1+deb.sury.org~xenial+1 i386 LDAP module for PHP
    ii php7.0-mbstring 7.0.12-1+deb.sury.org~xenial+1 i386 MBSTRING module for PHP
    ii php7.0-mcrypt 7.0.12-1+deb.sury.org~xenial+1 i386 libmcrypt module for PHP
    ii php7.0-mysql 7.0.12-1+deb.sury.org~xenial+1 i386 MySQL module for PHP
    ii php7.0-opcache 7.0.12-1+deb.sury.org~xenial+1 i386 Zend OpCache module for PHP
    ii php7.0-readline 7.0.12-1+deb.sury.org~xenial+1 i386 readline module for PHP
    ii php7.0-xml 7.0.12-1+deb.sury.org~xenial+1 i386 DOM, SimpleXML, WDDX, XML, and XSL module for PHP

    1 Reply Last reply Reply Quote 0
    • W
      Wayne Workman
      last edited by Oct 18, 2016, 4:48 PM

      So what is line 140 of /etc/apache2/apache2.conf and line 1 of /etc/apache2/mods-enabled/php.load ?

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • J
        jeffj
        last edited by jeffj Oct 18, 2016, 11:07 AM Oct 18, 2016, 4:57 PM

        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.

        W 2 Replies Last reply Oct 18, 2016, 5:07 PM Reply Quote 0
        • W
          Wayne Workman @jeffj
          last edited by Oct 18, 2016, 5:07 PM

          @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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • W
            Wayne Workman @jeffj
            last edited by Wayne Workman Oct 18, 2016, 11:09 AM Oct 18, 2016, 5:09 PM

            @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

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            J 1 Reply Last reply Oct 18, 2016, 5:28 PM Reply Quote 0
            • J
              jeffj @Wayne Workman
              last edited by jeffj Oct 18, 2016, 11:29 AM Oct 18, 2016, 5:28 PM

              @Wayne-Workman

              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)

              W 1 Reply Last reply Oct 18, 2016, 6:11 PM Reply Quote 0
              • W
                Wayne Workman @jeffj
                last edited by Oct 18, 2016, 6:11 PM

                @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

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                J 1 Reply Last reply Oct 18, 2016, 6:58 PM Reply Quote 0
                • J
                  jeffj @Wayne Workman
                  last edited by Oct 18, 2016, 6:58 PM

                  @Wayne-Workman

                  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.

                  T 1 Reply Last reply Oct 18, 2016, 7:39 PM Reply Quote 1
                  • T
                    Tom Elliott @jeffj
                    last edited by Oct 18, 2016, 7:39 PM

                    @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.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    J 2 Replies Last reply Oct 18, 2016, 8:01 PM Reply Quote 0
                    • J
                      jeffj @Tom Elliott
                      last edited by Oct 18, 2016, 8:01 PM

                      @Tom-Elliott

                      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 script binfmt-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 script screen-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)

                      T 1 Reply Last reply Oct 18, 2016, 8:33 PM Reply Quote 0
                      • T
                        Tom Elliott @jeffj
                        last edited by Oct 18, 2016, 8:33 PM

                        @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.)

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        W 1 Reply Last reply Oct 18, 2016, 9:45 PM Reply Quote 0
                        • J
                          jeffj @Tom Elliott
                          last edited by Oct 18, 2016, 8:35 PM

                          @Tom-Elliott

                          Thanks again tom! marking as solved.

                          1 Reply Last reply Reply Quote 0
                          • W
                            Wayne Workman @Tom Elliott
                            last edited by Wayne Workman Oct 18, 2016, 3:46 PM Oct 18, 2016, 9:45 PM

                            @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.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                            Daily Clean Installation Results:
                            https://fogtesting.fogproject.us/
                            FOG Reporting:
                            https://fog-external-reporting-results.fogproject.us/

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            1 / 1
                            • First post
                              9/13
                              Last post

                            186

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project