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 209095 - Can not connect to https addresses via the autodetected proxy
Summary: Can not connect to https addresses via the autodetected proxy
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 202500 207948 208511 211145 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-02 11:10 UTC by Petr Jiricka
Modified: 2012-11-14 12:12 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace - exception in the log file (5.52 KB, text/plain)
2012-03-02 11:10 UTC, Petr Jiricka
Details
Thread dump while the progress bar is shown (17.00 KB, text/plain)
2012-03-02 11:11 UTC, Petr Jiricka
Details
Connection failed stack trace. (5.59 KB, text/plain)
2012-04-17 12:21 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-03-02 11:10:50 UTC
Created attachment 116288 [details]
Stack trace - exception in the log file

When creating a new client-side web project and when I specify JavaScript libraries on the last panel, download of the libraries fails when connected through proxy. Without proxy everything works fine.

Strangely, on the first attempt, when I selected 3 libraries (jQuery, modernizr and underscore), the download of 2 of them passed, and only jQuery failed. After this, the size of jQuery on the disk was 0. Then the action timed out and a dialog "Some of the library files could not be retrieved" was displayed.
On the second attempt, there is no timeout and the progress bar is hangs forever while trying to download jQuery.

Also, there is an exception in the log file, I am attaching the stack trace.

Cc'ing also Jirka as he owns the proxy detection area. My proxy in the system is set to "Auto Proxy Discovery" and in NetBeans to "Use System Proxy Settings". I am connected via WiFi over VPN to the company network.
Comment 1 Petr Jiricka 2012-03-02 11:11:30 UTC
Created attachment 116289 [details]
Thread dump while the progress bar is shown
Comment 2 David Konecny 2012-03-04 23:58:55 UTC
Jirka,

it is possible I'm not doing something in the code which I should. I have a URL and I simply call openStream() on it and then FileUtil.copy(is, os) to download a content of the URL into a local file.

What's missing? As long as other IDE features downloading something from internet works then my code must be broken.

