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

    Services are not running. Where are the logs?

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    5
    21
    3.7k
    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.
    • dolfD
      dolf
      last edited by

      Eureka! It says:

      Missing Extensions: mysqliroot
      
      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @dolf Please run this find / -xdev -fname "php.ini*" -exec grep "extension" {} /dev/null \; and post the output here.

        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

        1 Reply Last reply Reply Quote 0
        • dolfD
          dolf
          last edited by

          I took the liberty of first:

          • Correcting the command: find / -xdev -name "php.ini*" -exec grep "extension" {} /dev/null \;
          • Uninstalling php5 (since I have php5.6 installed, too)

          Here is the output: php_extensions.txt

          Then I tried this:

          # apt-get install php5.6-mysql
          # phpenmod mysqli
          

          It runs! BUT there is another error:

          PHP Fatal error:  Call to undefined function curl_init() in /var/www/html/fog/lib/fog/fogurlrequests.class.php on line 49
          

          But it didn’t stop running, and a log file appeared at /opt/fog/log!

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • dolfD
            dolf
            last edited by

            And then:

            # rm /var/run/fog/*
            
            # service FOGImageReplicator status
             * FOGImageReplicator is not running
            # service FOGImageReplicator start
             * Starting FOG Computer Imaging Solution: FOGImageReplicator [ OK ] 
            # service FOGImageReplicator status
             * FOGImageReplicator is running
            
            # service FOGMulticastManager status
             * FOGMulticastManager is not running
            # service FOGMulticastManager start 
             * Starting FOG Computer Imaging Solution: FOGMulticastManager [ OK ] 
            # service FOGMulticastManager status
             * FOGMulticastManager is running
            
            # service FOGPingHosts status
             * FOGPingHosts is not running
            # service FOGPingHosts start
             * Starting FOG Computer Imaging Solution: FOGPingHosts [ OK ] 
            # service FOGPingHosts status
             * FOGPingHosts is running
            
            # service FOGScheduler status 
             * FOGScheduler is not running
            # service FOGScheduler start
             * Starting FOG Computer Imaging Solution: FOGScheduler [ OK ] 
            # service FOGScheduler status 
             * FOGScheduler is running
            
            # service FOGSnapinReplicator status
             * FOGSnapinReplicator is not running
            # service FOGSnapinReplicator start
             * Starting FOG Computer Imaging Solution: FOGSnapinReplicator [ OK ] 
            # service FOGSnapinReplicator status
             * FOGSnapinReplicator is running
            

            But after a reboot, they are not running any more:

            # service FOGImageReplicator status
             * FOGImageReplicator is not running
            # service FOGMulticastManager status
             * FOGMulticastManager is not running
            # service FOGPingHosts status
             * FOGPingHosts is not running
            # service FOGScheduler status 
             * FOGScheduler is not running
            # service FOGSnapinReplicator status
             * FOGSnapinReplicator is not running
            

            All of the logs in /opt/fog/log contain the same thing:

            [07-12-16 9:42:11 am] 
                    ___           ___           ___      
                   /\  \         /\  \         /\  \     
                  /::\  \       /::\  \       /::\  \    
                 /:/\:\  \     /:/\:\  \     /:/\:\  \   
                /::\-\:\  \   /:/  \:\  \   /:/  \:\  \  
               /:/\:\ \:\__\ /:/__/ \:\__\ /:/__/_\:\__\ 
               \/__\:\ \/__/ \:\  \ /:/  / \:\  /\ \/__/ 
                    \:\__\    \:\  /:/  /   \:\ \:\__\   
                     \/__/     \:\/:/  /     \:\/:/  /   
                                \::/  /       \::/  /    
                                 \/__/         \/__/     
            
              ###########################################
              #     Free Computer Imaging Solution      #
              #     Credits:                            #
              #     http://fogproject.org/credits       #
              #     GNU GPL Version 3                   #
              ###########################################
            

            Except the service master:

            [07-12-16 9:39:16 am] FOGImageReplicator Start
            [07-12-16 9:39:16 am] FOGImageReplicator forked child process (23817).
            [07-12-16 9:39:16 am] FOGImageReplicator child process (23817) is running.
            [07-12-16 9:39:48 am] service_signal_handler (23816) received signal 2.
            [07-12-16 9:39:48 am] service_signal_handler (23816) killing child (23817).
            [07-12-16 9:39:48 am] service_signal_handler (23816) exiting.
            [07-12-16 9:42:11 am] FOGImageReplicator Start
            [07-12-16 9:42:11 am] FOGImageReplicator forked child process (24066).
            [07-12-16 9:42:11 am] FOGImageReplicator child process (24066) is running.
            [07-12-16 9:42:30 am] FOGMulticastManager Start
            [07-12-16 9:42:30 am] FOGMulticastManager forked child process (24139).
            [07-12-16 9:42:30 am] FOGMulticastManager child process (24139) is running.
            [07-12-16 9:42:42 am] FOGPingHosts Start
            [07-12-16 9:42:42 am] FOGPingHosts forked child process (24184).
            [07-12-16 9:42:42 am] FOGPingHosts child process (24184) is running.
            [07-12-16 9:42:54 am] FOGTaskScheduler Start
            [07-12-16 9:42:54 am] FOGTaskScheduler forked child process (24241).
            [07-12-16 9:42:54 am] FOGTaskScheduler child process (24241) is running.
            [07-12-16 9:43:03 am] FOGImageReplicator Start
            [07-12-16 9:43:03 am] FOGImageReplicator forked child process (24300).
            [07-12-16 9:43:03 am] FOGImageReplicator child process (24300) is running.
            [07-12-16 9:46:11 am] service_signal_handler (24064) received signal 15.
            [07-12-16 9:46:11 am] service_signal_handler (24064) killing child (24066).
            [07-12-16 9:46:11 am] service_signal_handler (24064) exiting.
            [07-12-16 9:46:11 am] service_signal_handler (24136) received signal 15.
            [07-12-16 9:46:11 am] service_signal_handler (24136) killing child (24139).
            [07-12-16 9:46:11 am] service_signal_handler (24136) exiting.
            [07-12-16 9:46:11 am] service_signal_handler (24181) received signal 15.
            [07-12-16 9:46:11 am] service_signal_handler (24181) killing child (24184).
            [07-12-16 9:46:11 am] service_signal_handler (24181) exiting.
            [07-12-16 9:46:11 am] service_signal_handler (24238) received signal 15.
            [07-12-16 9:46:11 am] service_signal_handler (24238) killing child (24241).
            [07-12-16 9:46:11 am] service_signal_handler (24238) exiting.
            [07-12-16 9:46:11 am] service_signal_handler (24298) received signal 15.
            [07-12-16 9:46:11 am] service_signal_handler (24298) killing child (24300).
            [07-12-16 9:46:11 am] service_signal_handler (24298) exiting.
            

            They fail to start using service FOGxxx start, since the pids still exist in /var/run/fog. Deleting those and starting manually as in the beginning of this post works.

            1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @dolf
              last edited by

              @dolf said in Services are not running. Where are the logs?:

              Call to undefined function curl_init() in

              If you run:
              sudo apt-get install php5-curl Then:

              sudo service FOGMulticastManager stop
              sudo service FOGImageReplicator stop
              sudo service FOGSnapinReplicator stop
              sudo service FOGPingHosts stop
              sudo service FOGScheduler stop
              sleep 10
              sudo service FOGMulticastManager start
              sudo service FOGImageReplicator start
              sudo service FOGSnapinReplicator start
              sudo service FOGPingHosts start
              sudo service FOGScheduler start
              

              I think you’re close now.

              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

              1 Reply Last reply Reply Quote 0
              • dolfD
                dolf
                last edited by

                My bad. I didn’t enable the apache php5.6 module after uninstalling php5.

                # a2enmod php5.6
                # service apache2 restart
                

                Still didn’t work. It seems like I broke my php and/or webserver. After reading this, I noticed that the php mime config was missing. So I did the brave thing and purges all versions of php and apache from my server. Starting over…

                1 Reply Last reply Reply Quote 0
                • dolfD
                  dolf
                  last edited by

                  AHA! After purging all forms of PHP and Apache from my server, I re-ran the fog installer. (Discovered some apt issues with old and obsolete packages. Killed those by uninstalling everything that I don’t need. Ran the fog installer again. Then it worked.) Still got errors about mysqliroot and curl_init() being missing, but then I had this idea:

                  Apache2 is using the php5 module, so it always invokes php5. php5-curl and php5-mysql were installed. But the fog installer also caused php7.0 to be installed. php7.0-curl and php7.0-mysql were not installed. So I checked which version was being used on the command line:

                  # update-alternatives --config php
                  There are 2 choices for the alternative php (providing /usr/bin/php).
                  
                    Selection    Path             Priority   Status
                  ------------------------------------------------------------
                  * 0            /usr/bin/php7.0   70        auto mode
                    1            /usr/bin/php5     50        manual mode
                    2            /usr/bin/php7.0   70        manual mode
                  
                  Press enter to keep the current choice[*], or type selection number: 1
                  update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in manual mode
                  

                  Sure enough, it started working after changing from php7.0 to php5. All services are running, even after a reboot.

                  I am a happy bloke.

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @dolf Great to see you got this sorted! Seems like the system was a bit messed up. 😉

                    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

                    1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman @dolf
                      last edited by Wayne Workman

                      @dolf I guess another route would be to install those php 7 things.

                      Sounds to me like you didn’t install FOG on Ubuntu 14 with the recommended command for php7. Let me find that…

                      here’s the command to have FOG use all PHP 7:

                      php_ver='7.0' php_verAdds='-7.0' ./installfog.sh

                      If running Ubuntu 16, you’ll need to use that command to start the installer, and THEN when it asks for the DB to be updated - You’d go into MySQL and make a tweak to the root user:
                      ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
                      And then continue to the web interface to update fog.

                      This is referencing a post I made here:
                      https://forums.fogproject.org/topic/7131/fog-on-ubuntu-16-04-php7/27

                      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
                      • dolfD
                        dolf
                        last edited by

                        I’m on Ubuntu 14.04 though…
                        Anyway, it’s working with php5.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post

                        199

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project