joedj / ftpii

An FTP server for the Nintendo Wii
Other
52 stars 18 forks source link

Unable to connect to client: [120] Socket already connected #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of ftpii are you using?
0.0.18

What steps will reproduce the problem?
1. Run ftpii in the HBC v1.0.1. 
2. Run ftp-client WinSCP v4.1.8. 

What is the expected output? What do you see instead?
FTPii:
-Unable to connect to client: [120]Socket already connected
-Wrote reply: 520 Closing data connection, error occurred during transfer.

Ftp-client:
-Could not retrieve directory listing
-Closing data connection, error occurred during transfer.

Please provide any additional information below.
FTPii v0.0.17 work fine.

Original issue reported on code.google.com by drug...@gmail.com on 18 Jan 2009 at 6:49

GoogleCodeExporter commented 9 years ago
Same for me - different FTP client, but I've been using FTPii just fine since 
about
0.0.15....this latest version doesn't work for me.

Original comment by andrew.d...@gmail.com on 27 Jan 2009 at 10:23

GoogleCodeExporter commented 9 years ago
Same here....

Could not retrieve directory listing
Closing data connection, error occurred during transfer.

Others version of ftpii works fine :-(

Original comment by mcord...@gmail.com on 18 Feb 2009 at 12:23

GoogleCodeExporter commented 9 years ago
drugold, is this still a problem in 0.0.19?  Do other clients (e.g. the 
command-line
"ftp" program) work?

andrew, mcordoba, do you get this same "[120] Socket already connected" error, 
or...?
 Which FTP client(s)?

Original comment by joe.goo...@psychlaw.com.au on 26 Apr 2009 at 10:23

GoogleCodeExporter commented 9 years ago
Unfortunately, this problem has remained in v0.0.19

Original comment by drug...@gmail.com on 26 Apr 2009 at 10:40

GoogleCodeExporter commented 9 years ago
But Opera 9.64 and IE6.0 works fine with v0.0.19.

Original comment by drug...@gmail.com on 26 Apr 2009 at 11:06

GoogleCodeExporter commented 9 years ago
Thanks for the update.  I might try to replicate this using WinSCP - sounds to 
me
like it's trying to use a port number that is already in use...

Original comment by joe.goo...@psychlaw.com.au on 26 Apr 2009 at 11:24

GoogleCodeExporter commented 9 years ago
Joe...I get the same error "[120] Socket already connected" with v0.0.19...with
WinSCP client too

Original comment by mcord...@gmail.com on 26 Apr 2009 at 3:06

GoogleCodeExporter commented 9 years ago
I think this is a possible solution for WinSCP and ftpii...Edit conection->in
conection option->passive option enabled...

I didn't have more problems... :-)

Original comment by mcord...@gmail.com on 26 Apr 2009 at 3:22

GoogleCodeExporter commented 9 years ago
Thank you, was not activated "passive mode" in the WinSCP. Now "WinSCP
+FTPii_v0.0.19" working fine.

Original comment by drug...@gmail.com on 26 Apr 2009 at 4:56

GoogleCodeExporter commented 9 years ago
Thanks, this sorted out problems for me :)

Original comment by smgreen...@gmail.com on 31 Oct 2009 at 6:19

GoogleCodeExporter commented 9 years ago
Argh yes, I can reproduce this with the OSX command-line ftp utility too.  
Looks like
I broke Active transfers at some point, will try to get this resolved soon.

Original comment by joe.goo...@psychlaw.com.au on 20 Dec 2009 at 4:06

GoogleCodeExporter commented 9 years ago
It worked for me until 0.0.19... but it does not work anymore with 0.0.20. I 
tried
different clienta: ftp, lftp, firefox under Linux.

Original comment by gianluca...@gmail.com on 17 Jan 2010 at 11:15

GoogleCodeExporter commented 9 years ago
I don't think there is a problem with the program, I had same issue, I then 
connected the USB Drive to my PC and choose to scandisk it - Autofix errors, 
and it 
found problems and fixed them. I put the usb back and bang everything is fine 
now.

0.0.20

Original comment by Lamarre...@gmail.com on 22 Jan 2010 at 7:50

GoogleCodeExporter commented 9 years ago
The following change fixed the problem for me.  Attached a new build also.

### Eclipse Workspace Patch 1.0
#P ftpii
Index: source/ftp.c
===================================================================
--- source/ftp.c    (revision 288)
+++ source/ftp.c    (working copy)
@@ -767,6 +767,7 @@
         } else {
             if ((result = net_connect(client->data_socket, (struct sockaddr 
*)&client->address, sizeof(client->address))) < 0) {
                 if (result == -EINPROGRESS) result = -EAGAIN;
+                if (result == -EALREADY) result = -EAGAIN;
                 if (result != -EAGAIN && result != -EISCONN) printf("Unable to 
connect to client: [%i] %s\n", -result, strerror(-result));
             }
              if (result >= 0 || result == -EISCONN) {

Original comment by clo...@gmail.com on 31 Jan 2010 at 12:59

Attachments:

GoogleCodeExporter commented 9 years ago
The patch works for me, but only in active mode. Passive mode still doesn't 
work. It
says "Wrote reply: 227 Entering Passive Mode" and does nothing else.

Original comment by gianluca...@gmail.com on 31 Jan 2010 at 11:25

GoogleCodeExporter commented 9 years ago
@gianluca Did the my patch break passive mode, or did passive mode never work 
for you?

Original comment by clo...@gmail.com on 2 Feb 2010 at 7:12

GoogleCodeExporter commented 9 years ago
Here is the summary of my experiments:

0.0.19: passive mode WORKS, active mode NO
0.0.20 official: passive mode NO, active mode NO
0.0.20 patched: passive mode NO, active mode WORKS

The problem is that most ftp frontends use passive mode by default (if not 
exclusively).

Original comment by gianluca...@gmail.com on 3 Feb 2010 at 11:12

GoogleCodeExporter commented 9 years ago
Active mode fixed for me with closms build.  Also, no problems with passive 
mode, 
both modes seem to be working fine here.  Thanks.

Original comment by cmbu...@gmail.com on 3 Feb 2010 at 11:00

GoogleCodeExporter commented 9 years ago
with having a usb drive mounted i have tried to connect with both active and 
passive
mode with .20
-Unable to connect to client: [120]Socket already connected
-Wrote reply: 520 Closing data connection, error occurred during transfer.

I can get logged in but then when i do a dir it doesn't work... tried with both 
cmd
line and filezilla

Original comment by john.kuy...@gmail.com on 5 Feb 2010 at 5:47

GoogleCodeExporter commented 9 years ago
Incorporated closms' patch in r293 to be released with 0.0.21.  Thanks!

Original comment by joe.goo...@psychlaw.com.au on 13 Feb 2010 at 12:40

GoogleCodeExporter commented 9 years ago
Fixed in 0.0.21

Original comment by joe.goo...@psychlaw.com.au on 27 Feb 2010 at 6:43