OpenShif jenkins: java.net.BindException: Permission denied

断了今生、忘了曾经 提交于 2019-12-23 09:37:03

问题


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?


回答1:


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.




回答2:


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

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



来源:https://stackoverflow.com/questions/22884325/openshif-jenkins-java-net-bindexception-permission-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!