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

Image capturing: Updating Database...Failed

Scheduled Pinned Locked Moved Solved
FOG Problems
4
23
2.5k
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.
  • E
    EStegenburgs
    last edited by Nov 28, 2019, 3:39 PM

    I have set up FOG Server 1.5.7 on CentOS 7.0.1908 Minimal via VirtualBox. All seems to work - host registration, image capture/upload, but then I get this:
    020e87c0-2b4b-4335-8a6e-96052086a688-image.png

    It just tries to do the last process several times for a few minutes until the system reboots. Checking the WEB GUI Task Management panel, the task never finishes with the status being in-progess.

    Does the client need any other network connection somewhere, or what is the problem?

    1 Reply Last reply Reply Quote 0
    • Q
      Quazz Moderator
      last edited by Nov 28, 2019, 3:58 PM

      What does the Virtualbox configuration look like?

      1 Reply Last reply Reply Quote 0
      • E
        EStegenburgs
        last edited by Nov 28, 2019, 5:07 PM

        Legacy BIOS mode.

        Network configuration:
        Server - the first network adapter is NAT, and the second one is VM internal.
        Client - the first network adapter is VM internal, and the second one is NAT.

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Nov 28, 2019, 5:20 PM

          @EStegenburgs Take a look at the Apache and PHP-FPM logs and post relevant information here. See my signature on where to find the logs.

          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

          E 1 Reply Last reply Dec 1, 2019, 7:06 AM Reply Quote 0
          • E
            EStegenburgs @Sebastian Roth
            last edited by Dec 1, 2019, 7:06 AM

            @Sebastian-Roth This seems very suspicious:

            /var/log/php-fpm/www-error.log (11 rows like that)

            [01-Dec-2019 06:40:33 UTC] PHP Warning:  ftp_login(): Please specify the password. in /var/www/html/fog/lib/fog/fogftp.class.php on line 464
            

            I deleted all log files and verified that the above appeared only after the image capture.
            Should I edit the given file by the log?

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Dec 1, 2019, 7:55 AM

              @EStegenburgs said in Image capturing: Updating Database...Failed:

              PHP Warning: ftp_login(): Please specify the password.

              This looks like the password is not set. Please take a look at the storage node settings (http://your.fog.server.ip/fog/management/index.php?node=storage&sub=edit&id=1) and see if the last field Management Password is empty. If it is empty then take a look at /var/www/html/fog/lib/fog/config.class.php and fine the lines where TFTP_FTP_PASSWORD is defined. Copy that password to the web UI, save and things should work then. Also check the setting Management Username - should be set to fogproject.

              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

              E 1 Reply Last reply Dec 1, 2019, 8:34 AM Reply Quote 0
              • E
                EStegenburgs @Sebastian Roth
                last edited by Dec 1, 2019, 8:34 AM

                @Sebastian-Roth I haven’t altered any username/password settings, except for the root of CentOS.

                The Management Password already was set and it matches with TFTP_FTP_PASSWORD in /var/www/html/fog/lib/fog/config.class.php, as well as with the password under WEB GUI -> FOG Configuration -> FOG Settings -> TFTP Server. Also, the usernames match (fogproject).

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Dec 1, 2019, 8:37 AM

                  @EStegenburgs Interesting. From the error message I’d expect that it wasn’t able to read the password set in the DB and tried to login with an empty password. But maybe I am wrong.

                  Please get FileZilla or some other FTP client program and try connecting to your FOG server using exactly those credentials you find in config.class.php / web UI -> storage node settings. Does it work?

                  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

                  E 1 Reply Last reply Dec 1, 2019, 8:51 AM Reply Quote 0
                  • E
                    EStegenburgs @Sebastian Roth
                    last edited by Dec 1, 2019, 8:51 AM

                    @Sebastian-Roth I am able to login through VM locally and PuTTY remotely with fogproject account, however, I am immediately logged out.

                    This is what I am getting with FileZilla:

                    Status:	Resolving address of localhost
                    Status:	Connecting to [::1]:21...
                    Status:	Connection attempt failed with "ECONNREFUSED - Connection refused by server", trying next address.
                    Status:	Connecting to 127.0.0.1:21...
                    Status:	Connection established, waiting for welcome message...
                    Status:	Insecure server, it does not support FTP over TLS.
                    Status:	Logged in
                    Status:	Retrieving directory listing...
                    Command:	PWD
                    Response:	257 "/home/fogproject"
                    Command:	TYPE I
                    Response:	200 Switching to Binary mode.
                    Command:	PASV
                    Response:	227 Entering Passive Mode (10,0,2,15,160,161).
                    Command:	LIST
                    Error:	Connection timed out after 20 seconds of inactivity
                    Error:	Failed to retrieve directory listing
                    
                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Dec 1, 2019, 9:34 AM

                      @EStegenburgs Don’t use console/SSH! Sorry, I should have made this more clear.

                      Error: Connection timed out after 20 seconds of inactivity
                      Error: Failed to retrieve directory listing

                      Have you disabled the firewall on the FOG server?

                      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

                      E 1 Reply Last reply Dec 1, 2019, 9:43 AM Reply Quote 0
                      • E
                        EStegenburgs @Sebastian Roth
                        last edited by Dec 1, 2019, 9:43 AM

                        @Sebastian-Roth Does anything happen if I try to SSH login to fogproject even though I cannot do anything there because I am logged out?

                        The firewall is not disabled, I followed this guide:
                        https://wiki.fogproject.org/wiki/index.php?title=CentOS_7

                        While trying bunch of things, I have tried to disable the firewall and setting SELINUX=disabled, but haven’t seen any improvements so far. Should I try again?

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by Sebastian Roth Dec 1, 2019, 4:42 AM Dec 1, 2019, 10:40 AM

                          @EStegenburgs said in Image capturing: Updating Database...Failed:

                          While trying bunch of things, I have tried to disable the firewall and setting SELINUX=disabled, but haven’t seen any improvements so far. Should I try again?

                          Did you reboot the server after that? Cheanging the SELinux setting in the config will not make it disable straight away. You need to reboot or run setenforce 0…

                          The firewall and SELinux stuff in the wiki article you mentioned should be up to date for CentOS 7. Maybe different for CentOS 8. Please let us know if it turns out the instructions on setting the firewall rules seem to cause this problem. I suspect it’s SELinux in your case but you never know.

                          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

                          E 1 Reply Last reply Dec 1, 2019, 12:03 PM Reply Quote 0
                          • E
                            EStegenburgs @Sebastian Roth
                            last edited by Dec 1, 2019, 12:03 PM

                            @Sebastian-Roth I just performed two clean installations. There was a bug on the first try. The Storage Management Password did not match with TFTP Server password, the former being \\f|-(u%33Wr and the later f|-(u%33Wr.

                            I did the following before FOG installation:

                            vi /etc/selinux/config
                            ... SELINUX=disabled
                            systemctl disable firewalld
                            systemctl stop firewalld
                            reboot
                            

                            Then FOG installer did not ask to disable the firewall.
                            Used the settings as here: https://wiki.fogproject.org/wiki/index.php/FOG_on_an_Isolated_Network

                            But now I have the same situation as before.

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sebastian Roth Moderator
                              last edited by Dec 1, 2019, 12:09 PM

                              @EStegenburgs Do you use CentOS 7 or 8? I will do a test setup and see if I can replicate the issue.

                              Used the settings as here: https://wiki.fogproject.org/wiki/index.php/FOG_on_an_Isolated_Network

                              Do you also have an isolated network setup or do you just mean you answered the installer questions similar to what we have in the wiki article?

                              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

                              E 1 Reply Last reply Dec 1, 2019, 12:31 PM Reply Quote 0
                              • E
                                EStegenburgs @Sebastian Roth
                                last edited by Dec 1, 2019, 12:31 PM

                                @Sebastian-Roth CentOS 7. I am using the systems as described in the first post.
                                Also, yes, I have an isolated network in the VirtualBox environment.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Sebastian Roth Moderator
                                  last edited by Dec 1, 2019, 3:40 PM

                                  @EStegenburgs What exactly do you mean by “isolated network in the VirtualBox environment”? Is it set to host only, NAT, NAT network, bridged? While I don’t think any specific VM network setting can cause this issue it’s still be good to know just in case.

                                  I’ve just done a complete fresh minimal CentOS 7 install. First I setup a VirtualBox VM with bridged network, ran the CentOS 7 installer followed by these commands:

                                  # yum update
                                  # sed -i.bak 's/^.*\SELINUX=enforcing\b.*$/SELINUX=permissive/' /etc/selinux/config
                                  # systemctl stop firewalld
                                  # systemctl disable firewalld
                                  # reboot
                                  

                                  Now when it’s back up I checked SELinux and firewall:

                                  # getenforce
                                  Permissive
                                  # iptables -L -n -v
                                  Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
                                   pkts bytes target     prot opt in     out     source               destination         
                                  
                                  Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
                                   pkts bytes target     prot opt in     out     source               destination         
                                  
                                  Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
                                   pkts bytes target     prot opt in     out     source               destination         
                                  

                                  Now downloaded and installed FOG:

                                  curl -L -o 1.5.7.tar.gz https://github.com/FOGproject/fogproject/archive/1.5.7.tar.gz
                                  tar xzf 1.5.7.tar.gz
                                  cd fogproject-1.5.7/bin/
                                  ./installfog.sh
                                  

                                  Following all the instructions, updated the schema and then tried to connect via FTP from localhost and from an external machine.

                                  Listing from FileZilla connect:

                                  Status:	Connecting to 192.168.24.130:21...
                                  Status:	Connection established, waiting for welcome message...
                                  Response:	220 (vsFTPd 3.0.2)
                                  Command:	USER fogproject
                                  Response:	331 Please specify the password.
                                  Command:	PASS ************
                                  Response:	230 Login successful.
                                  Command:	SYST
                                  Response:	215 UNIX Type: L8
                                  Command:	FEAT
                                  Response:	211-Features:
                                  Response:	 EPRT
                                  Response:	 EPSV
                                  Response:	 MDTM
                                  Response:	 PASV
                                  Response:	 REST STREAM
                                  Response:	 SIZE
                                  Response:	 TVFS
                                  Response:	 UTF8
                                  Response:	211 End
                                  Command:	OPTS UTF8 ON
                                  Response:	200 Always in UTF8 mode.
                                  Status:	Connected
                                  Status:	Retrieving directory listing...
                                  Command:	PWD
                                  Response:	257 "/home/fogproject"
                                  Command:	TYPE I
                                  Response:	200 Switching to Binary mode.
                                  Command:	PASV
                                  Response:	227 Entering Passive Mode (192,168,24,130,22,169).
                                  Command:	LIST
                                  Response:	150 Here comes the directory listing.
                                  Response:	226 Directory send OK.
                                  Status:	Calculating timezone offset of server...
                                  Command:	MDTM warnfogaccount.sh
                                  Response:	213 20191201151442
                                  Status:	Timezone offsets: Server: 0 seconds. Local: 3600 seconds. Difference: 3600 seconds.
                                  Status:	Directory listing successful
                                  

                                  localhost command line FTP:

                                  Trying ::1...
                                  ftp: connect to address ::1Connection refused
                                  Trying 127.0.0.1...
                                  Connected to localhost (127.0.0.1).
                                  220 (vsFTPd 3.0.2)
                                  Name (localhost:root): fogproject
                                  331 Please specify the password.
                                  Password:
                                  230 Login successful.
                                  Remote system type is UNIX.
                                  Using binary mode to transfer files.
                                  ftp> ls
                                  227 Entering Passive Mode (127,0,0,1,148,218).
                                  150 Here comes the directory listing.
                                  -rwxr-xr-x    1 0        0             681 Dec 01 15:14 warnfogaccount.sh
                                  226 Directory send OK.
                                  ftp> 221 Goodbye.
                                  

                                  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

                                  E 1 Reply Last reply Dec 1, 2019, 6:36 PM Reply Quote 0
                                  • E
                                    EStegenburgs @Sebastian Roth
                                    last edited by Dec 1, 2019, 6:36 PM

                                    @Sebastian-Roth said in Image capturing: Updating Database...Failed:

                                    What exactly do you mean by “isolated network in the VirtualBox environment”? Is it set to host only, NAT, NAT network, bridged?

                                    The first network adapter is NAT (enp0s3), and the second one is VM internal (enp0s8).

                                    E 1 Reply Last reply Dec 1, 2019, 6:46 PM Reply Quote 0
                                    • E
                                      EStegenburgs @EStegenburgs
                                      last edited by Dec 1, 2019, 6:46 PM

                                      When I meant “isolated”, FOG is set up to use the internal network through the second adapter enp0s8.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Sebastian Roth Moderator
                                        last edited by Sebastian Roth Dec 1, 2019, 4:14 PM Dec 1, 2019, 10:13 PM

                                        @EStegenburgs said:

                                        The first network adapter is NAT (enp0s3), and the second one is VM internal (enp0s8).

                                        So when the installer asks you about which network adapter you want to use, what did you say? I have to admit that my setup is a little different and that I have not tested it this way yet. But I remember there is an issue in the installer script with network adapter enumeration. Possibly this is causing the issue for you in the end. On the other hand I do wonder that PXE boot seems to work find then.

                                        Do you still get the Error: Failed to retrieve directory listing when trying to connect via FTP?

                                        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

                                        E 2 Replies Last reply Dec 2, 2019, 8:48 AM Reply Quote 1
                                        • E
                                          EStegenburgs @Sebastian Roth
                                          last edited by Dec 2, 2019, 8:48 AM

                                          @Sebastian-Roth What FOG installation settings did you use? It looks like you are not using FOG DHCP, in such case you would need to configure an external server for PXE boot, right? Also, did you do any vsFTPd configuration? ftp localhost on CentOS worked but I am struggling with the remote FileZilla connection.

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

                                          177

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project