UNSOLVED Updating database Failed Error returned: <!DOCTYPE HTML PUBLIC .... 503 Service unavailable ....

  • Hi there!

    Sorry to bother you with a problem that you have already solved for others a couple of times, but it seems that the solutions don’t work for my just installed fog server. I did set up a IBM X3650 with the newest CEntOS 7.6 version following the instructions offered by the FOG project site https://wiki.fogproject.org/wiki/index.php?title=CentOS_7#Configuring_partitions_for_FOG

    The only differenz is that I disabled the internal firewall and I am not using SELinux .
    The installation of the fog software was successfull and the first test went well untill it said: Image captured … done
    Stopping FOG Status Reporter …done
    Task Complete
    Updating Database … failed
    Error returned: <!DOCTYPE HTML PUBLIC*_/…
    <title> 503 Service Unavailable </title>

    The first tests failed with could not complete tasking because the files /bin/fog.download and /bin fog.upload were not found.
    So I searched for them on another fog server we already had in use and created them as well along with the path where they were found at the other server

    and as this did not solve the problem as well directly under /bin .
    The other server was recently updated from fog 1.2.0 to 1.5.4 .

    Creating those files helped to get further in the process of the test but
    now the update f the database always fails. I observed that the image apears in /images/dev and is moved to /images and is even renamed as it should be but after the updating of the database fails the image disapears from /images again and no trace of it could be found in /images/dev eather !

    Ain’t that strange???
    I searched the internet for related postings and found some
    for example …
    Wayne Workman Feb 11, 2016, 5:40 PM

    Problem and solution documented in the Wiki here: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_FTP#Updating_Database...Failed

    went through the different points and checked everything as proposed but was not able to solve the problem.

    One thing I noticed was that there was a very long encrypted “password” in the .fogsettings file which was a lot shorter in the .fogsettings of the other fog server which in fact has the same password for fog. I made sure that the password is the same for the “web gui user” fog the storage default fog user and the linux fog user.
    As I found a hint in the internet related to the password in the tftpd section I checked that too and found out that this was still “password”. I changed it to be the same as the other password in use but that did not help eather and comparing with the other node I saw that it was “password” too in the tftpd section. So I decided to set it back to “password”. I even tried to enter the password that I use for all fog users in plane text in the .fogsettings for"password=xxxxxxxx"
    because some other guy was adviced ot take the password from the .fogsettings file and use it somewhere else to reset the password - what I did not quite understand as it is encrypted in my .fogsettings - but that made me hope that it might work the otherway round too but it did not.
    I will leave office soon for today but would appreciate your support tomorrow if possible. Please let me know which config files or logs you need to analyse my little problem here. Or maybe tell me were I did something wrong according to my description here.
    Kind regards


  • @aborn

    Good day.

    Did you get any resolution for this problem?

    I have Fog 1.5.7 on CentOS 7 with the specified partition sizes. All other settings as default, firewall and SELinux are disabled. My image name is W10E.

    I get the same results as you did, also with the image files appearing in the /images/dev folder, then in /images/W10E and then disappearing again.

    I sort of got around it by copying the /W10E folder to /W10E (copy), wait for /W10E to disappear and then rename the copy as /W10E. And I can deploy this image, absolutely no problem.

    Many thanks

  • Senior Developer

    @aborn said in Updating database Failed Error returned: <!DOCTYPE HTML PUBLIC .... 503 Service unavailable ....:

    The ftp connection with the fog user and the fog password that I did choose for the Linux user,
    the web GUI user and the storage default in the web GUI was rechecked and worked in every case.

    That definitely sounds like you have been playing with the fog Linux user account. This is not to be fiddled with. It’s the FOG service account and it will break things if you change the password!! This account/password is different to the one you use to login to the web UI!!


    It’s interesting you see the “503 Service unavailable” error. Please check the apache and php-fpm logs and post here. See my signature on where to find the logs.

    The other server was recently updated from fog 1.2.0 to 1.5.4 .

    Please tell us which FOG version you run on this particular server you have the error with.

  • Hi george1421,

    first 'd like to thank you very much for your quick reaction.
    Your effort to help me solve my problem is highly appreciated!
    Regrettably this didn’t solve my problem.
    I still have the same issue the update of the mariadb still fails.
    The Selinux is in permissive mode now and a check of the DB proved that the DB itself is not
    showing any problem:

    [root@myserver ~]# mysqlcheck --all-databases
    fog.clientUpdates                                  OK
    fog.dirCleaner                                     OK
    fog.globalSettings                                 OK
    fog.greenFog                                       OK
    fog.groupMembers                                   OK
    fog.groups                                         OK
    fog.history                                        OK
    fog.hookEvents                                     OK
    fog.hostAutoLogOut                                 OK
    fog.hostMAC                                        OK
    fog.hostScreenSettings                             OK
    fog.hosts                                          OK
    fog.imageGroupAssoc                                OK
    fog.imagePartitionTypes                            OK
    fog.imageTypes                                     OK
    fog.images                                         OK
    fog.imagingLog                                     OK
    fog.inventory                                      OK
    fog.ipxeTable                                      OK
    fog.keySequence                                    OK
    fog.moduleStatusByHost                             OK
    fog.modules                                        OK
    fog.multicastSessions                              OK
    fog.multicastSessionsAssoc                         OK
    fog.nfsFailures                                    OK
    fog.nfsGroupMembers                                OK
    fog.nfsGroups                                      OK
    fog.notifyEvents                                   OK
    fog.os                                             OK
    fog.oui                                            OK
    fog.plugins                                        OK
    fog.powerManagement                                OK
    fog.printerAssoc                                   OK
    fog.printers                                       OK
    fog.pxeMenu                                        OK
    fog.scheduledTasks                                 OK
    fog.schemaVersion                                  OK
    fog.snapinAssoc                                    OK
    fog.snapinGroupAssoc                               OK
    fog.snapinJobs                                     OK
    fog.snapinTasks                                    OK
    fog.snapins                                        OK
    fog.supportedOS                                    OK
    fog.taskLog                                        OK
    fog.taskStates                                     OK
    fog.taskTypes                                      OK
    fog.tasks                                          OK
    fog.userCleanup                                    OK
    fog.userTracking                                   OK
    fog.users                                          OK
    fog.virus                                          OK
    mysql.columns_priv                                 OK
    mysql.db                                           OK
    mysql.event                                        OK
    mysql.func                                         OK
    mysql.help_category                                OK
    mysql.help_keyword                                 OK
    mysql.help_relation                                OK
    mysql.help_topic                                   OK
    mysql.host                                         OK
    mysql.ndb_binlog_index                             OK
    mysql.plugin                                       OK
    mysql.proc                                         OK
    mysql.procs_priv                                   OK
    mysql.proxies_priv                                 OK
    mysql.servers                                      OK
    mysql.tables_priv                                  OK
    mysql.time_zone                                    OK
    mysql.time_zone_leap_second                        OK
    mysql.time_zone_name                               OK
    mysql.time_zone_transition                         OK
    mysql.time_zone_transition_type                    OK
    mysql.user                                         OK
    [root@myserver ~]#getenforce

    The ftp connection with the fog user and the fog password that I did choose for the Linux user,
    the web GUI user and the storage default in the web GUI was rechecked and worked in every case.
    Login to the web GUI works , ftp connection is successfull, Linux login is working .
    The password in the tftpd section was set back to “password” but that doesn’t seem to make any difference.
    As an additional information I add the .fogsettings for you to check (IP addresses hidden for security reasons):

    [root@myserver fog]# cat .fogsettings
    ## Start of FOG Settings
    ## Created by the FOG Installer
    ## Find more information about this file in the FOG Project wiki:
    ##     https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
    ## Version: 1.5.4
    ## Install time: Mi 27 Mär 2019 08:36:26 CET
    routeraddress='# option routers      x.x.x.x;';'
    dnsaddress='# option domain-name-servers      x.x.x.x; ';
    packages='bc curl dhcp gcc gcc-c++ genisoimage gzip httpd lftp m4 make mariadb mariadb-server mod_ssl mtools net-tools nfs-utils php php-bcmath php-cli php-common php-fpm php-gd php-ldap php-mbstring php-mcrypt php-mysqlnd php-process syslinux tar tftp-server unzip vsftpd wget xinetd xz-devel '
    ## End of FOG Settings
    [root@myserver fog]#

    Any other ideas or proposals?

    kind regards


  • Moderator

    @aborn said in Updating database Failed Error returned: <!DOCTYPE HTML PUBLIC .... 503 Service unavailable ....:

    I am not using SELinux .

    FWIW on centos selinux is enabled by default. Be sure its set to permissive mode.

    The updating database error is typically related to someone changing the linux user fog's password so that its different than what the FOG webui has been setup for. Just as a double check run through this tutorial to ensure that the password hadn’t been tweaked. https://forums.fogproject.org/topic/11203/resyncing-fog-s-service-account-password

    Also if you connect to the fog server over FTP using the user id of fog and the password found in the /opt/fog/.fogsettings file, then we can rule out the common problems.

    I assume you can still access the fog webui when it throws that error?

    First check selinux status, then ensure that the linux user fog's password is set correctly, and then come back for the next steps.