|
From: rgarret <RG...@co...> - 2007-09-19 00:58:46
|
Hello, I am running jetty 6.1.5 on ubuntu linux and need to have it on port 80. Obviously I do not want it running as root and would rather not mess with port forwarding. Thus, I am trying to use jetty's setuid feature but am having a problem. I have done all the setup and everything works great until the actual setuid call is made. According to my logs when setuid is called all context I have configured in jetty.xml (defined in $JETTY_HOME/contexts) are undeployed and I am left with an empty web server. I have verified that setuid does work but I can not figure out why it is undeploying my contexts. Below I provide the command I use to run jetty, jetty.xml, jetty-setuid.xml, and the log that shows my webapp (called personnel) being undeployed. If anyone knows what's going on please help! Thanks! Reece *******************************How I run start jetty************************* sudo java -Djava.library.path=lib/ext -jar start.jar etc/jetty-setuid.xml etc/jetty.xml *******************************jetty.xml****************************** <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <!-- =============================================================== --> <!-- Configure the Jetty Server --> <!-- --> <!-- Documentation of this file format can be found at: --> <!-- http://docs.codehaus.org/display/JETTY/jetty.xml --> <!-- --> <!-- =============================================================== --> <Configure id="Server" class="org.mortbay.jetty.Server"> <!-- Server Thread Pool --> <!-- =========================================================== --> <Set name="ThreadPool"> <New class="org.mortbay.thread.concurrent.ThreadPool"> <Arg type="int">0</Arg> <Set name="corePoolSize">10</Set> <Set name="maximumPoolSize">250</Set> </New> </Set> <!-- =========================================================== --> <!-- Set connectors --> <!-- =========================================================== --> <!-- One of each type! --> <!-- =========================================================== --> <Call name="addConnector"> <Arg> <New class="org.mortbay.jetty.nio.SelectChannelConnector"> <Set name="port"><SystemProperty name="jetty.port" default="80"/></Set> <Set name="maxIdleTime">30000</Set> <Set name="Acceptors">2</Set> <Set name="statsOn">false</Set> <Set name="confidentialPort">8443</Set> </New> </Arg> </Call> <!-- =========================================================== --> <!-- Set up global session ID manager --> <!-- =========================================================== --> <!-- <Set name="sessionIdManager"> <New class="org.mortbay.jetty.servlet.HashSessionIdManager"> <Set name="workerName">node1</Set> </New> </Set> --> <!-- =========================================================== --> <!-- Set handler Collection Structure --> <!-- =========================================================== --> <Set name="handler"> <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection"> <Set name="handlers"> <Array type="org.mortbay.jetty.Handler"> <Item> <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/> </Item> <Item> <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/> </Item> <Item> <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/> </Item> </Array> </Set> </New> </Set> <!-- =========================================================== --> <!-- Configure the context deployer --> <!-- A context deployer will deploy contexts described in --> <!-- configuration files discovered in a directory. --> <!-- The configuration directory can be scanned for hot --> <!-- deployments at the configured scanInterval. --> <!-- --> <!-- This deployer is configured to deploy contexts configured --> <!-- in the $JETTY_HOME/contexts directory --> <!-- --> <!-- =========================================================== --> <Call name="addLifeCycle"> <Arg> <New class="org.mortbay.jetty.deployer.ContextDeployer"> <Set name="contexts"><Ref id="Contexts"/></Set> <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set> <Set name="scanInterval">1</Set> </New> </Arg> </Call> <!-- ======================================================== --> <!-- java.security.auth.login.config System property --> <!-- This is usually a runtime parameter to the jvm, but --> <!-- it is placed here for convenience. --> <!-- ======================================================== --> <Call class="java.lang.System" name="setProperty"> <Arg>java.security.auth.login.config</Arg> <Arg><SystemProperty name="jetty.home" default="." />/etc/login.conf</Arg> </Call> <!-- =========================================================== --> <!-- Configure Request Log --> <!-- Request logs may be configured for the entire server here, --> <!-- or they can be configured for a specific web app in a --> <!-- contexts configuration (see $(jetty.home)/contexts/test.xml --> <!-- for an example). --> <!-- =========================================================== --> <Ref id="RequestLog"> <Set name="requestLog"> <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog"> <Arg><SystemProperty name="jetty.logs" default="/var/log/jetty"/>/yyyy_mm_dd.request.log</Arg> <Set name="retainDays">90</Set> <Set name="append">true</Set> <Set name="extended">false</Set> <Set name="LogTimeZone">GMT</Set> </New> </Set> </Ref> <!-- =========================================================== --> <!-- extra options --> <!-- =========================================================== --> <Set name="stopAtShutdown">true</Set> <!-- ensure/prevent Server: header being sent to browsers --> <Set name="sendServerVersion">false</Set> </Configure> ***********************************jetty-setuid.xml******************************* <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <!-- =============================================================== --> <!-- Configure the Jetty SetUIDServer --> <!-- this configuration file should be used in combination with --> <!-- other configuration files. e.g. --> <!-- java -jar start.jar etc/jetty-setuid.xml etc/jetty.xml --> <!-- =============================================================== --> <Configure id="Server" class="org.mortbay.setuid.SetUIDServer"> <Set name="startServerAsPrivileged">true</Set> <Set name="uid">1000</Set> </Configure> *****************************log file****************************************** 09/18/2007 17:51:41 [main] INFO org.mortbay.log - Opened /var/log/jetty/2007_09_19.request.log 09/18/2007 17:51:41 [main] INFO org.mortbay.log - Started SelectChannelConnector@0.0.0.0:80 09/18/2007 17:51:41 [main] INFO org.mortbay.log - Setting UID=1000 09/18/2007 17:51:42 [Timer-0] INFO org.mortbay.log - Undeploy /pierce-application/Mortbay/jetty/contexts/personnel.xml -> org.mortbay.jetty.webapp.WebAppContext@16e1fb1{/,/jetty/webapps/personnel} 09/18/2007 17:51:42 [Timer-0] DEBUG org.apache.jasper.servlet.JspServlet - JspServlet.destroy() 09/18/2007 17:51:42 [Timer-0] INFO / - Closing Spring root WebApplicationContext 09/18/2007 17:51:42 [Timer-0] INFO org.springframework.web.context.support.XmlWebApplicationContext - Closing application context [Root WebApplicationContext] 09/18/2007 17:51:42 [Timer-0] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [jaxbContext,entityResolver,beanReader,beanWriter,employeeService]; root of BeanFactory hierarchy} 09/18/2007 17:51:42 [Timer-0] WARN org.mortbay.log - Can't reuse /tmp/Jetty_0_0_0_0_80_personnel____-eu3chj, using /tmp/Jetty_0_0_0_0_80_personnel____-eu3chj_41929 -- View this message in context: http://www.nabble.com/Setuid-problems-tf4478069.html#a12768995 Sent from the Jetty Support mailing list archive at Nabble.com. |