Altera_Forum
Honored Contributor
14 years agoftp session problem
Thanks in advance.
I've got a custom embedded uClinux NIOS system with a compact flash (I use ext3). The system records *.bin files and we extract them via ftp using "mget." After a few files I get 425 Can't open passive connection: Cannot assign requested address. Passive mode refused. Turning off passive mode. I have used the 2c35 evaluation board to recreate the problem AND do ftp with debug on. I higlighted the output problem with "italics" It appears that the CLIENT gets confused and tries to open the port using IT'S ip address. I did some googling and am basically don't have any good ideas how I can prevent this problem. Any solutions, things to try, ... WOULD BE GREATLY APPRECITED. ****************************************** FTP Session Linux client to Evaluation Board (same FTP server). With DEBUG VERBOSE (-dv) enabled (NOTE: apwr is set in my Network stuff so I don't have to type 129.131.7.220 all the time). Also the IP address of the Linux machine I was running the client upon was 129.131.7.14. TRIED WITH WINDOW ftp client and same story ... **************************************************************************** [janet@localhost ~]$ ftp -dv apwr Connected to AARGMpwr. 220- Welcome to the uClinux ftpd! 220 uClinux FTP server (GNU inetutils 1.4.1) ready. ftp: setsockopt: Bad file descriptor ---> AUTH GSSAPI 500 'AUTH GSSAPI': command not understood. ---> AUTH KERBEROS_V4 500 'AUTH KERBEROS_V4': command not understood. KERBEROS_V4 rejected as an authentication type Name (apwr:janet): ftp ---> USER ftp 331 Guest login ok, type your name as password. Password: ---> PASS XXXX 230 Guest login ok, access restrictions apply. cmds.c:276: verbose=2 debug=1 overbose=2 ---> SYST 215 UNIX Type: L8 Version: uClinux 2.6.30 Remote system type is UNIX. Using binary mode to transfer files. ftp> ls ftp: setsockopt (ignored): Permission denied ---> PASV 227 Entering Passive Mode (129,131,7,220,160,219) ---> LIST 150 Opening ASCII mode data connection for '/bin/ls'. 226 Transfer complete. ftp> passive Passive mode off. ftp> passive Passive mode on. ftp> mget *.bin ftp: setsockopt (ignored): Permission denied ---> PASV ---> NLST *.bin mget PWR_01-01-00-00.01.18.bin? y ---> TYPE I 200 Type set to I. ftp: setsockopt (ignored): Permission denied ---> PASV 227 Entering Passive Mode (129,131,7,220,184,190) ---> RETR PWR_01-01-00-00.01.18.bin 150 Opening BINARY mode data connection for 'PWR_01-01-00-00.01.18.bin' (43657216 bytes). 226 Transfer complete. 43657216 bytes received in 47 seconds (9.1e+02 Kbytes/s) mget PWR_01-01-00-00.02.40.bin? y ftp: setsockopt (ignored): Permission denied ---> PASV 227 Entering Passive Mode (129,131,7,220,176,103) ---> RETR PWR_01-01-00-00.02.40.bin 150 Opening BINARY mode data connection for 'PWR_01-01-00-00.02.40.bin' (1232896 bytes). 226 Transfer complete. 1232896 bytes received in 1.4 seconds (8.4e+02 Kbytes/s) mget PWR_01-01-00-00.02.41.bin? y ftp: setsockopt (ignored): Permission denied ---> PASV 227 Entering Passive Mode (129,131,7,220,219,122) ---> RETR PWR_01-01-00-00.02.41.bin 150 Opening BINARY mode data connection for 'PWR_01-01-00-00.02.41.bin' (10937344 bytes). 226 Transfer complete. 11175936 bytes received in 15 seconds (7.3e+02 Kbytes/s) mget PWR_01-01-00-00.03.18.bin? y ftp: setsockopt (ignored): Permission denied ---> PASV 227 Entering Passive Mode (129,131,7,220,179,173) ---> RETR PWR_01-01-00-00.03.18.bin 150 Opening BINARY mode data connection for 'PWR_01-01-00-00.03.18.bin' (4663296 bytes). 226 Transfer complete. 4663296 bytes received in 5.1 seconds (8.9e+02 Kbytes/s) mget PWR_01-01-00-00.06.23.bin? y ftp: setsockopt (ignored): Permission denied ---> PASV 227 Entering Passive Mode (129,131,7,220,229,249) ---> RETR PWR_01-01-00-00.06.23.bin 150 Opening BINARY mode data connection for 'PWR_01-01-00-00.06.23.bin' (23447552 bytes). 226 Transfer complete. 23447552 bytes received in 25 seconds (9e+02 Kbytes/s) mget PWR_07-14-11-17.20.13.bin? y ftp: setsockopt (ignored): Permission denied ---> PASV 425 Can't open passive connection: Cannot assign requested address. Passive mode refused. Turning off passive mode. ftp: setsockopt (ignored): Permission denied ---> port 129,131,7,14,220,164 500 Illegal PORT Command ftp: bind: Address already in use mget PWR_07-14-11-21.02.42.bin? y ftp: setsockopt (ignored): Permission denied ---> port 129,131,7,14,207,36 500 Illegal PORT Command mget PWR_07-14-11-21.03.25.bin? y ftp: setsockopt (ignored): Permission denied ---> port 129,131,7,14,229,98 500 Illegal PORT Command mget PWR_07-15-11-15.22.29.bin? y ftp: setsockopt (ignored): Permission denied ---> port 129,131,7,14,164,234 500 Illegal PORT Command mget PWR_07-15-11-16.02.54.bin? y ftp: setsockopt (ignored): Permission denied ---> port 129,131,7,14,172,37 500 Illegal PORT Command mget PWR_07-15-11-16.14.25.bin? y ftp: setsockopt (ignored): Permission denied ---> port 129,131,7,14,186,147 500 Illegal PORT Command mget PWR_07-15-11-16.21.58.bin? n mget PWR_07-15-11-22.35.36.bin? n ftp> quit ---> QUIT 221 Goodbye. [janet@localhost ~]$