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.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321)

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
7 more bugmates

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