Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344905

Summary: [transport] Helios update could not find and read a repository site contents
Product: [Eclipse Project] Equinox Reporter: Richard <codesamuraix>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, henrich.kraemer, marco, matthew, mn, pascal, sflaniga, slewis
Version: 4.5.0 Mars   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
eclipse .log text file
none
another eclipse .log file
none
error message box
none
another eclipse .log file
none
eclipse .log text file
none
osgiconsole log
none
eclipse network settings capture
none
eclipse configuration.
none
Network connections with a native proxy on Windows
none
eclipse network settings capture 2
none
trace in working check updates scenario
none
console results
none
console results 2
none
config ini before the backup restore
none
netstats none

Description Richard CLA 2011-05-05 19:29:56 EDT
Build Identifier: 20110218-0911

i tried check updates and i got error message boxes. one has could not find repository site. the other was could not read repository contents.


i will attach the log file

Reproducible: Always

Steps to Reproduce:
1. download the current eclipse helios

2. unzip it in the root directory/folder

3. click help

4. click check for updates

5. click next

6. click accept

7. click finish
Comment 1 Richard CLA 2011-05-05 19:32:32 EDT
Created attachment 194894 [details]
eclipse .log text file
Comment 2 Richard CLA 2011-05-08 12:15:23 EDT
i will worried about not receiving updates. any comments?
Comment 3 Matthew Piggott CLA 2011-05-08 14:00:49 EDT
Do you need to use a proxy to connect to the outside world?
Comment 4 Richard CLA 2011-05-08 14:04:02 EDT
no. my internet connection is dhcp.
Comment 5 Richard CLA 2011-05-08 15:04:19 EDT
Created attachment 195025 [details]
another eclipse .log file

i added the eclipse.exe file to my firewall and i still get the error. when it tries to read the your download site, it either cannot read it and times out and/or the connection gets reset. i attached .log file again. is this problem happening to all eclipse projects or just helios?
Comment 6 Richard CLA 2011-05-08 18:27:25 EDT
Created attachment 195028 [details]
error message box

i attached the error message box
Comment 7 Richard CLA 2011-05-08 18:33:44 EDT
Created attachment 195029 [details]
another eclipse .log file

the log file that goes with the error message box
Comment 8 Matthew Piggott CLA 2011-05-08 20:38:10 EDT
DHCP doesn't necessarily mean you don't need a proxy for your connection, is it a corporate network, or at home?

