Hey Guys, FYI I changed the subject line to more accurately reflect what we're talking about.
So, I fixed this in SIS-58: https://issues.apache.org/jira/browse/SIS-58. Builds should be fine now! Cheers, Chris On Sep 7, 2012, at 9:13 AM, Peter K wrote: > Hi there, > >>> I think this was introduced by Adam in SIS-30 [1] when we put in >>> Jetty integration in sis-webapp. I think Jetty is just picking the >>> default >>> port to run unit tests on (8080), and that port is in use from time >>> to time. >>> We should probably file a JIRA issue for this as a bug and simply update >>> the config to choose a random, unused port. >> >> If Jetty can easily locate an unused port, that would help. > > I've used this in the past for another project. Hopefully it can help > somehow. > > private void bootJetty(int retryCount) { > String webapp = "./target/app"; > WebAppContext app = // TODO set up this. I'm using guice which > is probably different to SIS usage. > app.setParentLoaderPriority(true); > > for (int i = 0; i < retryCount; i++) { > // We explicitly use the SocketConnector because the > SelectChannelConnector locks files > Connector connector = new SocketConnector(); > connector.setPort(port = 18080 + i); > connector.setMaxIdleTime(10000); > server = new Server(); > server.setConnectors(new Connector[]{connector}); > server.setHandler(app); > try { > logger.info("Trying to start jetty at port " + port); > server.start(); > break; > } catch (Exception ex) { > server = null; > logger.error("Cannot start jetty at port " + port + " " > + ex.getMessage()); > } > } > } > > Regards, > Peter. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: [email protected] WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
