Jenkins permission denied

Jenkins

I've just installer a new (and first) Jenkins in my openshift account.

I selected the manven automativally (from apache, version 3.2.2) install in (jenkins->coinfiguration) ..

Then, I created a new job from my own git repository.

However, when I ran this job, I got the following exception:

Fetching upstream changes from XXX
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision bde393352dfdf3c5b097bc3e80f4631191499b80 (origin/HEAD, origin/master)
Checking out Revision bde393352dfdf3c5b097bc3e80f4631191499b80 (origin/HEAD, origin/master)
No change to record in branch origin/HEAD
No change to record in branch origin/master
Parsing POMs
Discovered a new module br.com.accurati:icheck icheck
Discovered a new module br.com.accurati.icheck:icheck-commons core project classes
Discovered a new module br.com.accurati.icheck:icheck-desktop core project classes
Modules changed, recalculating dependency graph
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:178)
    at hudson.maven.AbstractMavenProcessFactory$SocketHandler.call(AbstractMavenProcessFactory.java:164)
    at hudson.maven.AbstractMavenProcessFactory$SocketHandler.call(AbstractMavenProcessFactory.java:162)
    at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
    at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:236)
    at hudson.maven.ProcessCache.get(ProcessCache.java:235)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:749)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585)
    at hudson.model.Run.execute(Run.java:1684)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:231)
Finished: FAILURE

Any idea?

Best Answer

The java error java.net.BindException: Permission denied is a generic error (not specific to Jenkins), that indicates the app is trying to listen in on a port that's not permitted. On Unix in particular, that would be a port below 1024 if the user is not root. Typically, your Jenkins instance is configure to be listening on port 80 directly, that could be a problem if the java process is not running as root. Try setting it to listen on port 8080 instead. Then use this port in your browser, or (more typically) front end your Jenkins with an Apache instance running as root on port 80, and proxying for Jenkins on port 8080.