Re: [jetty-user] Jetty 8.1.4 multiple instances on different porta
Jan Bartel <[email protected]> Mon, 28 May 2012 09:11:26 +0200
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CALg=VpjGZQ3_j6M2FoQFnrn+WArWbfGYv07h7dvAqu2DKNOufA@mail.gmail.com> |
See http://wiki.eclipse.org/Jetty/Feature/Start.jar The start.ini in your jetty distro is being read, and unless you've changed the defaults, it also specifies that the etc/jetty.xml file in your distro is being read, and thus will try to open another set of connectors on the same port on both invocations of jetty. You can create 2 different start.ini files for the different invocations or you could comment out the etc/jetty.xml in the existing start.ini. Jan On 27 May 2012 23:38, bacterie <[email protected]> wrote: > Hi, > > I'm trying to run 2 Jetty 8.1.4 instances on 2 different ports using 2 > config files jetty.xml and jetty1.xml > I have changed the Configure id value and the ports but I get "Address > already in use" errors. > > The config files are jetty.xml > > <?xml version="1.0"?> > <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" > "http://www.eclipse.org/jetty/configure.dtd"> > <Configure id="Server" class="org.eclipse.jetty.server.Server"> > > > > <Set name="ThreadPool"> > > <New class="org.eclipse.jetty.util.thread.QueuedThreadPool"> > <Set name="minThreads">10</Set> > <Set name="maxThreads">200</Set> > <Set name="detailedDump">false</Set> > </New> > </Set> > > > > <Call name="addConnector"> > <Arg> > <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> > <Set name="host"><Property name="jetty.host" /></Set> > <Set name="port"><Property name="jetty.port" > default="8085"/></Set> > <Set name="maxIdleTime">300000</Set> > <Set name="Acceptors">2</Set> > <Set name="statsOn">false</Set> > <Set name="confidentialPort">8443</Set> > <Set name="lowResourcesConnections">20000</Set> > <Set name="lowResourcesMaxIdleTime">5000</Set> > </New> > </Arg> > </Call> > > > > <Set name="handler"> > <New id="Handlers" > class="org.eclipse.jetty.server.handler.HandlerCollection"> > <Set name="handlers"> > <Array type="org.eclipse.jetty.server.Handler"> > <Item> > <New id="Contexts" > class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/> > </Item> > <Item> > <New id="DefaultHandler" > class="org.eclipse.jetty.server.handler.DefaultHandler"/> > </Item> > </Array> > </Set> > </New> > </Set> > > > > <Set name="stopAtShutdown">true</Set> > <Set name="sendServerVersion">true</Set> > <Set name="sendDateHeader">true</Set> > <Set name="gracefulShutdown">1000</Set> > <Set name="dumpAfterStart">false</Set> > <Set name="dumpBeforeStop">false</Set> > </Configure> > > and jetty1.xml > > <?xml version="1.0"?> > <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" > "http://www.eclipse.org/jetty/configure.dtd"> > > <Configure id="Server1" class="org.eclipse.jetty.server.Server"> > > > > <Set name="ThreadPool"> > > <New class="org.eclipse.jetty.util.thread.QueuedThreadPool"> > <Set name="minThreads">10</Set> > <Set name="maxThreads">200</Set> > <Set name="detailedDump">false</Set> > </New> > </Set> > > > > <Call name="addConnector"> > <Arg> > <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> > <Set name="host"><Property name="jetty.host" /></Set> > <Set name="port"><Property name="jetty.port" > default="8086"/></Set> > <Set name="maxIdleTime">300000</Set> > <Set name="Acceptors">2</Set> > <Set name="statsOn">false</Set> > <Set name="confidentialPort">8444</Set> > <Set name="lowResourcesConnections">20000</Set> > <Set name="lowResourcesMaxIdleTime">5000</Set> > </New> > </Arg> > </Call> > > > > <Set name="handler"> > <New id="Handlers" > class="org.eclipse.jetty.server.handler.HandlerCollection"> > <Set name="handlers"> > <Array type="org.eclipse.jetty.server.Handler"> > <Item> > <New id="Contexts" > class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/> > </Item> > <Item> > <New id="DefaultHandler" > class="org.eclipse.jetty.server.handler.DefaultHandler"/> > </Item> > </Array> > </Set> > </New> > </Set> > > > > <Set name="stopAtShutdown">true</Set> > <Set name="sendServerVersion">true</Set> > <Set name="sendDateHeader">true</Set> > <Set name="gracefulShutdown">1000</Set> > <Set name="dumpAfterStart">false</Set> > <Set name="dumpBeforeStop">false</Set> > </Configure> > > I'm trying to start the instances by issuing: > > java -jar /usr/share/jetty/start.jar /usr/share/jetty/etc/jetty.xml &> > /usr/share/jetty/logs/1instances.log & > > java -jar /usr/share/jetty/start.jar /usr/share/jetty/etc/jetty1.xml &> > /usr/share/jetty/logs/2instances.log & > > Please help me solve this issue. > Thanks > > -- > View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-1-4-multiple-instances-on-different-porta-tp4958535.html > Sent from the Jetty Support mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email