java.net.SocketException: Permission denied

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via Stack Overflow by Daniil Shevelev

The solution is to run as root using sudo or to set different port in application.properties file, e.g.

server.port=${port:8181}

Solutions on the web

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.(Acceptor.java:88)
at org.simpleframework.transport.connect.Listener.(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.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

2 times, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 2 months ago
2 times, 7 months ago
10 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
5 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.