Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

permission denied exception when changed port of a connector

 
misha nesterenko
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have tried to change default port from 8080 to 81 and on startup got the following exception

SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-81"]
java.net.BindException: Permission denied <null>:81
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:364)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:511)
at org.apache.coyote.AbstractProtocolHandler.init(AbstractProtocolHandler.java:345)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:910)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:778)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at org.apache.catalina.startup.Catalina.load(Catalina.java:572)
at org.apache.catalina.startup.Catalina.load(Catalina.java:595)
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 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:263)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.net.BindException: Permission denied
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:336)
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 org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:48)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:351)
... 17 more

how to avoid this exception?
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On what operating system are you trying to do this?
 
misha nesterenko
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing this on amazon linux

Amazon Linux AMI release 2010.11.1 (beta)
 
Tom Reilly
Rancher
Posts: 618
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic