*
The moose likes Tomcat and the fly likes permission denied exception when changed port of a connector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "permission denied exception when changed port of a connector" Watch "permission denied exception when changed port of a connector" New topic
Author

permission denied exception when changed port of a connector

misha nesterenko
Greenhorn

Joined: Feb 05, 2011
Posts: 28
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

Joined: Jun 01, 2010
Posts: 618
On what operating system are you trying to do this?
misha nesterenko
Greenhorn

Joined: Feb 05, 2011
Posts: 28
I am doing this on amazon linux

Amazon Linux AMI release 2010.11.1 (beta)
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Hope this link helps: http://www.coderanch.com/t/109718/Linux-UNIX/Linux-Tomcat-java-net-BindException.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: permission denied exception when changed port of a connector