Scott do you have any suggestions?  I can't recall how to turn on logging for ECF.
Comment 9 Richard CLA 2011-05-09 07:40:00 EDT
it is a simple, non-proxy, home network connection.
Comment 10 Scott Lewis CLA 2011-05-09 10:03:19 EDT
(In reply to comment #8)
> DHCP doesn't necessarily mean you don't need a proxy for your connection, is it
> a corporate network, or at home?
> 
> Scott do you have any suggestions?  I can't recall how to turn on logging for
> ECF.

From his log, it looks like he is using the httpclient-based provider.

There's information on the system properties to turn on httpclient logging here:

http://wiki.eclipse.org/Equinox/p2/TransportDebugging
Comment 11 Richard CLA 2011-05-09 11:55:19 EDT
how do i access and change these system properties?

(In reply to comment #10)
> (In reply to comment #8)
> > DHCP doesn't necessarily mean you don't need a proxy for your connection, is it
> > a corporate network, or at home?
> > 
> > Scott do you have any suggestions?  I can't recall how to turn on logging for
> > ECF.
> 
> From his log, it looks like he is using the httpclient-based provider.
> 
> There's information on the system properties to turn on httpclient logging
> here:
> 
> http://wiki.eclipse.org/Equinox/p2/TransportDebugging
Comment 12 Scott Lewis CLA 2011-05-09 12:09:47 EDT
(In reply to comment #11)
> how do i access and change these system properties?
> 

You can set them when you start Eclipse...for example:

eclipse -vmargs -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.httpclient.wire.header=debug -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug
Comment 13 Richard CLA 2011-05-09 12:25:02 EDT
thanks. i will try it.
Comment 14 Richard CLA 2011-05-09 12:53:45 EDT
Created attachment 195102 [details]
eclipse .log text file

i attached the log file after i set the system properties. the jdk and jre versiond i am using are v6 u25
Comment 15 Scott Lewis CLA 2011-05-09 13:00:36 EDT
(In reply to comment #14)
> Created attachment 195102 [details]
> eclipse .log text file
> 
> i attached the log file after i set the system properties. the jdk and jre
> versiond i am using are v6 u25

Unfortunately, I don't see any httpclient log output in the attachment 195102 [details].  Do you see log output anywhere (e.g. in osgi console)?
Comment 16 Richard CLA 2011-05-09 13:10:47 EDT
how do i access the osgi console?
Comment 17 Scott Lewis CLA 2011-05-09 13:47:15 EDT
(In reply to comment #16)
> how do i access the osgi console?

Hi Richard.

The osgi console can be started with 

eclipse -console -consoleLog -vmargs ...

But it's not necessary that the osgi console be opened to see the log output...I just thought that perhaps you already had the osgi log open, and the log output was going there.

Something else appears to be wrong with the use of these httpclient system properties...I'll try to help diagnose.  Would  you please provide the Eclipse command line that you are using?  Thanks.
Comment 18 Richard CLA 2011-05-09 15:25:44 EDT
This is what i was using:


eclipse -vmargs -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.httpclient.wire.header=debug -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug
Comment 19 Scott Lewis CLA 2011-05-09 16:02:53 EDT
(In reply to comment #18)
> This is what i was using:
> 
> 
> eclipse -vmargs
> -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> -Dorg.apache.commons.logging.simplelog.showdatetime=true
> -Dorg.apache.commons.logging.simplelog.log.httpclient.wire.header=debug
> -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug
> -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug

Sorry, I forgot...you also need eclipse's -debug parameter...e.g:

eclipse -debug -vmargs -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire.header=debug
-Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug
Comment 20 Richard CLA 2011-05-09 16:49:10 EDT
Created attachment 195146 [details]
osgiconsole log

here you go. i hope this what you need
Comment 21 Scott Lewis CLA 2011-05-09 18:01:33 EDT
(In reply to comment #20)
> Created attachment 195146 [details]
> osgiconsole log
> 
> here you go. i hope this what you need

Hmmm...unfortunately even with the httpclient output it's not very informative about what is going on...at least on your network.

My reading of your log is that for some reason as soon as you try to GET any file, the server seems to close the connection on you.  For example:

<httpclient logging output removed>
2011/05/09 16:41:33:234 EDT [DEBUG] HttpConnection - Open connection to download
.eclipse.org:80
2011/05/09 16:41:33:281 EDT [DEBUG] header - >> "HEAD /tools/mylyn/update/helios
/compositeContent.xml HTTP/1.1[\r][\n]"
2011/05/09 16:41:33:281 EDT [DEBUG] HttpMethodBase - Adding Host request header
2011/05/09 16:41:33:281 EDT [DEBUG] header - >> "Cache-Control: max-age=0[\r][\n
]"
2011/05/09 16:41:33:281 EDT [DEBUG] header - >> "User-Agent: Jakarta Commons-Htt
pClient/3.1[\r][\n]"
2011/05/09 16:41:33:281 EDT [DEBUG] header - >> "Host: download.eclipse.org[\r][
\n]"
2011/05/09 16:41:33:281 EDT [DEBUG] header - >> "[\r][\n]"
2011/05/09 16:41:37:437 EDT [DEBUG] HttpMethodDirector - Closing the connection.
<THIS SHOULD NOT HAPPEN>
<removed httpclient logging output>
<here is the exception that occurred>
!ENTRY org.eclipse.equinox.p2.core 4 0 2011-05-09 16:41:37.437
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at htt
p://download.eclipse.org/tools/mylyn/update/helios/compositeContent.xml.
        at org.eclipse.equinox.internal.p2.repository.CacheManager.createCache(C
acheManager.java:189)
        at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadata
RepositoryFactory.getLocalFile(CompositeMetadataRepositoryFactory.java:74)
        at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadata
RepositoryFactory.load(CompositeMetadataRepositoryFactory.java:99)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.factoryLoad(MetadataRepositoryManager.java:57)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepository
Manager.loadRepository(AbstractRepositoryManager.java:746)
        at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepository
Manager.loadRepository(AbstractRepositoryManager.java:651)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.loadRepository(MetadataRepositoryManager.java:96)
        at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.loadRepository(MetadataRepositoryManager.java:92)
        at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.doLoad(LoadMetada
taRepositoryJob.java:115)
        at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.runModal(LoadMeta
dataRepositoryJob.java:100)
        at org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler$2.
runModal(PreloadingRepositoryHandler.java:82)
        at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob
.java:177)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

<here is the actual cause...as you can see it's inside the httpclient code>
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:
78)
        at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106
)
        at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.
java:1116)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$Http
ConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
        at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho
dBase.java:1973)
        at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB
ase.java:1735)
        at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j
