You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tim Dunphy <bl...@gmail.com> on 2015/05/04 21:04:05 UTC

apache 5.1.0 under apache web server

Hey all,

I need to run solr 5.1.0 on port 80 with some basic apache authentication.
Normally, under earlier versions of solr I would set it up to run under
tomcat, then connect it to apache web server using mod_jk.

However 5.1.0 seems totally different. I see that tomcat support has been
removed from the latest versions. So how do I set this up in front of
apache web server? I need to get this running on port 443 with SSL and
something at least equivalent to basic apache auth.

I really wish this hadn't changed because I could set this up under the old
method rather easily and quickly. Sigh..

But thank you for your advice!

Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Re: apache 5.1.0 under apache web server

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/4/2015 1:50 PM, Tim Dunphy wrote:
> However it sounds like you're sure it's supposed to work this way. Can
> I get some advice on this error?

If you tried copying JUST the .war file with any version from 4.3 on,
something similar would happen.  At the request of many of our more
advanced users, starting in version 4.3, the war does not contain jars
required for the logging in Solr to work.  This makes it possible to
change the logging framework without surgery on the .war file or
recompiling Solr.

If those jars are not available, Solr will not start.  The logging jars
must be placed in the container's classpath for logging to work, which
has been done in the server included with Solr, placing them in the
lib/ext directory of the Jetty server.  With the jars you can find in
lib/ext, you also need a config file for log4j ... which you can find in
the example at resources/log4j.properties.

http://wiki.apache.org/solr/SolrLogging

Thanks,
Shawn


Re: apache 5.1.0 under apache web server

Posted by Tim Dunphy <bl...@gmail.com>.
>
> The container in the default 5.x install is a completely unmodified
> Jetty 8.x (soon to be Jetty 9.x) with a stripped and optimized config.
> The config for Jetty is similar to tomcat, you just need to figure out
> how to make it work with Apache like you would with Tomcat.
>
> Incidentially, at least for right now, you CAN still take the .war file
> out of the jetty install and put it in Tomcat just like you would have
> with a 4.3 or later version.  We are planning on making that impossible
> in a later 5.x version, but for right now, it is still possible.



Hmm well of the two options you present the second one sounds a little
easier and more attractive. However, when I tried doing just that like so:

[root@aoadbld00032la ~]# cp -v solr-5.1.0/server/webapps/solr.war
/usr/local/tomcat/webapps/
`solr-5.1.0/server/webapps/solr.war' -> `/usr/local/tomcat/webapps/solr.war'

And then start tomcat up... I can't get to the solr interface :(


HTTP Status 503 - Server is shutting down or failed to initialize

*type* Status report

*message* *Server is shutting down or failed to initialize*

*description* *The requested service is not currently available.*
------------------------------
Apache Tomcat/8.0.21Not seeing anything telling in the logs, unfortunately:

[root@aoadbld00032la ~]# tail /usr/local/tomcat/logs/catalina.out
04-May-2015 15:48:26.945 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory /usr/local/apache-tomcat-8.0.21/webapps/ROOT has
finished in 32 ms
04-May-2015 15:48:26.946 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory /usr/local/apache-tomcat-8.0.21/webapps/host-manager
04-May-2015 15:48:26.979 INFO [localhost-startStop-1]
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger for a
complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP
compilation time.
04-May-2015 15:48:26.983 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory /usr/local/apache-tomcat-8.0.21/webapps/host-manager
has finished in 36 ms
04-May-2015 15:48:26.983 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory /usr/local/apache-tomcat-8.0.21/webapps/examples
04-May-2015 15:48:27.195 INFO [localhost-startStop-1]
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger for a
complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP
compilation time.
04-May-2015 15:48:27.245 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory /usr/local/apache-tomcat-8.0.21/webapps/examples has
finished in 262 ms
04-May-2015 15:48:27.248 INFO [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
["http-nio-8080"]
04-May-2015 15:48:27.257 INFO [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
["ajp-nio-8009"]
04-May-2015 15:48:27.258 INFO [main]
org.apache.catalina.startup.Catalina.start Server startup in 3350 ms

However it sounds like you're sure it's supposed to work this way. Can I
get some advice on this error?

Thanks
Tim

On Mon, May 4, 2015 at 3:12 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 5/4/2015 1:04 PM, Tim Dunphy wrote:
> > I need to run solr 5.1.0 on port 80 with some basic apache
> authentication.
> > Normally, under earlier versions of solr I would set it up to run under
> > tomcat, then connect it to apache web server using mod_jk.
> >
> > However 5.1.0 seems totally different. I see that tomcat support has been
> > removed from the latest versions. So how do I set this up in front of
> > apache web server? I need to get this running on port 443 with SSL and
> > something at least equivalent to basic apache auth.
> >
> > I really wish this hadn't changed because I could set this up under the
> old
> > method rather easily and quickly. Sigh..
> >
> > But thank you for your advice!
>
> The container in the default 5.x install is a completely unmodified
> Jetty 8.x (soon to be Jetty 9.x) with a stripped and optimized config.
> The config for Jetty is similar to tomcat, you just need to figure out
> how to make it work with Apache like you would with Tomcat.
>
> Incidentially, at least for right now, you CAN still take the .war file
> out of the jetty install and put it in Tomcat just like you would have
> with a 4.3 or later version.  We are planning on making that impossible
> in a later 5.x version, but for right now, it is still possible.
>
> Thanks,
> Shawn
>
>


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Re: apache 5.1.0 under apache web server

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/4/2015 1:04 PM, Tim Dunphy wrote:
> I need to run solr 5.1.0 on port 80 with some basic apache authentication.
> Normally, under earlier versions of solr I would set it up to run under
> tomcat, then connect it to apache web server using mod_jk.
>
> However 5.1.0 seems totally different. I see that tomcat support has been
> removed from the latest versions. So how do I set this up in front of
> apache web server? I need to get this running on port 443 with SSL and
> something at least equivalent to basic apache auth.
>
> I really wish this hadn't changed because I could set this up under the old
> method rather easily and quickly. Sigh..
>
> But thank you for your advice!

The container in the default 5.x install is a completely unmodified
Jetty 8.x (soon to be Jetty 9.x) with a stripped and optimized config. 
The config for Jetty is similar to tomcat, you just need to figure out
how to make it work with Apache like you would with Tomcat.

Incidentially, at least for right now, you CAN still take the .war file
out of the jetty install and put it in Tomcat just like you would have
with a 4.3 or later version.  We are planning on making that impossible
in a later 5.x version, but for right now, it is still possible.

Thanks,
Shawn


Re: apache 5.1.0 under apache web server

Posted by Chris Hostetter <ho...@fucit.org>.
: I need to run solr 5.1.0 on port 80 with some basic apache authentication.
: Normally, under earlier versions of solr I would set it up to run under
: tomcat, then connect it to apache web server using mod_jk.

the general gist of what you should look into is running Solr (via 
./bin/solr) on some protected port (via firewalls or what have you) 
and running httpd (if that's what you are comfortable with) on port 
80 using something like mod_proxy to proxy (authenticated) requests to 
your solr port.


-Hoss
http://www.lucidworks.com/