Quantcast

Running Solr 6.3+ on Tomcat : Help Please

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Running Solr 6.3+ on Tomcat : Help Please

ps40
Hi Guys,

I understand that this configuration is unsupported. However, this was
working until 6.2. I have looked at the changes document for both solr and
lucene for 6.3.0 but I can't figure out what has changed. Can someone point
me in the right direction?

Here are the details.

The following instructions work with Solr 6.2 + Tomcat 8.5:
1. Copy solr-6.2.0/server/solr-webapp/webapp directory to tomcat/webapps
and rename it to 'solr'.
2. Copy solr-6.2.0/server/lib/ext/*.jar and
solr-6.2.0/dist/solr-dataimporthandler-*.jar to solr/WEB-INF/lib
3. Uncomment env-entry for solr/homein web.xml and set the value to
solr-6.2.0/server/solr
4. Copy solr-6.2.0/server/WEB-INF/resources/log4j.properties to
solr/WEB-INF/classes

*On 6.2 the following logs are generated:*
17-Feb-2017 01:11:53.421 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory
/home/ubuntu/jdk18_tomcat8_workspace/apache-tomcat-8.5.9/webapps/solr
0    INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter
SolrDispatchFilter.init(): ParallelWebappClassLoader
  context: solr
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@5b2133b1

9    INFO  (localhost-startStop-1) [   ] o.a.s.c.SolrResourceLoader Using
JNDI solr.home: /home/ubuntu/solr_home
10   INFO  (localhost-startStop-1) [   ] o.a.s.c.SolrResourceLoader new
SolrResourceLoader for directory: '/home/ubuntu/solr_home'
10   INFO  (localhost-startStop-1) [   ] o.a.s.c.SolrResourceLoader Using
JNDI solr.home: /home/ubuntu/solr_home
13   INFO  (localhost-startStop-1) [   ] o.a.s.c.SolrXmlConfig Loading
container configuration from /home/ubuntu/solr_home/solr.xml
51   INFO  (localhost-startStop-1) [   ] o.a.s.c.CorePropertiesLocator
Config-defined core root directory: /home/ubuntu/solr_home
73   INFO  (localhost-startStop-1) [   ] o.a.s.c.CoreContainer New
CoreContainer 2094227485
73   INFO  (localhost-startStop-1) [   ] o.a.s.c.CoreContainer Loading
cores into CoreContainer [instanceDir=/home/ubuntu/solr_home]
74   WARN  (localhost-startStop-1) [   ] o.a.s.c.CoreContainer Couldn't add
files from /home/ubuntu/solr_home/lib to classpath:
/home/ubuntu/solr_home/lib
82   INFO  (localhost-startStop-1) [   ] o.a.s.h.c.HttpShardHandlerFactory
created with socketTimeout : 600000,connTimeout :
60000,maxConnectionsPerHost : 20,maxConnections : 10000,corePoolSize :
0,maximumPoolSize : 2147483647,maxThreadIdleTime : 5,sizeOfQueue :
-1,fairnessPolicy : false,useRetries : false,connectionsEvictorSleepDelay :
5000,maxConnectionIdleTime : 40000,
145  INFO  (localhost-startStop-1) [   ] o.a.s.u.UpdateShardHandler
Creating UpdateShardHandler HTTP client with params:
socketTimeout=600000&connTimeout=60000&retry=true
147  INFO  (localhost-startStop-1) [   ] o.a.s.l.LogWatcher SLF4J impl is
org.slf4j.impl.Log4jLoggerFactory
148  INFO  (localhost-startStop-1) [   ] o.a.s.l.LogWatcher Registering Log
Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)]
150  INFO  (localhost-startStop-1) [   ] o.a.s.c.CoreContainer Security
conf doesn't exist. Skipping setup for authorization module.
150  INFO  (localhost-startStop-1) [   ] o.a.s.c.CoreContainer No
authentication plugin used.
345  INFO  (localhost-startStop-1) [   ] o.a.s.c.CorePropertiesLocator
Looking for core definitions underneath /home/ubuntu/solr_home
353  INFO  (localhost-startStop-1) [   ] o.a.s.c.CorePropertiesLocator
Found 0 core definitions
357  INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter
user.dir=/home/ubuntu/jdk18_tomcat8_workspace/apache-tomcat-8.5.9
357  INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter
SolrDispatchFilter.init() done
17-Feb-2017 01:11:55.615 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory
/home/ubuntu/jdk18_tomcat8_workspace/apache-tomcat-8.5.9/webapps/solr has
finished in 2,194 ms

*http://localhost:8080/solr/index.html
<http://localhost:8080/solr/index.html> works.*

*On Solr 6.3 onwards, the following logs are displayed:*

17-Feb-2017 03:41:39.958 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web
application directory /home/ubuntu/apache-tomcat-8.5.11/webapps/solr
17-Feb-2017 03:41:45.188 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 fo
r 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.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/ubuntu/apache-tomcat-8.5.11/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/ubuntu/apache-tomcat-8.5.11/webapps/solr/WEB-INF/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2017-02-17 03:41:45.880 INFO  (localhost-startStop-1) [   ]
o.a.s.s.SolrDispatchFilter  ___      _       Welcome to Apache Solr™
version 6.4.1
2017-02-17 03:41:45.898 INFO  (localhost-startStop-1) [   ]
o.a.s.s.SolrDispatchFilter / __| ___| |_ _   Starting in standalone mode on
port null
2017-02-17 03:41:45.898 INFO  (localhost-startStop-1) [   ]
o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_|  Install dir: null
2017-02-17 03:41:46.337 INFO  (localhost-startStop-1) [   ]
o.a.s.s.SolrDispatchFilter |___/\___/_|_|    Start time:
2017-02-17T03:41:45.900Z
2017-02-17 03:41:46.418 INFO  (localhost-startStop-1) [   ]
o.a.s.c.SolrResourceLoader Using JNDI solr.home: /home/ubuntu/solr_home/
2017-02-17 03:41:46.452 INFO  (localhost-startStop-1) [   ]
o.a.s.c.SolrXmlConfig Loading container configuration from
/home/ubuntu/solr_home/solr.xml
2017-02-17 03:41:47.695 INFO  (localhost-startStop-1) [   ]
o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with
params: socketTimeout=600000&connTimeout=60000&retry=true
2017-02-17 03:41:47.955 INFO  (localhost-startStop-1) [   ]
o.a.s.c.CorePropertiesLocator Found 0 core definitions underneath
/home/ubuntu/solr_home
17-Feb-2017 03:41:48.149 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory /home/ubuntu/apache-tomcat-8.5.11/webapps/solr has
finished in 8,190 ms

*http://localhost:8080/solr/index.html
<http://localhost:8080/solr/index.html> returns a 403.*


Thanks
Prashant


P.S.: I understand that you guys want to move away from solr being a webapp
and if and when that happens I'm fine with it. But if you are going to keep
jetty around, then I will vote against deprecating support for Tomcat.
Jetty is a horrible appserver :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running Solr 6.3+ on Tomcat : Help Please

Shawn Heisey-2
On 2/16/2017 11:31 PM, Prashant Saraswat wrote:
> *On Solr 6.3 onwards, the following logs are displayed:*

<snip>

> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/home/ubuntu/apache-tomcat-8.5.11/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/home/ubuntu/apache-tomcat-8.5.11/webapps/solr/WEB-INF/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.

The information about what is wrong here is right in the log.  I have
quoted the relevant portion above.  This is slf4j complaining about
finding its binary code twice.  There are no differences between 6.3 and
6.2 in how logging jars are included.

You'll need to delete one set of logging jars.  This is not a Solr
issue, or even a Tomcat issue.  It appears that you have copied some of
the jars to two places.  The locations are in your log.

I was not involved in the Solr project when the decision was made to
include Jetty.  It has been included with Solr for many years.  It was
already there when I first downloaded 1.4.0 back in early 2010, and I've
been using it all this time without any issues related to the container.

With 5.0, we chose to enforce the container choice more strictly.  Now
there are far fewer deployment options, so Solr is a lot easier for this
mailing list to support.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running Solr 6.3+ on Tomcat : Help Please

ps40
Hi Shawn,

Thanks for the quick response. Unfortunately, slf4j has nothing to do with this. I removed the duplicate jars and the problem persists. Here are the updated logs.

Prashant

17-Feb-2017 19:05:24.618 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/ubuntu/apache-tomcat-8.5.11/webapps/solr
17-Feb-2017 19:05:29.610 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.
2017-02-17 19:05:30.226 INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter  ___      _       Welcome to Apache Solr™ version 6.4.1
2017-02-17 19:05:30.228 INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _   Starting in standalone mode on port null
2017-02-17 19:05:30.229 INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_|  Install dir: null
2017-02-17 19:05:30.574 INFO  (localhost-startStop-1) [   ] o.a.s.s.SolrDispatchFilter |___/\___/_|_|    Start time: 2017-02-17T19:05:30.231Z
2017-02-17 19:05:30.649 INFO  (localhost-startStop-1) [   ] o.a.s.c.SolrResourceLoader Using JNDI solr.home: /home/ubuntu/solr_home/
2017-02-17 19:05:30.656 INFO  (localhost-startStop-1) [   ] o.a.s.c.SolrXmlConfig Loading container configuration from /home/ubuntu/solr_home/solr.xml
2017-02-17 19:05:32.271 INFO  (localhost-startStop-1) [   ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true
2017-02-17 19:05:32.619 INFO  (localhost-startStop-1) [   ] o.a.s.c.CorePropertiesLocator Found 0 core definitions underneath /home/ubuntu/solr_home
17-Feb-2017 19:05:32.780 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/ubuntu/apache-tomcat-8.5.11/webapps/solr has finished in 8,162 ms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running Solr 6.3+ on Tomcat : Help Please

Shawn Heisey-2
On 2/17/2017 12:46 PM, ps40 wrote:
> Thanks for the quick response. Unfortunately, slf4j has nothing to do with
> this. I removed the duplicate jars and the problem persists. Here are the
> updated logs.

None of the log messages you've shared indicate any errors, and you
haven't described the problem you're having.  The extent of the problem
description is that it used to work with Solr 6.2.  Can you be more
specific about what you are seeing?

https://wiki.apache.org/solr/UsingMailingLists

You may need to stop Tomcat, delete or rename your logfiles, then start
it back up, duplicate the issue, and place copies of the brand new
Tomcat and Solr logs (in their entirety, possibly with sensitive info
redacted) someplace that we can access them.  If you try attaching the
logs to your message, the mailing list is likely to delete them.  I
haven't been able to figure out what makes some attachments get through
while others don't.  It's best to use a paste website or a file sharing
site, and provide one or more URLs.

If we can find a problem with *Solr* running on Tomcat, I will attempt
to help you solve it.  I can't guarantee that I will be successful,
because I don't know all that much about Tomcat.  If the problem is with
your specific Tomcat configuration, you may need to talk to that project
for help.  If they find specific problems in their logs that show a
problem with Solr, you can bring those to us.

If you want a more interactive discussion, you can try the #solr IRC
channel on freenode.  If there's somebody actually online at the time
you join, you should be able to get a response.  Here's some info about
the IRC channels:

https://wiki.apache.org/solr/IRCChannels

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running Solr 6.3+ on Tomcat : Help Please

ps40
Hi Shawn,

The problem was described in my original post:
On 6.2.0: This works:
http://localhost:8080/solr/index.html
On 6.3+
http://localhost:8080/solr/index.html returns an HTTP error code 403

The tomcat versions are the same so I don't think its a tomcat problem.

Although there are no errors in the logs, the browser based UI doesn't come
up. This is essential before I can create a collection etc. to verify that
things are working correctly.

I will try the IIRCChannels. Thanks for the pointer :)

Thanks
Prashant

On Wed, Feb 22, 2017 at 10:52 AM, Shawn Heisey <[hidden email]> wrote:

> On 2/17/2017 12:46 PM, ps40 wrote:
> > Thanks for the quick response. Unfortunately, slf4j has nothing to do
> with
> > this. I removed the duplicate jars and the problem persists. Here are the
> > updated logs.
>
> None of the log messages you've shared indicate any errors, and you
> haven't described the problem you're having.  The extent of the problem
> description is that it used to work with Solr 6.2.  Can you be more
> specific about what you are seeing?
>
> https://wiki.apache.org/solr/UsingMailingLists
>
> You may need to stop Tomcat, delete or rename your logfiles, then start
> it back up, duplicate the issue, and place copies of the brand new
> Tomcat and Solr logs (in their entirety, possibly with sensitive info
> redacted) someplace that we can access them.  If you try attaching the
> logs to your message, the mailing list is likely to delete them.  I
> haven't been able to figure out what makes some attachments get through
> while others don't.  It's best to use a paste website or a file sharing
> site, and provide one or more URLs.
>
> If we can find a problem with *Solr* running on Tomcat, I will attempt
> to help you solve it.  I can't guarantee that I will be successful,
> because I don't know all that much about Tomcat.  If the problem is with
> your specific Tomcat configuration, you may need to talk to that project
> for help.  If they find specific problems in their logs that show a
> problem with Solr, you can bring those to us.
>
> If you want a more interactive discussion, you can try the #solr IRC
> channel on freenode.  If there's somebody actually online at the time
> you join, you should be able to get a response.  Here's some info about
> the IRC channels:
>
> https://wiki.apache.org/solr/IRCChannels
>
> Thanks,
> Shawn
>
>


--
<http://www.linkedin.com/pub/prashant-saraswat/0/909/b07/>
Loading...