0

I'm trying to get a Tycho build to work on an OpenShift server. Locally resolving the target definition and building works fine, but when deploying I get the following error:

Unable to read repository at http://download.eclipse.org/rt/rap/2.2/content.xml. Permission denied

I'm not sure if its a problem in the Tycho configuration (but as far as I can remember, I didn't do anything outside the build reactor to make Tycho work) or the one of OpenShift. Could someone tell me what the problem is or how to narrow it down?


I tried switching from a target platform file to defining the repository in the pom.xml. Then I get a similar error message:

Failed to load p2 repository with ID 'rap' from location http://download.eclipse.org/rt/rap/2.2


I found a Linux bug that might be relevant. It doesn't help me, since I'm not even able confirm the server is a Debian. I tried to get the Jenkins to build on some other platform and tried any abbreviation or combination of "Windows" in the (seemingly undocumented) "platform" field, but neither of these values made it change the OS.


Finally got Maven to work with parameters (for how, see here). The log shows nothing out of the ordinary, as far as I can see:

[INFO] Computing target platform for MavenProject: org.acme.dummy:org.acme.dummy.feature:0.0.1-SNAPSHOT @ /var/lib/openshift/537cb333e0b8cd68ad000187/app-root/runtime/repo/org.acme.dummy.feature/pom.xml
[DEBUG] Added p2 repository rap-repository (http://download.eclipse.org/rt/rap/2.2)
[DEBUG] Using default execution environment 'JavaSE-1.6'
[DEBUG] Registered artifact repository org.eclipse.tycho.repository.registry.facade.RepositoryBlackboardKey(uri=file:/resolution-context-artifacts@/var/lib/openshift/537cb333e0b8cd68ad000187/app-root/runtime/repo/org.acmr.dummy.feature)
May 21, 2014 10:15:59 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.BindException) caught when connecting to the target host: Permission denied

It's retrying to connect a couple of times, then there is the above exception:

!ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2014-05-21 10:16:00.073
!MESSAGE Connection to http://download.eclipse.org/rt/rap/2.2/p2.index failed on Permission denied. Retry attempt 0 started
!STACK 0
java.net.BindException: Permission denied
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
    at java.net.Socket.bind(Socket.java:631)
    at org.eclipse.ecf.internal.provider.filetransfer.httpclient4.ECFHttpClientProtocolSocketFactory.connectSocket(ECFHttpClientProtocolSocketFactory.java:82)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:150)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:575)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
Community
  • 1
  • 1
Stefan S.
  • 3,950
  • 5
  • 25
  • 77
  • Is there any more useful information in the exception stack trace (`-e`) or debug output (`-X`)? – oberlies May 19 '14 at 12:06
  • I don't know how to add these parameters, I tried it using the Jenkins but didn't work. But the stack trace only repeated "Permission denied" over and over again. – Stefan S. May 19 '14 at 15:04
  • They are parameters to the `mvn` call. If you can't figure out how to set this in your context, start a separate question for this. – oberlies May 19 '14 at 15:05
  • @oberlies I added the information. – Stefan S. May 21 '14 at 14:29
  • @SteffiS. I am seeing this same issue - have you ever figured a workaround? It seems Apache Http Client (used by Eclipse P2 via ECF) does [not work by default on OpenShift](https://www.openshift.com/forums/openshift/httpclient-stopped-working-client-connection) as it tries to bind to localhost. – Rafael Chaves Sep 17 '14 at 13:52
  • @RafaelChaves Sadly, no. I wasn't able to use OpenShift :( – Stefan S. Sep 17 '14 at 16:25
  • 1
    @steffi-s Thanks. I [reported a bug](https://bugs.eclipse.org/bugs/show_bug.cgi?id=444377) against ECF (which is used by P2/Tycho). – Rafael Chaves Sep 29 '14 at 02:12

0 Answers0