ava:1098)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt
pMethodDirector.java:398)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe
thodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:397)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:346)
        at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientFileSystem
Browser.runRequest(HttpClientFileSystemBrowser.java:227)
        at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowse
r$DirectoryJob.run(AbstractFileSystemBrowser.java:69)
        ... 1 more


I've tried this file myself...using ECF filetransfer test code, and it retrieves this file browse (HEAD request) just fine...here's my httpclient logging output.

2011/05/09 14:56:21:452 PDT [DEBUG] HttpConnection - Open connection to download.eclipse.org:80
2011/05/09 14:56:21:843 PDT [DEBUG] header - >> "HEAD /tools/mylyn/update/helios/compositeContent.xml HTTP/1.1[\r][\n]"
2011/05/09 14:56:21:843 PDT [DEBUG] HttpMethodBase - Adding Host request header
2011/05/09 14:56:21:843 PDT [DEBUG] header - >> "Cache-Control: max-age=0[\r][\n]"
2011/05/09 14:56:21:843 PDT [DEBUG] header - >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
2011/05/09 14:56:21:843 PDT [DEBUG] header - >> "Host: download.eclipse.org[\r][\n]"
2011/05/09 14:56:21:843 PDT [DEBUG] header - >> "[\r][\n]"
2011/05/09 14:56:27:327 PDT [DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
2011/05/09 14:56:27:327 PDT [DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
2011/05/09 14:56:27:327 PDT [DEBUG] header - << "Date: Mon, 09 May 2011 21:56:22 GMT[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "Server: Apache[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "Last-Modified: Sat, 26 Feb 2011 08:53:57 GMT[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "ETag: "bdd9c-2cd-49d2b96437340"[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "Accept-Ranges: bytes[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "Content-Length: 717[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "Connection: close[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "Content-Type: text/xml[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] header - << "[\r][\n]"
2011/05/09 14:56:27:343 PDT [DEBUG] HttpMethodBase - Should close connection in response to directive: close
2011/05/09 14:56:27:343 PDT [DEBUG] HttpConnection - Releasing connection back to connection manager.
2011/05/09 14:56:27:343 PDT [DEBUG] MultiThreadedHttpConnectionManager - Freeing connection, hostConfig=HostConfiguration[host=http://download.eclipse.org]
2011/05/09 14:56:27:343 PDT [DEBUG] IdleConnectionHandler - Adding connection at: 1304978187343
2011/05/09 14:56:27:359 PDT [DEBUG] MultiThreadedHttpConnectionManager - Notifying no-one, there are no waiting threads
16.485 [Worker-1]: handleFileSystemBrowseEvent(RemoteFileSystemBrowseEvent[fileID=FileTransferID[ecf.provider.filetransfer:http://download.eclipse.org/tools/mylyn/update/helios/compositeContent.xml];files=[URLRemoteFile[id=FileTransferID[ecf.provider.filetransfer:http://download.eclipse.org/tools/mylyn/update/helios/compositeContent.xml];name=compositeContent.xml;isDir=false;length=717;lastMod=1298710437000;attr=URLRemoteFileAttributes[read=true;write=false;hidden=false;exec=false;archive=true]]]])

Hmmm.  This is very strange.  Richard could you please verify that there is no active proxy configuration set?  You do this by (in Eclipse) going to:

Window->Preferences->General->Network Connections

And seeing if there is any proxy information present there.
Comment 22 Richard CLA 2011-05-09 18:46:48 EDT
Created attachment 195163 [details]
eclipse  network settings capture

i see no proxy settings. everything is unchecked.
Comment 23 Scott Lewis CLA 2011-05-09 20:22:12 EDT
(In reply to comment #22)
> Created attachment 195163 [details]
> eclipse  network settings capture
> 
> i see no proxy settings. everything is unchecked.

I'm currently puzzled by this...as obviously I can't reproduce from my own network or any other network I have access to.  

Are you able to try using this same machine/Eclipse from some other network?  If so do you see the same thing?

Have you tried installing something other than from the update site at download.eclipse.org?  If so, do you see the same thing?

I've also asked another committer who is more familiar with httpclient logging options than I am to take a look at this, and advise if there is somehow more/other information we can get out of httpclient about what is/is not going on.  We'll keep at it.
Comment 24 Henrich Kraemer CLA 2011-05-09 20:48:35 EDT
I agree with Scott's analysis in comment 21 that it looks like the server or something in between your machine and the server resets the connection. 

Unfortunately nothing immediate comes to mind with respect to what is causing this. 
In addition to Scott's suggestions in comment 23 you could also try the following to narrow things down:
If you have access to a different machine: do you see the same issue from that machine as well? 

Hope this helps a tiny bit.

- Henrich
Comment 25 Richard CLA 2011-05-09 22:00:53 EDT
no. the different machine had no problems. i vpned using my corporate vpn client and remote desktop on the problem machine to the different machine.

the problem occurred again on the problem machine on a different network.

the different machine had an older version of the jdk and jre and on a different network.


(In reply to comment #24)
> I agree with Scott's analysis in comment 21 that it looks like the server or
> something in between your machine and the server resets the connection. 
> 
> Unfortunately nothing immediate comes to mind with respect to what is causing
> this. 
> In addition to Scott's suggestions in comment 23 you could also try the
> following to narrow things down:
> If you have access to a different machine: do you see the same issue from that
> machine as well? 
> 
> Hope this helps a tiny bit.
> 
> - Henrich
Comment 26 Henrich Kraemer CLA 2011-05-10 11:31:21 EDT
Richard, you mentioned the firewall in comment 5. 
In many cases this type of problem is caused by firewalls. 
Have you tried disabling the firewall entirely to test whether this may be causing this?
Also have you tried rebooting your machine?
Comment 27 Andrew Niefer CLA 2011-05-10 11:46:32 EDT
(In reply to comment #5)
> Created attachment 195025 [details]
> another eclipse .log file
> 
> i added the eclipse.exe file to my firewall and i still get the error. when it
> tries to read the your download site, it either cannot read it and times out
> and/or the connection gets reset. i attached .log file again. is this problem
> happening to all eclipse projects or just helios?

It is possible that the process you to to allow through the firewall would be java.exe or javaw.exe depending on how eclipse found the vm.

The system property "eclipse.commands" would give a hint to the process with the "-vm" argument.  (System properties are visible in Help -> About -> Installation Details -> Configuration).

If the -vm arg indicates an executable, then the process will be that java executable, if it indicate a dll, then the process will be eclipse.exe
Comment 28 Richard CLA 2011-05-10 12:50:49 EDT
i am using the mcafee firewall. the jre java.exe and javaw.exe, eclipse.exe has full access. -vm is the jre jvm.dll. mcafee did not allow me to add it to my firewall exception list. i turned off the firewall. i tried checking for updates.
i got this error message. 

Unable to read repository at http://download.eclipse.org/tools/mylyn/update/helios/compositeContent.xml.
Connection reset
Comment 29 Richard CLA 2011-05-11 12:35:16 EDT
what now? Please advise.
Comment 30 Scott Lewis CLA 2011-05-11 14:08:01 EDT
(In reply to comment #29)
> what now? Please advise.

First, I'll summarize...Richard please correct if not right.

1) The problem seems to be limited to a single machine.  
2) On that system, you are using the mcafee firewall...though even when you disabled the firewall it still did not work.
3) The problem does not occur on other systems on the same network.
4) As far as anyone knows, there is no proxy setup for that network.

I'm not currently able to reproduce the problem myself...and I take it that the other p2/eclipse committers on this bug also haven't been able to reproduce it.

One thing you might do Richard to provide us with more information is to in Eclipse open:

Help->About->Installation details->Configuration tab

And copy the entire configuration to a file and attach it to this bug.  This may help in understanding the affected environment better.

As far as I know, the apache httpclient 3.1 doesn't provide any more logging options, so I don't know if we are going to get any more info about the disconnect from the httpclient code.  Anyone who knows different please advise.

One thing to try would be to disable the httpclient provider with a system property...and this will then switch to use the JRE provider.  Here's the property:

eclipse -vmargs -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient

I don't really know why this would make a difference, but perhaps it's something subtle about the apache httpclient provider and your system that's causing the problem.  If so, then not using the httpclient provider (rather using the jre-based provider) may make a difference.

With your help and patience Richard we will keep trying to figure out what's going wrong here.
Comment 31 Richard CLA 2011-05-11 17:02:35 EDT
Created attachment 195433 [details]
eclipse configuration.

i attached the configuration. is the apache httpclient compatible to jre 6up25?
does the apache httpclient look at the default browser?
Comment 32 Scott Lewis CLA 2011-05-11 17:13:28 EDT
(In reply to comment #31)
> Created attachment 195433 [details]
> eclipse configuration.
> 
> i attached the configuration. is the apache httpclient compatible to jre 6up25?

I'm not sure.  I haven't heard anything specifically about this (jre 6up25 and apache httpclient version 3.1.0).  I would be surprised if it was something specific to jre 6up25...since httpclient uses java 4 api only...and if jre 6up25 breaks old socket API somehow I would expect more than httpclient to be broken.

OTOH, it is possible that it's something associated with 6up25 in particular interaction with httpclient.

> does the apache httpclient look at the default browser?

For the apache httpclient specifically, the answer is no.  For the Eclipse proxy api (which ECF uses to setup the proxying prior to making the httpclient calls), I think it does look at the IE proxy information (on windows)...although I'm not certain of that...the proxy api is not maintained by me/ECF...rather it's considered part of the Eclipse platform.
Comment 33 Henrich Kraemer CLA 2011-05-11 19:07:16 EDT
Created attachment 195447 [details]
Network connections with a native proxy on Windows
Comment 34 Henrich Kraemer CLA 2011-05-11 19:15:31 EDT
Hi Richard,

Attachment 195447 [details] shows the Network Connections preference page with the proxy settings after first setting proxy settings in Internet Explorer. For my version of IE this was done at Tools|Internet Options|Connections Tab|LAN settings.

I started Eclipse after that. Eclipse may not pick up changes to these settings while it is running.

The default for 'Active Provider' was 'Native' for me as shown. 

Normally I do not use a proxy and in this case the dialog showed none of the highlighted entries.

Perhaps you take a look and report back what the Network Connections preference page looks like for you.

Thank you,

Henrich
Comment 35 Richard CLA 2011-05-11 22:30:10 EDT
Created attachment 195454 [details]
eclipse  network settings capture 2

here are my eclipse network connections. they are unchecked and blank
Comment 36 Richard CLA 2011-05-12 07:56:03 EDT
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient worked. but i sure would like t know what is causing the problem.
Comment 37 Richard CLA 2011-05-12 08:04:41 EDT
http://forums.oracle.com/forums/thread.jspa?threadID=2149358&tstart=0 is this my problem?
Comment 38 Scott Lewis CLA 2011-05-12 12:01:41 EDT
(In reply to comment #37)
> http://forums.oracle.com/forums/thread.jspa?threadID=2149358&tstart=0 is this
> my problem?

My reading of the bug information would suggest it's not the same as what you experienced (i.e. the stack trace is different, the Oracle-reported problem seems to be a deadlock (and not a connection closed exception), and it seems to have been limited to linux 64, and u22 (whereas you reported using u25)...but of course it's possible that it is related.

Although I'm very glad the disabling httpclient worked for you, I would also like to know why...as if it's affecting you it will probably affect others.  If you can spare some more testing in variations in your environment to attempt to narrow things down further it would be appreciated.  For example, would it be possible to try on your system with some other version of the jre?

Also, I will put together a wiki page with the httpclient disable system property doc, so that it's easier to point to.
Comment 39 Scott Lewis CLA 2011-05-12 12:09:46 EDT
I've created this wiki page:

http://wiki.eclipse.org/Disabling_Apache_Httpclient
Comment 40 Richard CLA 2011-05-12 13:11:37 EDT
upgrading the jre is my next step.
Comment 41 Matthew Piggott CLA 2011-05-12 13:38:58 EDT
In the General -> Network Connections you might try switching the Active Provider to Direct from Native.
Comment 42 Richard CLA 2011-05-12 16:40:57 EDT
I tried that. the error occurred again.

(In reply to comment #41)
> In the General -> Network Connections you might try switching the Active
> Provider to Direct from Native.
Comment 43 Richard CLA 2011-05-12 18:32:25 EDT
you can rule out the jre. older jre did not fixed it. sigh.....
Comment 44 Henrich Kraemer CLA 2011-05-12 19:32:30 EDT
Created attachment 195555 [details]
trace in working check updates scenario

Richard,

One can get a bit more information out of HttpClient by setting the debug level to trace.
If you could collect this from your machine, in the following way we could compare your trace against the one I collected. Perhaps this gives us a clue. 

1. Make a backup copy of eclipse/configuration/config.ini 
2. Add the following lines to config.ini:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
org.apache.commons.logging.simplelog.showdatetime=true 
org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=trace
org.apache.commons.logging.simplelog.log.httpclient.wire.header=debug
org.apache.commons.logging.simplelog.log.httpclient.wire=debug

3. Open a command prompt and cd to the directory containing eclipsec.exe and run the following command: 
C:\AD\Target\eclipse-SDK-3.6.2-win32\eclipse>eclipsec -debug -consoleLog > console.txt 2>&1

4. Go through the scenario described initially and exit eclipse.

5. The debug trace is in console.txt.

6. restore config.ini from backup copy made in step 1.

Thank you for your patience,

Henrich
Comment 45 Richard CLA 2011-05-13 08:03:48 EDT
Created attachment 195585 [details]
console results

i did it
Comment 46 Henrich Kraemer CLA 2011-05-13 13:03:21 EDT
(In reply to comment #45)

Hi Richard, 

Unfortunately these do not contain the TRACE and DEBUG entries you see in the attachment 195555 [details].

Did you do step 2 with Configuration file:
file:/d:/eclipse/configuration/config.ini ? 

Can you upload your configuration file? 

Thank you

Henrich
Comment 47 Richard CLA 2011-05-13 16:32:41 EDT
yes. i did in the wrong ini. sorry, i just woke up and rushed it when i did it.
i will do it again.


(In reply to comment #46)
> (In reply to comment #45)
> 
> Hi Richard, 
> 
> Unfortunately these do not contain the TRACE and DEBUG entries you see in the
> attachment 195555 [details].
> 
> Did you do step 2 with Configuration file:
> file:/d:/eclipse/configuration/config.ini ? 
> 
> Can you upload your configuration file? 
> 
> Thank you
> 
> Henrich
Comment 48 Richard CLA 2011-05-13 16:58:28 EDT
Created attachment 195633 [details]
console results 2
Comment 49 Richard CLA 2011-05-13 17:00:01 EDT
Created attachment 195634 [details]
config ini before the backup restore
Comment 50 Matthew Piggott CLA 2011-05-13 17:21:03 EDT
Oddly the log shows quite a few successful connections to downloads.eclipse.org
Comment 51 Henrich Kraemer CLA 2011-05-16 20:52:53 EDT
Richard,

I am suspecting that there is a flaw in the connection management code of the ECF HttpClient based provider so that it does not work as it should. 

If you could collect the output of the netstat command at the time where you experience the problem that could help support or possibly refute that theory. To do this have a command prompt open with the command:
c:\> netstat > netstat-output.txt
press return right after you experience the problem.

Thank you!
Comment 52 Richard CLA 2011-05-16 21:21:32 EDT
Created attachment 195807 [details]
netstats

here is the natstats. for security, i scrambled the ip address
Comment 53 Henrich Kraemer CLA 2011-05-18 00:24:52 EDT
Thank you Richard,

It appears to me that the netstats report if consistent (but no proof) with the suspected connection management flaw:
The ECF HttpClient provider creates a new HttpClient instance for each transfer. For example a new HttpClient instance is created in HttpClientRetrieveFileTransferFactory. As a consequence prior connections will not be reused. Connections that are to be kept alive as per protocol are being closed when garbage collection kicks in and calls the finalizer or of java.net.PlainSocketImpl.finalize(). Depending on finalizers to close connections is highly undesirable. I am wondering whether this could cause the symptoms reported here. 

If this was the case, a simple solution may be to have the ECF HttpClient provider's transfers or browse operations share a single HttpClient instance for the entire eclipse session. 
Calls to MultiThreadedHttpConnectionManager.closeIdleConnections(long) could also be considered possibly using utility HttpClient's utility class IdleConnectionTimeoutThread. 

To test this theory a change in HttpClient behavior could be tied to a system property which enables using a single HttpClient instance. Providing a patch to that effect should be quite straight forward. However I haven't worked with git before and it wasn't immediately apparent to me how to create a patch. If someone can give me pointer to a how to, please add a comment.

On the other hand I am not quite sure whether ECF holding on to the resources associated with HttpClient for the entire session is acceptable. Technically it might be difficult to cleanly implement a different lifecycle as there may still be outstanding transfers.
Comment 54 Pascal Rapicault CLA 2011-05-18 01:37:53 EDT
Always happy to see you chime in Henrich!
I have not looked at the HttpClient code but what is the granularity of the caching being done? For example, what happens in case where I change the password to connect to a site that I'm already connected to or if the proxy settings are being changed.
Comment 55 Henrich Kraemer CLA 2011-05-19 10:22:57 EDT
Hi Pascal, good hearing from you and thank you for raising these questions.

Currently there is no caching on the HttpClient level as each request has its own HttpClient instance along with its state cache (HttpState) for credentials and cookies and connection state. 

However since SOCKS proxy is handled at the JRE level system properties are currently used. So it is currently not possible to have one transfer use a SOCKS proxy and the other go direct for example. 

If the server challenges for authentication because the currently provided authentication is no longer valid (you changed it) then the transfer should fail and the higher level (P2) should prompt again for a password. I believe this would continue to work the same even with a single HttpClient instance. 

If ECF would only use a single HttpClient instance, different ECF transfers possibly initiated by different Eclipse bundles would reuse that state. A problem is that credentials (and cookies) are cached by HttpClient and are reused if available. If a transfer wanted to connect to the same server with a different username as a previous transfer, HttpClient would first use the previously used credentials so that this would not be possible. 

A possibility is to not use a single HttpClient instance and instead use a single connection manager instance (MultiThreadedHttpConnectionManager). I would expect the behavior to be similar to the one provided by java.net.HttpURLConnection. From the JavaDoc "but the underlying network connection to the HTTP server may be transparently shared by other instances.". 

An alternative to more caching would be to call MultiThreadedHttpConnectionManager.closeIdleConnections() when a transfer is done so that connections are not closed by finalizers.
Comment 56 Pascal Rapicault CLA 2011-06-10 00:00:46 EDT
*** Bug 249257 has been marked as a duplicate of this bug. ***
Comment 57 Richard CLA 2011-06-10 13:32:02 EDT
does this mean someone else experienced the same problem?

(In reply to comment #56)
> *** Bug 249257 has been marked as a duplicate of this bug. ***
Comment 58 Marco Descher CLA 2016-01-29 07:46:04 EST
This bug is still valid for me in Mars SR1. I started a new project based on Equinox, and found the info on https://wiki.eclipse.org/Disabling_Apache_Httpclient - with this current target I am not able to do any updates without setting the mentioned parameter.
Comment 59 Eclipse Genie CLA 2020-03-06 17:17:04 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.