Bug#886090: solr-jetty: Doesn't work out-of-the-box anymore; required symlink is missing

J.P. Larocque jpl-debian-bts at thoughtcrime.us
Tue Jan 2 03:32:04 UTC 2018


Package: solr-jetty
Version: 3.6.2+dfsg-10
Severity: normal

Hi,

I'm using Solr to provide full-text indexing services for Dovecot,
which uses it to index e-mail bodies.  I've only barely scratched the
surface of Java, and know nothing about Java web application
development or deployment.

I installed Solr on my mail server when it was running Jessie or an
earlier release of Debian.  I seem to recall that the setup process at
that point in time was pretty straightforward.  Recreating the
scenario on a fresh Jessie system now, I see that all I needed to do
to get Jetty responding with Solr-generated responses was to install
solr-jetty, edit /etc/default/jetty8 to set NO_START=0, and restart
jetty8.

When I upgraded my mail server to Debian Stretch, Solr stopped
working.  Jetty responded with status 404 instead:

$ curl --verbose http://localhost:8080/solr/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /solr/ HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Content-Type: text/html; charset=ISO-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 289
< Server: Jetty(9.2.21.v20170120)
< 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact

Because of my lack of experience with the Java and Jetty ecosystem, it
was a confusing and frustrating process to get Solr working again.  It
seemed like the symlink /etc/jetty9/contexts/solr.xml ->
../../solr/solr-jetty.xml was supposed to be doing something, but it
apparently wasn't.  (On my Jessie test system, a similar symlink in
/etc/jetty8/contexts/ seems to be the piece that configures Jetty for
Solr.)

It seems like some configuration methods changed between Jetty 8
(Jessie) and Jetty 9 (Stretch).  Eventually, I found a helpful message
on jetty-users [1], and a pointer to the right part of the Jetty
documentation [2].  I created this symlink:

    $ sudo ln -s /etc/solr/solr-jetty.xml /var/lib/jetty9/webapps/solr.xml

After restarting Jetty, Jetty responded to /solr URLs again, and Solr
worked with my existing configuration and application as it did
previously.

If this symlink is always the right thing to do for an upgrade or a
new installation, would you please consider including it in the
package or having it created upon installation?  If it's not the right
thing to do in all cases, could you please add some instructions or
hints to README.Debian?

1. https://dev.eclipse.org/mhonarc/lists/jetty-users/msg05035.html
2. https://www.eclipse.org/jetty/documentation/current/deployment-architecture.html#default-web-app-provider

Thanks,

-J.P. Larocque

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages solr-jetty depends on:
ii  default-jdk [java5-sdk]    2:1.8-58
ii  jetty9                     9.2.21-1
ii  libjetty9-extra-java       9.2.21-1
ii  openjdk-8-jdk [java5-sdk]  8u151-b12-1~deb9u1
ii  solr-common                3.6.2+dfsg-10

solr-jetty recommends no packages.

solr-jetty suggests no packages.

-- no debconf information

-- 
J.P. Larocque <jpl-debian-bts at thoughtcrime.us>



More information about the pkg-java-maintainers mailing list