| Summary: | [transport] Helios update could not find and read a repository site contents | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Richard <codesamuraix> | ||||||||||||||||||||||||||||||||
| Component: | p2 | Assignee: | 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
Richard
Created attachment 194894 [details]
eclipse .log text file
i will worried about not receiving updates. any comments? Do you need to use a proxy to connect to the outside world? no. my internet connection is dhcp. 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?
Created attachment 195028 [details]
error message box
i attached the error message box
Created attachment 195029 [details]
another eclipse .log file
the log file that goes with the error message box
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. it is a simple, non-proxy, home network connection. (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 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 (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 thanks. i will try it. 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
(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)? how do i access the osgi console? (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. 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 (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 Created attachment 195146 [details]
osgiconsole log
here you go. i hope this what you need
(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. Created attachment 195163 [details]
eclipse network settings capture
i see no proxy settings. everything is unchecked.
(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. 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 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 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? (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 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 what now? Please advise. (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. 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?
(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. Created attachment 195447 [details]
Network connections with a native proxy on Windows
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
Created attachment 195454 [details]
eclipse network settings capture 2
here are my eclipse network connections. they are unchecked and blank
-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. http://forums.oracle.com/forums/thread.jspa?threadID=2149358&tstart=0 is this my problem? (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. I've created this wiki page: http://wiki.eclipse.org/Disabling_Apache_Httpclient upgrading the jre is my next step. In the General -> Network Connections you might try switching the Active Provider to Direct from Native. 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. you can rule out the jre. older jre did not fixed it. sigh..... 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
Created attachment 195585 [details]
console results
i did it
(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 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 Created attachment 195633 [details]
console results 2
Created attachment 195634 [details]
config ini before the backup restore
Oddly the log shows quite a few successful connections to downloads.eclipse.org 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! Created attachment 195807 [details]
netstats
here is the natstats. for security, i scrambled the ip address
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. 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. 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. *** Bug 249257 has been marked as a duplicate of this bug. *** 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. *** 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. 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. |