FTP problems.
-
Using Fog 0.39
My config for /fog/commons/config.php has the following storage information.
[CODE]
define( “STORAGE_HOST”, “10.1.1.23” );
define( “STORAGE_FTP_USERNAME”, “fog” );
define( “STORAGE_FTP_PASSWORD”, “e2d425f4d11583******deb0a6c7517b” );
define( “STORAGE_DATADIR”, “/images/” );
define( “STORAGE_DATADIR_UPLOAD”, “/images/dev/” );
[/CODE]When I connect using windows built-in ftp client it works.
[CODE]ftp> open 10.1.1.23
Connected to 10.1.1.23.
220 (vsFTPd 2.2.2)
User (10.1.1.23:(none)): fog
331 Please specify the password.
Password:
230 Login successful.
ftp> cd /images
250 Directory successfully changed.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxrwxrwx 2 65534 65534 16384 Jan 12 11:19 DC7900
-rwxrwxrwx 1 65534 65534 4995237193 Dec 30 13:59 DX2200
drwxrwxrwx 2 35008 35003 16384 Oct 18 11:24 HPD530NSKE
-rwxrwxrwx 1 35008 35003 6375525282 Sep 02 06:08 HPDX2450RESIZE
drwxrwxrwx 2 35008 35003 16384 Oct 18 13:45 HPPRO3015
drwxrwxrwx 2 65534 65534 16384 Jan 26 13:55 HP_DX2450_1
drwxrwxrwx 3 35008 35003 16384 Jan 26 15:20 dev
226 Directory send OK.
ftp: 469 bytes received in 0,00Seconds 234,50Kbytes/sec.[/CODE]But when starting Image upload I get the information “FTP connection to storage server failed!”.
This happens before it starts pushing the image to the NFS share.Is there any log I can access anywhere to see why this problem occurs?
// Joakim
-
Did you modify your DHCP settings (ports 66 and 67) on the server?
-
I modified Post_Stage2.php to echo all the connection information if the ftp was faulty.
And found that these settings:[PHP]
define( “STORAGE_HOST”, “10.1.1.23” );
define( “STORAGE_FTP_USERNAME”, “fog” );
define( “STORAGE_FTP_PASSWORD”, “e2d425f4d11583******deb0a6c7517b” );
define( “STORAGE_DATADIR”, “/images/” );
define( “STORAGE_DATADIR_UPLOAD”, “/images/dev/” );
[/PHP]Has nothing to do whatsoever with storage node FTP access.
With version 0.32 it seems that they are never used, not what I can tell from the image upload process atleast.
Its only the storage node ip/host address and the management username and password that is used when connecting to ftp.
This caused a problem when the SAN/NAS I was using gave different root path depending if you where accessing the share trough NFS or FTP.
NFS needed /volumes/main/FogImages/ as path to image files.
and
FTP only needed / as path.And since only one path can be specified in the settings (I guess both ftp and nfs path should be the same on a “normal” scenario) I had to change to another SAN/NAS we had to store the image files that gave the same path to images no matter what protocol.
So problem is resolved.
However I have not been able to find where the STORAGE_ variables in the config.php are used. They seem deprecated.Best Regards
Joakim -
To FIX this problem, follow the steps:
access: [url]http://fogserver/fog/management/[/url]
*** FOG Configuration ***
*** FOG Settings *** in the menu on the left
-> Replace the FOG_TFTP_FTP_PASSWORD fields under FOG settingsThen open the file:
/var/www/fog/commons/config.php - check the values of: TFTP_FTP_PASSWORD and STORAGE_FTP_PASSWORD
These MUST match the password you set above, if not write them properly in here
Finally reload of the service
/etc/init.d/vsftpd reloadthen will need change the user fog password, by shell: eg.
fogserver:/# passwd fog
enter the new password
re-enter the new password
done