Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenShif jenkins: java.net.BindException: Permission denied

I have setup Jenkins on openshift, made a hello world project and trying to package it by the Jenkins in openshift. But I got the next error:

Commencing build of Revision 2062de71e567e2f62a57dd3a1f9d660950b6482d (origin/master)
Checking out Revision 2062de71e567e2f62a57dd3a1f9d660950b6482d (origin/master)
Parsing POMs
ERROR: Failed to parse POMs
java.net.BindException: Permission denied
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
    at java.net.ServerSocket.bind(ServerSocket.java:376)
    at java.net.ServerSocket.bind(ServerSocket.java:330)
    at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.<init>(AbstractMavenProcessFactory.java:165)
    at hudson.maven.AbstractMavenProcessFactory$SocketHandler.call(AbstractMavenProcessFactory.java:151)
    at hudson.maven.AbstractMavenProcessFactory$SocketHandler.call(AbstractMavenProcessFactory.java:149)
    at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
    at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:207)
    at hudson.maven.ProcessCache.get(ProcessCache.java:231)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:672)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584)
    at hudson.model.Run.execute(Run.java:1575)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)
Finished: FAILURE

I think it related to OPENSHIFT_INTERNAL_IP, but how to fix that?

like image 204
Anton Balashov Avatar asked Apr 05 '14 17:04

Anton Balashov


2 Answers

I think you are running into the same problem as described here - https://www.openshift.com/forums/openshift/jenkins-failed-to-build-maven-project

There is no simple work around out of the box. The problem is that the current Jenkins code just does not give you a possibility to provide OPENSHIFT_INTERNAL_IP to the process factory. The code mentioned in the post above looks reasonable. It basically modifies Jenkins to allow the setting of a system variable to pass in OPENSHIFT_INTERNAL_IP. Bottom line, for now you would need a custom build version of Jenkins.

like image 82
Hardy Avatar answered Nov 02 '22 08:11

Hardy


That link is no longer valid. The issue is open here.

https://issues.jenkins-ci.org/browse/JENKINS-19844

like image 39
Yonkee Avatar answered Nov 02 '22 10:11

Yonkee