Update kernel - unable to connect to tftp server
-
hey all,
I’m running ubuntu server 12.04LTS with fog 0.32. This is a hobby for me at home which I hope to grow into something more ( I don’t know what that is yet ;))
Currently running a router, switch, rack server, laptop and 2 dell dc7700p small form factor pc’s I pan on doing all sorts of network boots on
I have plugged a wireless adaptor into the rack server (wlan1) this connects to my router then off to the internet. The switch is plugged into eth0, which is the gateway for my internal network
I’m running ip masquerade so the internal network can connect to the internet. I have two subnets:
192.168.1.0 = external (wlan1)
192.168.2.0 = internal (eth0)External facing nic has ip 192.168.1.150
The fog server is running on the 192.168.2.0 subnet with ip 192.168.2.100 (gateway)IPtables:
All outgoing traffic is fed via 192.168.2.100 > 192.168.1.150 > 192.168.1.1 > internet
The incomming traffic is only allowed in if initiated internally.Everything is running on this one server. DHCP, FOG, TFTP etc.
DHCP server is working fine for connecting clients to the 192.168.2.0 subnet and i’m alble to boot a client and bring up the pxe boot loader and run the memtest.
I’ve been trying to update the kernel fog uses from the web ui (on another computer on my local network as my server doesn’t have a gui, however seems a little strange i am able to connect to this via 192.168.1.150) but seem to be having trouble. When I update the kernel the following happens:
The file downloads, then says “download complete, moving to tftp server” > “update failed: unable to connect to tftp server”
I can usually figure things out via google, however after 3 days of trying to get this working im finally stumped.
From what I have googled, seems this is a password mismatch. I’ve completed the following
[COLOR=#3366ff][URL=‘http://www.fogproject.org/wiki/index.php/Unable_to_connect_to_TFTP’][COLOR=#3366ff]http://www.fogproject.org/wiki/index.php/Unable_to_connect_to_TFTP[/COLOR][/URL][/COLOR] (settings passwords)
This did not fix issue. I’ve also read that it could be becuase the /tftpboot dir has the wrong permissions. I chmod -R 777 to allow all users access but this didn’t change anything.
have also checked the /opt/fog/service/etc/config.php to make sure the passwords are right.
mysql user “root” has no password.
Have also read that the tftp-hda needs to stop/started for this to work. have tried this but no matter what i do i still get “error - unable to connect to tftp server”
In a last ditch effort i disabled my ip masquerade script and rebooted. no change.
Any help to get this working would be greatly appriceated. If you need me to paste in some config file settings let me know.
Thanks in advance!!
-
Hey again,
Have tried pulling a file from another computer via tftp and this works fine.
tftp 192.168.2.100 get boot.txt
however when trying to login to ftp it doesn’t accept the password.
[CODE]gordongecko@gruntbox:~$ ftp localhost
Connected to localhost.
220 (vsFTPd 2.3.5)
Name (localhost:gordongecko): fog
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.[/CODE]However I can log in with sftp
[CODE]gordongecko@gruntbox:/etc$ sftp fog@localhost
fog@localhost’s password[/CODE]Am I at least remotely on the right track here?
This is my vsftpd.conf file
[CODE]
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES
[/CODE]This is my /var/www/fog/commons/config.php file. I am using the “beachwave11” password and it fails to connect?
I have also done sudo passwd fog and put in beachwave11
[CODE]
define( “IS_INCLUDED”, true );
define( “TFTP_HOST”, “192.168.2.100” );
define( “TFTP_FTP_USERNAME”, “fog” );
define( “TFTP_FTP_PASSWORD”, “beachwave11” );
define( “TFTP_PXE_CONFIG_DIR”, “/tftpboot/pxelinux.cfg/” );
define( “TFTP_PXE_KERNEL_DIR”, “/tftpboot/fog/kernel/” );
define( “PXE_KERNEL”, “fog/kernel/bzImage”);
define( “PXE_KERNEL_RAMDISK”, 127000 );
define( “USE_SLOPPY_NAME_LOOKUPS”, “1”);
define( “MEMTEST_KERNEL”, “fog/memtest/memtest” );
define( “PXE_IMAGE”, “fog/images/init.gz” );
define( “PXE_IMAGE_DNSADDRESS”, “192.168.2.100” );
define( “STORAGE_HOST”, “192.168.2.100” );
define( “STORAGE_FTP_USERNAME”, “fog” );
define( “STORAGE_FTP_PASSWORD”, “beachwave11” );
define( “STORAGE_DATADIR”, “/images/” );
define( “STORAGE_DATADIR_UPLOAD”, “/images/dev/” );
define( “STORAGE_BANDWIDTHPATH”, “/fog/status/bandwidth.php” );
define( “CLONEMETHOD”, “ntfsclone” ); // valid values partimage, ntfsclone
define( “UPLOADRESIZEPCT”, 5 );
define( “WEB_HOST”, “192.168.2.100” );
define( “WEB_ROOT”, “/fog/” );
define( “WOL_HOST”, “192.168.2.100” );
define( “WOL_PATH”, “/fog/wol/wol.php” );
define( “WOL_INTERFACE”, “eth0” );
define( “SNAPINDIR”, “/opt/fog/snapins/” );
define( “QUEUESIZE”, “10” );
define( “CHECKIN_TIMEOUT”, 600 );
define( “MYSQL_HOST”, “localhost” );
define( “MYSQL_DATABASE”, “fog” );
define( “MYSQL_USERNAME”, “root” );
define( “MYSQL_PASSWORD”, “” );
define( “DB_TYPE”, “mysql” );
define( “DB_HOST”, MYSQL_HOST );
define( “DB_NAME”, MYSQL_DATABASE );
define( “DB_USERNAME”, MYSQL_USERNAME );
define( “DB_PASSWORD”, MYSQL_PASSWORD );
define( “DB_PORT”, null );
define( “USER_MINPASSLENGTH”, 4 );
define( “USER_VALIDPASSCHARS”, “1234567890ABCDEFGHIJKLMNOPQRSTUVWZXYabcdefghijklmnopqrstuvwxyz_hB()^!” );
define( “NFS_ETH_MONITOR”, “eth0” );
define(“UDPCAST_INTERFACE”,“eth0”);
define(“UDPCAST_STARTINGPORT”, 63100 ); // Must be an even number! recommended between 49152 to 65535
define(“FOG_MULTICAST_MAX_SESSIONS”, 64 );
define( “FOG_JPGRAPH_VERSION”, “2.3” );
define( “FOG_REPORT_DIR”, “./reports/” );
define( “FOG_THEME”, “blackeye/blackeye.css” );
define( “FOG_UPLOADIGNOREPAGEHIBER”, “1” );
define( “FOG_VERSION”, “0.32” );
define( “FOG_SCHEMA”, 23);
DEFINE(‘BASEPATH’, rtrim($_SERVER[‘DOCUMENT_ROOT’], ‘/’) . rtrim(WEB_ROOT, ‘/’));[/CODE] -
Hmmmm. I’m sure this must be some form of password mismatch. Why is tfptd-hpa listening as root? or using the “root” username?
this is my /etc/default/tftpd-hpa file
[CODE]# /etc/default/tftpd-hpa
FOG Modified version
TFTP_USERNAME=“root”
TFTP_DIRECTORY=“/tftpboot”
TFTP_ADDRESS=“0.0.0.0:69”
TFTP_OPTIONS=“-s”
[/CODE][CODE]gordongecko@gruntbox:/etc/default$ ps auxw | grep tftpd
root 2167 0.0 0.0 15080 152 ? Ss 07:36 0:00 /usr/sbin/in.tftpd --listen --user root --address 0.0.0.0:69 -s /tftpboot
1000 2910 0.0 0.0 8096 888 pts/0 S+ 10:58 0:00 grep --color=auto tftpd
[/CODE]permissions for /tftpboot
[CODE]#
gordongecko@gruntbox:/etc/default$ ls -al /tftpboot
total 216
drwxrwxrwx 4 fog fog 4096 Aug 12 13:51 .
drwxr-xr-x 24 root root 4096 Aug 15 07:43 …
-rwxrwxrwx 1 fog fog 828 Aug 13 08:24 boot.txt
drwxrwxrwx 5 fog fog 4096 Aug 9 14:01 fog
-rwxrwxrwx 1 fog fog 25340 Aug 9 14:01 memdisk
-rwxrwxrwx 1 fog fog 16794 Aug 9 14:01 pxelinux.0
drwxrwxrwx 2 fog fog 4096 Aug 9 14:01 pxelinux.cfg
-rwxrwxrwx 1 fog fog 147728 Aug 9 14:01 vesamenu.c32
[/CODE] -
problem solved. (well not really) I rolled back to 10.04 and 0.32. What gets me is on 10.04 I didn’t even have to change any passwords. Everything worked with default config. With a bit of tweaking I can now netboot live-cd’s.
-
The error is a little misleading. The message means it’s unable to connect to the server with the TFTP server via FTP.
I’ve had a few reports of this problem. It seems to be compatibility issues with Ubuntu 12, I’m sure some packages have changed.
-
@linux_4_life Sure this probably doesn’t matter to you at this point, but I managed to fix this one today.
Turns out what I created my user “fog”, I neglected to make it a home directory. Created home directory, problem solved.