On 7/23/2015 3:14 PM, Darin Amos wrote: > I have been trying to run the SOLR war with embedded Jetty and can’t seem to > get the config quiet right. Is there any known documentation on this or is > someone else doing this? I seem to just be setting up a document server at my > solr.home directory. The code snippet below seems incomplete to me, but I > can’t seem to find what I am missing. > > Thanks! > > Darin > > Server solrServer = new Server(8983); > > WebAppContext solrApp = new WebAppContext(); > solrApp.setContextPath("/"); > solrApp.setWar("solr.war"); //solr.war is sitting in my java.home root for > now. > solrServer.setHandler(solrApp); > > solrServer.start(); > solrServer.join();
The only officially supported way to run Solr since 5.0 was released is with the scripts included in the "bin" directory in the download. https://wiki.apache.org/solr/WhyNoWar That doesn't mean I won't try to help you, but without logs, there's no way to know what is happening. You may need help from the Jetty project, at least to set up logging, and possibly with the rest of it. Here's some info on logging for a standard install ... I have no idea how you'd go about this for the embedded version: http://www.eclipse.org/jetty/documentation/9.2.7.v20150116/configuring-logging.html For Solr's logging, you need the jars from the server/lib/ext directory in the Solr download (for the included jetty server) in a similar directory for your application, and the log4j.properties file needs to be on the classpath or explicitly described with an appropriate system property. https://wiki.apache.org/solr/SolrLogging In the Solr download, look at the xml file in server/contexts (5.x) for some hints about how to properly configure jetty for the webapp. I would recommend that you use "/solr" for the context path. Every example you'll run into uses that URL path. If you want to be explicitly different than default to make an attacker's job harder, then pick some other string to put after the slash. I don't have much experience with the root context, but I've read somewhere that there can be some pitfalls. I do not know what they are. Thanks, Shawn