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

via apache.org by Unknown author, 1 year ago
via apache.org by Unknown author, 1 year ago
via Google Groups by Joy Xiong, 1 year ago
via Stack Overflow by Frank
, 2 years ago
via Stack Overflow by rakeeee
, 1 year ago
java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:522)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1196)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeBindNow(ChannelHandlerInvokerUtil.java:108)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeBind(DefaultChannelHandlerInvoker.java:214)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:208)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1003)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:216)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:357)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:322)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:356)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:703)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Once, 1 month ago
2 times, 4 months ago
2 times, 9 months ago
10 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 4 months ago

Write tip

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