java.net.SocketException

tip

The solution is to run as root using sudo or to set different port in "application.properties" file, e.g. server.port=${port:8181}

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • authbind + java + ubuntu still fails - why?
    via Server Fault by mark
    ,
  • Using the new SSH server feature: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+SSH We accidentally set it to a port below 1024 when the server doesn't run as root. The server becomes unusable, printing this message to the browser when attempting to access it: {code} org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) at jenkins.model.Jenkins.executeReactor(Jenkins.java:811) at jenkins.model.Jenkins.<init>(Jenkins.java:732) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.model.Hudson.<init>(Hudson.java:77) at hudson.WebAppMain$2.run(WebAppMain.java:217) Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124) at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$5.runTask(Jenkins.java:800) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.lang.reflect.InvocationTargetException 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 hudson.init.InitializerFinder.invoke(InitializerFinder.java:120) ... 8 more Caused by: java.net.SocketException: Permission denied at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77) at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.java:248) at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.java:48) at org.apache.mina.core.polling.AbstractPollingIoAcceptor.registerHandles(AbstractPollingIoAcceptor.java:525) at org.apache.mina.core.polling.AbstractPollingIoAcceptor.access$200(AbstractPollingIoAcceptor.java:66) at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPollingIoAcceptor.java:406) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) ... 3 more {code} We had to manually go in and edit the org.jenkinsci.main.modules.sshd.SSHD.xml file to change the port number in order to make the server boot.
    via by Andrew Herron,
  • Using the new SSH server feature: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+SSH We accidentally set it to a port below 1024 when the server doesn't run as root. The server becomes unusable, printing this message to the browser when attempting to access it: {code} org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) at jenkins.model.Jenkins.executeReactor(Jenkins.java:811) at jenkins.model.Jenkins.<init>(Jenkins.java:732) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.model.Hudson.<init>(Hudson.java:77) at hudson.WebAppMain$2.run(WebAppMain.java:217) Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124) at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$5.runTask(Jenkins.java:800) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.lang.reflect.InvocationTargetException 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 hudson.init.InitializerFinder.invoke(InitializerFinder.java:120) ... 8 more Caused by: java.net.SocketException: Permission denied at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77) at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.java:248) at org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.java:48) at org.apache.mina.core.polling.AbstractPollingIoAcceptor.registerHandles(AbstractPollingIoAcceptor.java:525) at org.apache.mina.core.polling.AbstractPollingIoAcceptor.access$200(AbstractPollingIoAcceptor.java:66) at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPollingIoAcceptor.java:406) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) ... 3 more {code} We had to manually go in and edit the org.jenkinsci.main.modules.sshd.SSHD.xml file to change the port number in order to make the server boot.
    via by Andrew Herron,
  • Run gitblit as a service at ubuntu
    via by Sandra Warmbrunn,
  • Cant start tomcat with spring boot on linux
    via Stack Overflow by Idob
    ,
  • WebSockets on DIY cartridge on OpenShift
    via Stack Overflow by Serban
    ,
    • java.net.SocketException: Permission denied at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77) at org.simpleframework.transport.connect.Acceptor.bind(Acceptor.java:171) at org.simpleframework.transport.connect.Acceptor.<init>(Acceptor.java:88) at org.simpleframework.transport.connect.Listener.<init>(Listener.java:78) at org.simpleframework.transport.connect.ListenerManager.listen(ListenerManager.java:90) at org.simpleframework.transport.connect.ListenerManager.listen(ListenerManager.java:73) at org.simpleframework.transport.connect.SocketConnection.connect(SocketConnection.java:106) at org.restlet.ext.simple.HttpServerHelper.start(HttpServerHelper.java:93) at org.restlet.Server.start(Server.java:585) at org.restlet.Component.startServers(Component.java:601) at org.restlet.Component.start(Component.java:528) at com.shunra.gl.Main.main(Unknown Source)

    Users with the same issue

    DunmerDunmer
    2 times, last one,
    HandemelindoHandemelindo
    10 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    3 more bugmates