Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Luna 4.4.2 + JDK 8 : cannot open git-upload-pack
Luna 4.4.2 + JDK 8 : cannot open git-upload-pack [message #1692586] Thu, 16 April 2015 16:02 Go to next message
Ionel GARDAIS is currently offline Ionel GARDAISFriend
Messages: 2
Registered: April 2015
Junior Member
Hi,

I have trouble fetching a repository when using JDK8 (jdk8u25) with Luna 4.4.2 (up-to-date as of 16-apr-2015).
Using the same settings wit with JDK7 (jdk7u76) works fine.

Setup is :
- CentOS 6.6 up-to-date
- JDK from Oracle
- server is Gerrit 2.9.4 accessed through HTTPS and a valid certificate (not self-signed, not revoked, issued by GlobalSign)
- a proxy is used to access the server.

Here are the logs (note : server.eclipse.org is just for the board to allow the post) :

!SUBENTRY 1 org.eclipse.egit.ui 4 0 2015-04-16 15:22:31.304
!MESSAGE https:// username@server/p/sandbox: cannot open git-upload-pack
!STACK 0
org.eclipse.jgit.api.errors.TransportException: https:// username@server/p/sandbox: cannot open git-upload-pack
   at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
   at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:134)
   at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:103)
   at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.runInWorkspace(FetchOperationUI.java:123)
   at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: https:// username@server/p/sandbox: cannot open git-upload-pack
   at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:521)
   at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
   at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
   at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
   at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1111)
   at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
   ... 5 more
Caused by: java.net.SocketException: Unexpected end of file from server
   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:792)
   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:789)
   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1535)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
   at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
   at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98)
   at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168)
   at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475)
   ... 10 more


Any clues ?

Thanks,
Ionel
[SOLVED] Luna 4.4.2 + JDK 8 : cannot open git-upload-pack [message #1692600 is a reply to message #1692586] Thu, 16 April 2015 18:11 Go to previous messageGo to next message
Ionel GARDAIS is currently offline Ionel GARDAISFriend
Messages: 2
Registered: April 2015
Junior Member
Found a solution.

Our server does not support TLSv1.2, only TLSv1.1 and TLSv1.0.

Java 8 default TLS protocol is 1.2 whereas it is 1.0 with Java 7.
For an unknown reason, when Egit connects to the server, it does not fallback to TLSv1.1 after TLS1.2 fails to establish the connection.

I don't know if it's an Egit or a Java 8 issue.

So, the solution found is to add "-Dhttps.protocols=TLSv1" to the eclipse.ini file.
Re: [SOLVED] Luna 4.4.2 + JDK 8 : cannot open git-upload-pack [message #1692640 is a reply to message #1692600] Fri, 17 April 2015 07:38 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1133
Registered: July 2009
Senior Member
JGit sets SSLContext to "TLS"[1], not sure what this means for potential fallback on different Java versions:

in org.eclipse.jgit.transport.http.JDKHttpConnection:

public void configure(KeyManager[] km, TrustManager[] tm,
SecureRandom random) throws NoSuchAlgorithmException,
KeyManagementException {
SSLContext ctx = SSLContext.getInstance("TLS"); //$NON-NLS-1$
ctx.init(km, tm, random);
((HttpsURLConnection) wrappedUrlConnection).setSSLSocketFactory(ctx
.getSocketFactory());
}

[1] http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java#n189
Previous Topic:Can't add Copy-Pasted file to index
Next Topic:Remote Tracking - new branches
Goto Forum:
  


Current Time: Tue Apr 07 10:57:43 GMT 2020

Powered by FUDForum. Page generated in 0.02115 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top