Bug#554853: jetty: Jetty is unable to run on port 80
Andreas Åkesson
andreas.akesson at avalanchestudios.se
Thu Apr 14 07:06:44 UTC 2011
Hi,
thank you for your answer. unfortunately it didn't change.
jetty-setuid.xml:
<Configure id="Server" class="org.mortbay.setuid.SetUIDServer">
<Set name="startServerAsPrivileged">true</Set>
<Set name="umask">2</Set>
<Set name="uid">104</Set>
<Set name="gid">107</Set>
<!-- uncomment to change the limits on number of open file descriptors for root -->
<!--
<Call name="setRLimitNoFiles">
<Arg>
<New class="org.mortbay.setuid.RLimit">
<Set name="soft">20000</Set>
<Set name="hard">40000</Set>
</New>
</Arg>
</Call>
-->
</Configure>
stderrout.log:
667 [main] INFO org.mortbay.log - Setting umask=02
704 [main] INFO org.mortbay.log - jetty-6.1.24
771 [main] INFO org.mortbay.log - Deploy /etc/jetty/contexts/javadoc.xml -> org.mortbay.jetty.handler.ContextHandler at 72e6f7d2{/javadoc,file:/usr/share/jetty/javadoc}
1084 [main] INFO org.mortbay.log - Opened /var/log/jetty/2011_04_14.request.log
1121 [main] WARN org.mortbay.log - failed SelectChannelConnector at 0.0.0.0:80: java.net.SocketException: Permission denied
1121 [main] WARN org.mortbay.log - failed SetUIDServer at 77d2b01b: java.net.SocketException: Permission denied
1121 [main] WARN org.mortbay.log - EXCEPTION
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.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:131)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
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:534)
at org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
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.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
-----Original Message-----
From: Ludovic Claude [mailto:ludovic.claude at laposte.net]
Sent: den 13 april 2011 23:28
To: Andreas Åkesson; 554853 at bugs.debian.org
Subject: Re: Bug#554853: jetty: Jetty is unable to run on port 80
Hello,
You should install the package libjetty-extra, it contains libsetuid.so
which will help you to give Jetty the priviledge to use a port under
1024. You will need to configure jetty-setuid.xml, in particular set the
startServerAsPrivileged property to true.
Ludovic
On 12/04/2011 10:54, Andreas Åkesson wrote:
> I'm having the same problems on jetty 6.1.24-6. Is there any system
> configs i can/should alter to make this work?
>
>
>
> /etc/default/jetty
>
> NO_START=0
>
> VERBOSE=yes
>
> #JETTY_USER=jetty
>
> JETTY_USER=root
>
> JETTY_HOST=0.0.0.0
>
> JETTY_PORT=80
>
>
>
> jetty-setuid.xml:
>
> <Configure id="Server" class="org.mortbay.setuid.SetUIDServer">
>
> <Set name="startServerAsPrivileged">false</Set>
>
> <Set name="umask">2</Set>
>
> <Set name="uid">104</Set>
>
> <Set name="gid">107</Set>
>
>
>
> jetty:conf:
>
> # list of jetty configuration and property files
>
> /etc/jetty/jetty-setuid.xml
>
> /etc/jetty/jetty-logging.xml
>
> /etc/jetty/jetty.xml
>
> /etc/jetty/jetty-ssl.xml
>
> /etc/jetty/jetty-shared-webapps.xml
>
>
>
> log:
>
> 245 [main] INFO org.mortbay.log - Setting umask=02
>
> 246 [main] INFO org.mortbay.log - jetty-6.1.24
>
> 281 [main] INFO org.mortbay.log - Deploy /etc/jetty/contexts/javadoc.xml
> -> org.mortbay.jetty.handler.ContextHand$
>
> 393 [main] INFO org.mortbay.log - Opened
> /var/log/jetty/2011_04_12.request.log
>
> 407 [main] WARN org.mortbay.log - failed
> SelectChannelConnector at 0.0.0.0:80: java.net.SocketException: Permission $
>
> 427 [main] WARN org.mortbay.log - failed SslSocketConnector at 0.0.0.0:443:
> java.net.BindException: Permission denied
>
> 427 [main] WARN org.mortbay.log - failed SetUIDServer at 3a56860b:
> org.mortbay.util.MultiException[java.net.SocketEx$
>
> 427 [main] WARN org.mortbay.log - EXCEPTION
>
> org.mortbay.util.MultiException[java.net.SocketException: Permission
> denied, java.net.BindException: Permission d$
>
> at org.mortbay.jetty.Server.doStart(Server.java:188)
>
> ...
>
>
>
> Best regards,
>
> Andreas
>
>
>
> __
> This is the maintainer address of Debian's Java team
> <http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers>. Please use
> debian-java at lists.debian.org for discussions and questions.
More information about the pkg-java-maintainers
mailing list