Fog Services not starting on Server
-
Hello,
My original problem was that I couldn’t multicast, so the first thing I looked at was whether or not the service was active; it wasn’t. When I attempted to start it myself, it failed.
I have no clue as to what I need to look for to see why this is happening. Please let me know of any relevant logs that I should look through or that I should post here.
Slightly related; the FOGImageReplicator service is also not running and fails to start when requested, but I can still unicast images to clients. Is this normal?
-
I also had this problem. Read here. YMMV.
-
What OS is fog running on? What version of FOG?
-
@Wayne-Workman Ubuntu 14.04 LTS, v8533, r5891.
-
@zpoling Did you try to install PHP 7 or not? Just asking at this point.
-
I ran the service script itself for the FOGImageReplicator and this was the output.
root@Fog:~# /opt/fog/service/FOGImageReplicator/FOGImageReplicator PHP Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (America.New_York)' in /var/www/html/fog/lib/fog/fogbase.class.php:93 Stack trace: #0 [internal function]: DateTimeZone->__construct('America.New_Yor...') #1 /var/www/html/fog/lib/fog/fogbase.class.php(93): ReflectionClass->newInstance('America.New_Yor...') #2 /var/www/html/fog/lib/fog/fogbase.class.php(266): FOGBase::getClass('DateTimeZone', 'America.New_Yor...') #3 /var/www/html/fog/lib/fog/fogbase.class.php(270): FOGBase::nice_date('now', false) #4 /opt/fog/service/lib/service_lib.php(10): FOGBase->formatTime('now', 'm-d-y g:i:s a') #5 /opt/fog/service/lib/service_lib.php(44): service_log_message('/opt/fog/log/se...', 'FOGImageReplica...', 'Start') #6 /opt/fog/service/FOGImageReplicator/FOGImageReplicator(7): service_persist('FOGImageReplica...') #7 {main}thrown in /var/www/html/fog/lib/fog/fogbase.class.php on line 93
It seems to be seeing something about the timezone, but I went into the fogbase.class.php and found nothing to do with the timezone.
-
@zpoling going to guess your php.ini date.timezone is set to America.New_York when it should be America/New_York
-
Check your server’s timezone:
cat /etc/timezone
Find your
php.ini
files:sudo find /etc -name php.ini
Example output:
/etc/php5/cli/php.ini /etc/php5/apache2/php.ini /etc/php5/fpm/php.ini
Open each one and check the value of
date.timezone
-
/etc/php5/apache2/php.ini? It’s correct in this file. It is America/New_York.
-
@zpoling Apache is GUI services are cli
-
@dolf It was wrong in the fpm directory, thanks.
Rerunning the service script directly now does nothing. It puts me on a new line and does nothing. The service still does not want to start properly either.
-
@zpoling Check the apache error logs.
/var/log/apache2/
-
Reran the fog installer and now all of the services are running. I’m going to reboot and see if the services restart as well.
-
@Wayne-Workman What should I be looking for? There’s a lot of crap in it.
-
@zpoling If everything is working, don’t worry about it.
-
@Wayne-Workman I just wanted to update you on what I saw as I got it working.
In the multicast log, it was showing 0 tasks to be cleaned, but 3 tasks were found. Always. Every way I’ve seen here on the forums to destroy any udp casting tasks did not change the log continuing to show those 3 tasks. On two of the laptops I just happened to be trying to multicast that day, I took all source of power away and held the power button for 10 seconds. I then started a multicast task for those two, and they worked. Keep in mind that I haven’t been able to multicast for a few weeks now. I find it odd that that’s all I had to do, and on two random laptops at that.
Also with the timezone issue, the services not starting was happening before I even tried to set the timezone prefrences. I tried to set the timezone purely because my multicast log was showing dates four-five hours away. I don’t know the exact time, because the log is now reporting the dates correctly.