|
From: Matthew S. <msh...@fu...> - 2007-10-17 00:50:58
|
Hi all, Can anyone help me out with a problem using setuid to bind to port 81 (or 80) on Fedora Core 4 as described in http://docs.codehaus.org/ display/JETTY/port80. I'm getting a "java.net.SocketException: Permission denied" despite starting as root, but removing the setuid configuration file seems to fix the problem (though jetty's then running as root). For what it's worth the same setup seems to work as expected on CentOS. I'm including the exception below - Any help in tracking down what I've done wrong would be much appreciated. Matt Sheppard [root@blue jetty]# /opt/funnelback-matt/linbin/jdk1.6.0_03/bin/java - jar start.jar /opt/funnelback-matt/web/conf/jetty-setuid.xml /opt/ funnelback-matt/web/conf/funnelback-jetty-https.xml /opt/funnelback- matt/web/conf/funnelback-jetty-http.xml; 2007-10-17 10:44:04.580::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2007-10-17 10:44:04.849::INFO: Setting UID=514 2007-10-17 10:44:04.851::INFO: jetty-6.1.6rc0 2007-10-17 10:44:04.868::INFO: jetty-6.1.6rc0 2007-10-17 10:44:05.180::INFO: Started SslSocketConnector@0.0.0.0:8443 2007-10-17 10:44:05.180::INFO: jetty-6.1.6rc0 2007-10-17 10:44:05.205::WARN: failed SelectChannelConnector@0.0.0.0:81 java.net.SocketException: Permission denied at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind (ServerSocketChannelImpl.java:119) at sun.nio.ch.ServerSocketAdaptor.bind (ServerSocketAdaptor.java:59) at org.mortbay.jetty.nio.SelectChannelConnector.open (SelectChannelConnector.java:204) at org.mortbay.jetty.nio.SelectChannelConnector.doStart (SelectChannelConnector.java:302) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.Server.doStart(Server.java:233) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.xml.XmlConfiguration.main (XmlConfiguration.java:977) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mortbay.start.Main.invokeMain(Main.java:194) at org.mortbay.start.Main.start(Main.java:509) at org.mortbay.start.Main.main(Main.java:119) 2007-10-17 10:44:05.208::WARN: failed Server@364641 ... |