Error while running Jetty Server on port 80 as non root user

Posted by user75016 on Ask Ubuntu See other posts from Ask Ubuntu or by user75016
Published on 2012-07-04T16:24:21Z Indexed on 2012/07/05 15:23 UTC
Read the original article Hit count: 397

Filed under:
|
|
|
|

All,

I was trying to setup jetty on port 80 but its giving exception saying permission denied as below. I have setup jetty to work with setuid and configured start.ini as follows:

OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations,jta,jdbc,setuid

(below as first configuration file in start.ini)

etc/jetty-setuid.xml

and jetty-setuid.xml file with username and group name of non root user.

2012-07-03 15:29:02.411:INFO:oejdp.ScanningAppProvider:Deployment monitor /opt/jetty-hightide-8.1.3.v20120416/contexts at interval 1
2012-07-03 15:29:02.454:WARN:oejuc.AbstractLifeCycle:FAILED [email protected]:80: java.net.SocketException: Permission denied
java.net.SocketException: Permission denied
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:182)
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at org.eclipse.jetty.server.Server.doStart(Server.java:273)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1215)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1138)
2012-07-03 15:29:02.455:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@66da9ea4: java.net.SocketException: Permission denied
java.net.SocketException: Permission denied

© Ask Ubuntu or respective owner

Related posts about server

Related posts about java