Image capturing: Updating Database...Failed
-
@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
-
@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 listingHave you disabled the firewall on the FOG server?
-
@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_7While 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? -
@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.
-
@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 laterf|-(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_NetworkBut now I have the same situation as before.
-
@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?
-
@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. -
@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.
-
@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).
-
When I meant “isolated”, FOG is set up to use the internal network through the second adapter enp0s8.
-
@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? -
@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. -
@EStegenburgs I do use the FOG DHCP and there should be no need to manually adjust vsftpd.conf.
All installer questions I answered as the are by default except for DHCP where no is default but I said yes.
-
I had a similar problem but I found that it was my max connections.
mysql -e"show status like '%used_connections%'" +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | Max_used_connections | 224 | +----------------------+-------+
mysql -e"SHOW VARIABLES LIKE '%max_connections%'" +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | extra_max_connections | 1 | | max_connections | 1000 | +-----------------------+-------+
Mariadb max_connections default Value: 151
I increased mine to 1000 and my DB connection issues seem to have gone away. -
@Sebastian-Roth So, in the end, I have entirely switched to a bridged network solution, and everything is working fine now. It seems that the problem was, in fact, as you mentioned, about the issue in the installer script with network adapter enumeration. But that also means it is some type of bug - all captures of an image were successful, only failed at the very end trying to update the database.
The difference that I noticed between bridged and internal NAT configuration is that in the latter one, the FOG installer script at the very beginning complains that
net-tools
is not installed. When it asked about the network adapters, it couldn’t get an IP at first because it tried to use a network adapterenp0s3 enp0s8
(NAT adapter for internet connection and internal NAT adapter), at which point I had to specify to useenp0s8
adapter manually.