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.

Bug 232443

Summary: Remote Error. Reason: ProxyHTTP: java.io.IOException: proxy error: Tunnel or SSL Forbidden
Product: php Reporter: terje7601
Component: FTP SupportAssignee: Tomas Mysik <tmysik>
Status: VERIFIED FIXED    
Severity: normal CC: DeveloperChris, mmolda, ogj, vriha
Priority: P3    
Version: 7.3.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: screen grab of the failure
redacted IDE log file
proxy settings
sftp settings

Description terje7601 2013-07-09 12:29:12 UTC
I have a PHP Project with a "Remote Web Site" Run Configuration. Under "Advanced Proxy Options" (Tools -> Options -> Manual Proxy Settings -> More...), I have configured a HTTP proxy and under "No Proxy Hosts" added:
10.177.7.3, dev, *.domain.com, dev.domain.com
where "dev" is the Host Name of the Remote Connection I'm using in the Run Configuration (10.177.7.3 is its ip address & dev.domain.com is its FQDN).

Now when I right-click "Source Files" & choose "Synchronize..." I get the following error:

Remote Error
Cannot connect to server dev.
Reason: ProxyHTTP: java.io.IOException: proxy error: Tunnel or SSL Forbidden

When I choose "No Proxy" (under Tools -> Options), I don't get the error & synchronizing works as expected.

So it seems to me that the "No Proxy Hosts" setting is not respected.

This bug seems similar to bug 207994, but that one was fixed in 7.3.1.
Comment 1 Tomas Mysik 2013-07-09 13:00:18 UTC
Could you please try it with the dev version of NetBeans [1] (use the ZIP file)? It should work there I hope (but please use the latest version, I have fixed it yesterday AFAIR).

Thanks.
[1] http://bertram.netbeans.org:8080/job/PHP-build/
Comment 2 terje7601 2013-07-09 14:32:58 UTC
No sorry, it doesn't work yet with the latest version (NetBeans-dev-2013-07-09_09-04-38-php.zip). What else can I do to help? There isn't anything in the log (messages.log) about it.
Comment 3 Tomas Mysik 2013-07-09 15:12:57 UTC
I will have a look at it. Thanks.
Comment 4 Tomas Mysik 2013-07-11 08:43:09 UTC
Should be fixed now, please verify.

Thanks.

http://hg.netbeans.org/web-main/rev/783c24d39892
Comment 5 terje7601 2013-07-11 14:57:59 UTC
I verified & it is fixed now, thanks.
Comment 6 Quality Engineering 2013-07-12 02:32:42 UTC
Integrated into 'main-silver', will be available in build *201307112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/783c24d39892
User: Tomas Mysik <tmysik@netbeans.org>
Log: #232443 - Remote Error. Reason: ProxyHTTP: java.io.IOException: proxy error: Tunnel or SSL Forbidden
Comment 7 Tomas Mysik 2013-07-12 04:39:33 UTC
Thanks for verification.
Comment 8 DeveloperChris 2014-08-13 01:47:32 UTC
This bug is still occurring in NetBeans IDE 8.0 (Build 201403101706)

Like above I have an sftp connection configured to a remote server.

If I configure a http proxy I get the connection forbidden message

If I configure no proxy everything works as expected.

I don't know why the http proxy effects an non http ssh connection.
Comment 9 Tomas Mysik 2014-08-13 08:42:19 UTC
@DeveloperChris: Please, do not reopen issues without the IDE log file. Thanks.
Comment 10 Tomas Mysik 2014-08-13 08:43:07 UTC
(In reply to Tomas Mysik from comment #9)
> @DeveloperChris: Please, do not reopen issues without the IDE log file.
> Thanks.

(And provide also exact steps to reproduce, thanks.)
Comment 11 DeveloperChris 2014-08-14 01:27:27 UTC
Created attachment 148690 [details]
screen grab of the failure

screen grab of the failure
Comment 12 DeveloperChris 2014-08-14 01:29:04 UTC
Created attachment 148691 [details]
redacted IDE log file

redacted IDE log file
Comment 13 DeveloperChris 2014-08-14 01:35:44 UTC
Created attachment 148692 [details]
proxy settings

This is the proxy setting during failure. simply changing it to no proxy makes it work as expected
Comment 14 DeveloperChris 2014-08-14 01:52:28 UTC
I would have included extra info if it didn't quite match the original posters bug. I have added more now.

To reproduce the issue enable the http proxy setting. right click a file and select upload.

To fix the problem disable the proxy settings right click the same file and upload

the next image shows my sftp settings and the result of clicking the test button.

Clearly the http proxy settings are being used for some reason during the upload process.

If I add the IP address of the remote server to my ignore list in the http proxy settings everything works as expected.

HTTP proxy should not be used for sftp connections.
Comment 15 DeveloperChris 2014-08-14 01:53:19 UTC
Created attachment 148693 [details]
sftp settings

sftp settings with test button clicked
Comment 16 ogj 2014-12-11 07:57:39 UTC
I am also struggling with the "No proxy hosts" in Netbeans 8.0.2. 
I have a manual proxy setup, and a list of hosts that should not be proxied (tried with wildcards, with and without FQDN, makes no difference).

I try to connect to an internal (Informix) database server with the database explorer. The message on the message log is:

INFO [org.netbeans.modules.db.explorer.action.ConnectAction]
java.net.SocketException: Malformed reply from SOCKS server
        at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:129)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:460)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at com.informix.asf.Connection.openSocket(Connection.java:1745)
Caused: com.informix.asf.IfxASFException: Attempt to connect to database server (prod1_tst) failed.
        at com.informix.util.IfxErrMsg.getLocIfxASFException(IfxErrMsg.java:750)
        at com.informix.asf.Connection.openSocket(Connection.java:1786)
        at com.informix.asf.Connection.<init>(Connection.java:391)
        at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:1375)
Caused: java.sql.SQLException
        at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:1391)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:237)
        at org.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:131)
        at org.netbeans.modules.db.explorer.DatabaseConnection.doConnect(DatabaseConnection.java:904)
        at org.netbeans.modules.db.explorer.DatabaseConnection.access$200(DatabaseConnection.java:103)
[catch] at org.netbeans.modules.db.explorer.DatabaseConnection$3.run(DatabaseConnection.java:970)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 17 Tomas Mysik 2014-12-11 08:12:59 UTC
(In reply to ogj from comment #16)
> org.netbeans.modules.db.explorer.DbDriverManager.
> getConnection(DbDriverManager.java:131)

@ogj: Not related to PHP support, feel free to submit a new issue against Databases.

Thanks.
Comment 18 Tomas Mysik 2015-05-13 08:54:54 UTC
(In reply to DeveloperChris from comment #14)
> HTTP proxy should not be used for sftp connections.

Why? If you think that SFTP should not use HTPP ptoxy ever, then why com.jcraft.jsch.ProxyHTTP class exists?

Marking back as VERIFIED, please submit a new specific issue but I do not see any issue here, it works as expected - if proxy is set, it is used; if not then no proxy is used.

Thanks.
Comment 19 Tomas Mysik 2015-05-13 08:55:19 UTC
Returning back the correct status.