This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | [JDK 7] FTP does not work with Java 7 | ||
---|---|---|---|
Product: | php | Reporter: | giank |
Component: | FTP Support | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | AlyonaStashkova, giank, jeff_rubinoff, mikeklon, pjiricka, timbergus, tjrush, tmysik, vriha, _jay |
Priority: | P2 | Keywords: | RELNOTE |
Version: | 7.0 | ||
Hardware: | All | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | 180723 |
Attachments: | stacktrace |
Description
giank
2011-08-30 16:17:49 UTC
Created attachment 110284 [details]
stacktrace
I can confirm myself that downgrading to Java SE Development Kit 6 Update 27 made this specific problem go away. Vlado, could you please try to reproduce? It seems that all the reports comes from Windows 7 and JDK 7. Guys, couldn't it be a firewall issue? I can assure it is not a firewall issue; other FTP programs work as expected, deactivating Windows Firewall has no effect, downgrading JDK solves the problem. It seems to be an incompatibility between the JDK newer socket functions and netbeans under certain circumstances (at least under Windows 7 64 bit). The link in the first messages has some users reporting that even plugin catalog doesn't seem to properly work (albeit I didn't try it, it works for me now with the downgrade). Sure, I'll try to reproduce it later today on Win7 64b & JDK7 32/64b Also, please watch the IDE log for connection errors related to the Update Center. Thanks. So right now I can't reproduce it due to issue #201197, so I'll try it tomorrow again with build containing fix for the mentioned bug. (In reply to comment #7) > So right now I can't reproduce it due to issue #201197 Easy to avoid, just start NB with "-J-da" (disable assertions). Reassigning to Lada, please test it and then reassign back. Thanks. Lado, please try also updating of your IDE so we can see whether the problem is in the FTP library or in networking in general. Thanks. Reassigning back. I was able to reproduce it (I believe it's the same problem): I tried to create new php project from remote sources (FileZilla FTP server on localhost). During the project creation, after adding all credentials etc. and setting up FTP connection I pressed Next and proceed to the step where all files/folders from FTP are supposed to be shown and I can check what files to download. However, no files were displayed, I got the message "No files available, navigate back and verify...". I let it in this state for some time (1-3 minutes) and after that the java.net.SocketException: Connection reset by peer: socket write error exception popped up. The IDE log seems to be identical to giank's log. I'm able to connect to update center... Here is a output from window "Output - remote logs": ... 331 Password required for newuser PASS ****** 230 Logged on TYPE I 200 Type set to I CWD /PhpProject1 250 CWD successful. "/PhpProject1" is current directory. CWD /PhpProject1 250 CWD successful. "/PhpProject1" is current directory. PWD 257 "/PhpProject1" is current directory. SYST 215 UNIX emulated by FileZilla Product Version: NetBeans IDE Dev (Build 201109040600) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) Personally, I cannot reproduce on Linux. Could anyone of you try to increase the "Keep-Alive Interval" to a big number (let's say 9999) and try it? Does it help or not? Meanwhile, I will try to reproduce on WinXP. Thanks. I found out that the problem was the buil-in firewall in Win7 after all. I have clean installation of Win7 with no "custom" firewall. With default settings, I had the problem described in comment #11 (and quite possible the same as the reporter). I tried to turn off the Windows7 firewall and it all start to work. So please, double check that the Windows firewall is disabled. It's interesting that actions like "Test connection" or Plugin Catalog work with the enabled firewall. I'll check behavior on JDK6 ASAP Update: As promised, I tried the same with NetBeans on JDK6_u27 and the Windows7 firewall didn't block it. So the firewall makes difference between JDK6 and JDK7 and blocks the new version for some reason. This problem does not seem to be limited to Win 7. I am using Vista 32 and and ftp fails after upgrading to Java 7. (In reply to comment #15) > This problem does not seem to be limited to Win 7. I am using Vista 32 and and > ftp fails after upgrading to Java 7. And if you disable the Windows built-in firewall, does it work? Thanks. The same problem found here [1] with steps how to solve it. And one more post [2] on stackoverflow.com. [1] http://www.enterprisedt.com/forums/viewtopic.php?p=10700 [2] http://stackoverflow.com/questions/6990663/java-7-prevents-ftp-transfers-on-windows-vista-and-7-if-firewall-is-on-any-ideas As correctly pointed out, this bug doesn't seem to reside in Netbeans per se, but in Java 7. I propose to add a message in the installer or at the first launch to add the exception in the firewall for java.exe, as the bug [1] in the Oracle database is currently set as low priority and also because third party firewall software could also not trigger the appearance the exception rule wizard window. [1] "java.net.Socket closes when "PASV" is sent on an authenticated FTP connection" http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7077696 Closing this issue again (perhaps WONTFIX is better since it is a bug but NetBeans PHP support really cannot do anything to solve/work around it) and reporting a new issue #201790, feel free to post your comments there. Thanks. SFTP seems to work just fine with Windows firewall turned on and off. For Jeff: Please, add a note to the Release Notes that users with Windows Vista or Windows 7 should check their Windows firewall if FTP does not work for them (connection to a remote server is OK but some operations fail). For more information, please, read this issue. Thanks. BTW I will add a warning to the NetBeans itself, see issue #202021. Choosing a bit better Platform. I've added the following warning to the FTP tutorial: JDK 7 + Windows 7/Vista: Windows 7 and Windows Vista firewall blocks some (S)FTP operations that are launched by JDK 7. See NetBeans Issue 201449 for details. One suggested workaround is to open your Windows Firewall settings and add exceptions for both JDK and JRE java.exe and javaw.exe files. I'm writing Alyona Stashkova under separate cover with Sorry, lost part of comment there. Alyona, I'd suggest the following rel note, for both 7.0.1 and 7.1: Known Issues: PHP Known Issues: Mobility Issue 201449: [JDK 7] FTP does not work with Java 7 on Windows 7 or Vista. Description: Windows 7 or Windows Vista users running NetBeans IDE on JDK 7 may experience FTP communication failure. Workaround: Check Windows Firewall. Windows Firewall blocks some FTP operations launched by JDK 7. Try adding JDK and JRE java.exe and javaw.exe files to Windows Firewall's Exclusions list. Thanks a lot, Jeff. Just one minor note - it seems (based on comment #20) that SFTP works without any problems. This issue affects only FTP. Thanks. Added to Release Notes for NB 7.0.1 (http://netbeans.org/community/releases/70/relnotes.html#201449) Workaround from the release notes did not work. Used solution from the netbeans forums: http://forums.netbeans.org/post-115176.html#115176 Updated the workaround in the Release Notes (http://netbeans.org/community/releases/70/relnotes.html#201449). (In reply to comment #20) > SFTP seems to work just fine with Windows firewall turned on and off. No, SFTP also doesn't work on Win 7 with Java7. Hi all. This is my configuration, and the FTP connection still doesn't work with and without Windows firewall working. Windows 7 x32 bits NetBeans 7.1 RC2 JDK 7u2 I have even test FTP and Secure FTP. The funny thing is that when I tried the connection the first time, Windows firewall advise me about NetBeans trying to connect, and I authorize all the connections. This is what I have obtained from NetBeans. Is this the same problem of everybody? 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 12 of 75 allowed. 220-Local time is now 10:48. Server port: 21. 220-This is a private system - No anonymous login 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 2 minutes of inactivity. USER **** 331 User **** OK. Password required PASS ****** 230 OK. Current restricted directory is / TYPE I 200 TYPE is now 8-bit binary CWD /public_html 250 OK. Current directory is /public_html PWD 257 "/public_html" is your current location CWD /public_html 250 OK. Current directory is /public_html PORT 161,111,120,60,194,248 200 PORT command successful STOR texts.php.new 150 Connecting to port 49912 DELE texts.php.new 226-Error during write to file 226 Transfer aborted QUIT 250 Deleted texts.php.new This one is really WONTFIX, please, do not change. @timbergus: You problem could be caused by TLS - please, try to check "Encrypt Only Authentication Process" in your Remote (FTP) configuration. (In reply to comment #31) > This one is really WONTFIX, please, do not change. > > @timbergus: You problem could be caused by TLS - please, try to check "Encrypt > Only Authentication Process" in your Remote (FTP) configuration. OK. Sorry, and thank you very much for your answer. I will check my configuration. For WINDOWS 7 The problem is caused by the stateful FTP filter of the firewall. As a workaround you can disable it by executing this: "netsh advfirewall set global StatefulFTP disable" with administrator rights I confirm that this solved the issue on my platform. -> Product Version: NetBeans IDE 7.1.2 (Build 201204101705) Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21 System: Windows 7 version 6.1 running on amd64; Cp1252; pt_PT (nb) (In reply to comment #33) > For WINDOWS 7 > The problem is caused by the stateful FTP filter of the firewall. As a > workaround you can disable it by executing this: > "netsh advfirewall set global StatefulFTP disable" > with administrator rights !Important I had the same error and problem and TURNING OFF THE FIREWALL solve it. Upload works with no problem. I'm using a free host from 000webhost. Error: Upload failed: org.netbeans.modules.php.project.connections.transfer.TransferInfo [transfered: [], failed: {LocalTransferFile[name: home_view.php, remotePath: application/views/home_view.php, baseLocalDirectoryPath: C:\Program Files\Ampps\www\MLM, baseRemoteDirectoryPath: /public_html, hasParent: false, isFile: true, isDirectory: false, isLink: false]=Cannot upload file home_view.php (unknown reason).}, partially failed: {}, ignored: {}, runtime: 175 ms] On command line and running as administrator, enter: netsh advfirewall set global StatefulFTP disable Taken from: http://blog.ldronline.dk/2011/how-to-fix-ftp-upload-using-netbeans-7-and-jdk-7/ (In reply to comment #36) > On command line and running as administrator, enter: > > netsh advfirewall set global StatefulFTP disable > > Taken from: > http://blog.ldronline.dk/2011/how-to-fix-ftp-upload-using-netbeans-7-and-jdk-7/ There's NetBeans Configuring Windows Firewall For Passive FTP User FAQ available at http://wiki.netbeans.org/FAQConfiguringWinFirewallForPassiveFTP Hello and good afternoon. I'm using NetBeans 7.2 on Mac OS X Snow Leopard. I'm experiencing the same problem. Can't upload to remote host. I'll post the Output screen below. FTP connection tests OK during setup. I am able to upload using other FTP clients. What is the solution for Mac? Thank you in advance for any help. Output window: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 17 of 500 allowed. 220-Local time is now 13:58. Server port: 21. 220-This is a private system - No anonymous login 220 You will be disconnected after 3 minutes of inactivity. USER teet5863 331 User teet5863 OK. Password required PASS ****** 230 OK. Current restricted directory is / TYPE I 200 TYPE is now 8-bit binary CWD /ahs74test 250 OK. Current directory is /ahs74test PWD 257 "/ahs74test" is your current location CWD /ahs74test 250 OK. Current directory is /ahs74test PORT 192,168,1,5,195,32 200 PORT command successful STOR index.php.new NOOP QUIT Keep-alive failed for server www.mikeklonecki.com (unknown reason). Summary ==================== Failed: file index.php Cannot upload file index.php (unknown reason). Runtime: 90 s, processed: 0 file(s), 0 KB (In reply to comment #38) > I'm using NetBeans 7.2 on Mac OS X Snow Leopard. I'm experiencing the same > problem. Please, report a new issue. It likely is another issue, moreover it can be easily marked as a duplicate of this one. Thanks. SPAM - Removed by Administrator |