Wednesday, 11 September 2013

Cannot start Jenkins on port 80 on debian 7

Cannot start Jenkins on port 80 on debian 7

I have installed Jenkins on debian 7. Now I would like to run it on port
80 so I can simply type http://jenkins on my local LAN instead of
http://jenkins:8080 (which currently works). I have modified the file
/etc/default/jenkins to:
# port for HTTP connector (default 8080; disable with -1)
#HTTP_PORT=8080
HTTP_PORT=80
But when I restart the jenkins service: sudo service jenkins restart and
try to access http://jenkins:80 I just get a blank/error page. The log
says (/var/log/jenkins/jenkins.log ):
java.io.IOException: Failed to start a listener: winstone.HttpListener
at winstone.Launcher.spawnListener(Launcher.java:229)
at winstone.Launcher.<init>(Launcher.java:181)
at winstone.Launcher.main(Launcher.java:384)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at Main._main(Main.java:288)
at Main.main(Main.java:98)
Caused by: java.io.IOException: Failed to listen on port 80
at winstone.HttpListener.getServerSocket(HttpListener.java:122)
at winstone.HttpListener.start(HttpListener.java:75)
at winstone.Launcher.spawnListener(Launcher.java:220)
... 8 more
Caused by: java.net.BindException: Permission denied
at java.net.PlainSocketImpl.socketBind(Native Method)
at
java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.<init>(ServerSocket.java:202)
at java.net.ServerSocket.<init>(ServerSocket.java:158)
at winstone.HttpListener.getServerSocket(HttpListener.java:117)
... 10 more
Sep 11, 2013 9:09:30 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Sep 11, 2013 9:09:30 PM hudson.WebAppMain$3 run
SEVERE: Failed to initialize Jenkins
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:244)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:906)
at jenkins.model.Jenkins.<init>(Jenkins.java:806)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.model.Hudson.<init>(Hudson.java:77)
at hudson.WebAppMain$3.run(WebAppMain.java:221)
Exception in thread "pool-2-thread-1" java.lang.NullPointerException
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:191)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
I have tried to run sudo netstat -lp but don't see any port info (does not
look like any application is runnning on port 80).
Any suggestions?

No comments:

Post a Comment