Thanks,
-David
Comment 3 Jiri Rechtacek 2012-03-05 16:31:50 UTC
(In reply to comment #2)
> Jirka,
> 
> it is possible I'm not doing something in the code which I should. I have a URL
> and I simply call openStream() on it and then FileUtil.copy(is, os) to download
> a content of the URL into a local file.
I don't see any problem there. I.e. Autoupdate calls URL.openStream() and then 
open connection by new InputSource(new BufferedInputStream (is));

> What's missing? As long as other IDE features downloading something from
> internet works then my code must be broken.
I'll stop by at Petr and investigate this on his laptop.

> 
> Thanks,
> -David
Comment 4 Petr Jiricka 2012-03-20 15:30:40 UTC
It looks like the proxy problem affects only https URLs, not http URLs. The workaround for me is to manually set proxy to emea-proxy.uk.oracle.com:80 in the IDE, for both http and https.

Jirko, can you please check if there is something special about handling https? Thanks.
Comment 5 David Konecny 2012-03-27 01:21:15 UTC
*** Bug 208511 has been marked as a duplicate of this bug. ***
Comment 6 David Konecny 2012-03-27 01:21:46 UTC
Any update on this Jirka?
Comment 7 David Konecny 2012-04-02 02:53:07 UTC
*** Bug 207948 has been marked as a duplicate of this bug. ***
Comment 8 David Konecny 2012-04-02 02:55:41 UTC
Issue 207948 relates to connection from IDE to Amazon Cloud via our new Amazon Beanstalk support. Means we should aim to resolve this issue for 7.2 as multiple clients are impacted.
Comment 9 Petr Jiricka 2012-04-03 14:48:29 UTC
Right. Steps to reproduce in trunk build are (when within the Oracle network, and using system proxy settings in IDE options):

1. Go to Tools -> Cloud Providers
2. Click Add Cloud..., select Amazon Beanstalk and click Next
3. Enter some bogus values (does not need to represent an existing account) and click Next

=> Connection will time out, there are some messages in the IDE log. 
When I am not in Oracle network, I am getting an error response from the Amazon site in the log file:
INFO [com.amazonaws.request]: Received error response: Status Code: 403...
Comment 10 Marian Mirilovic 2012-04-03 15:10:26 UTC
ide/Code is supposed be used by external reporters once they do not know where issue belongs to ... reassigning back to web
Comment 11 Petr Jiricka 2012-04-03 20:02:32 UTC
Hey Marian, STOP creating more work for everyone. This issue was assigned to Jirka Rechtacek ON PURPOSE - you changed that. If you can not spend 15 seconds to figure out that this issue relates to proxy handling, not web apps, then you'd better leave it as it is.

> ide/Code is supposed be used by external reporters

Why only external? The ide/Code category description says "Issues you don't where to place, or general IDE issues", which is exactly my case. I don't see any obvious category for proxy settings.
Comment 12 Jiri Rechtacek 2012-04-04 16:36:25 UTC
Still reproducible with latest build on Mac.
Comment 13 Jiri Rechtacek 2012-04-05 09:56:07 UTC
Hopefully it was improved by core-main/rev/88346dd7e9a1
Comment 14 Quality Engineering 2012-04-06 10:07:29 UTC
Integrated into 'main-golden', will be available in build *201204060400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/88346dd7e9a1
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #209095: fixed Malformed PAC URI
Comment 15 Jiri Skrivanek 2012-04-17 12:21:51 UTC
Created attachment 118400 [details]
Connection failed stack trace.

It is the same as described in bug 207948 - still cannot connect with system proxy settings.

Product Version: NetBeans IDE Dev (Build 201204160400)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 16 Petr Jiricka 2012-04-23 09:38:46 UTC
As this manifests itself with the cloud plugins (Oracle and Amazon) that are a part of NB 7.2, I am raising priority to P2.
Comment 17 Jiri Rechtacek 2012-04-25 15:21:29 UTC
core-main/rev/1232c265e24a
Comment 18 Jiri Rechtacek 2012-04-26 09:50:23 UTC
*** Bug 211145 has been marked as a duplicate of this bug. ***
Comment 19 Quality Engineering 2012-04-26 10:33:07 UTC
Integrated into 'main-golden', will be available in build *201204260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1232c265e24a
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #209095: Can not connect to https addresses via the autodetected proxy
Comment 20 Antonin Nebuzelsky 2012-05-02 12:23:25 UTC
This should be fixed in Beta.

Jirko, please backport to release72_beta branch. Thanks.
Comment 21 Jiri Rechtacek 2012-05-02 12:52:52 UTC
(In reply to comment #20)
> This should be fixed in Beta.
> 
> Jirko, please backport to release72_beta branch. Thanks.

http://hg.netbeans.org/releases/rev/58283f167525
Comment 22 Petr Jiricka 2012-05-02 12:55:31 UTC
I verified that I can now connect to the Oracle Cloud, but I still have an issue with the Amazon Cloud. Here is what I am getting in the console when connecting to Amazon:

INFO [com.amazonaws.request]: Sending Request: POST https://elasticbeanstalk.us-east-1.amazonaws.com / Parameters: (Action: CreateStorageLocation, SignatureMethod: HmacSHA256, AWSAccessKeyId: ABCDEFGHIJKLMNOPQRST, SignatureVersion: 2, Version: 2010-12-01, Signature: IDeletedThis, Timestamp: 2012-05-02T12:39:00.327Z, ) 
INFO [org.apache.http.impl.client.DefaultHttpClient]: I/O exception (java.net.SocketException) caught when connecting to the target host: Broken pipe
INFO [org.apache.http.impl.client.DefaultHttpClient]: Retrying connect
WARNING [com.amazonaws.http.AmazonHttpClient]: Unable to execute HTTP request: Connect to elasticbeanstalk.us-east-1.amazonaws.com/elasticbeanstalk.us-east-1.amazonaws.com/207.171.168.69 timed out

Then the wizard displays an error message telling me it can not connect. When trying using direct connection, the wizard progresses to the next step.
Comment 23 Jiri Rechtacek 2012-05-03 15:22:58 UTC
(In reply to comment #22)
> I verified that I can now connect to the Oracle Cloud,
Great.
> but I still have an
> issue with the Amazon Cloud. Here is what I am getting in the console when
> connecting to Amazon:
It's a different problem. Amazon Cloud client opens a socket connection in contrast to a https connection in Oracle Cloud Client. Let's track it as an separate issue 212030.
Comment 24 Quality Engineering 2012-10-10 07:33:58 UTC
Integrated into 'releases', will be available in build *201210100002* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/58283f167525
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #209095: Can not connect to https addresses via the autodetected proxy
(transplanted from 1232c265e24a4d131aafb80c15fa9243b3edd3e9)
Comment 25 Ondrej Vrabec 2012-11-14 12:12:09 UTC
*** Bug 202500 has been marked as a duplicate of this bug. ***