ckan local installation, 500 error on solr JSP support not configured

我是研究僧i 提交于 2019-12-04 01:59:20

A fix has been documented by @mstantoncook here [2939] & [1651] How to solr-jetty JSP support

Note the last comment, sudo service jetty restart

It's a Jetty BUG on Ubuntu 14.04!

There is nothing wrong with Ckan itself.

Actually, there is a bug in the libjetty-extra-java package (version 6.1.26 and newer) in Ubuntu 14.04. The bug was introduced after Jetty (in Ubuntu) has changed it's dependences from libtomcat6-java to libtomcat7-java.

You can get more info about this bug in Ubuntu Launchpad: Bug #1508562 "Broken symlinks for JSP support in libjetty-extra-java version 6.1.26-1ubuntu1.1".

The bug is already fixed on Debian, and I'm hope it will be solved in Ubuntu 14.04 soon.

There are workarounds that may work for your case

I proposed some workarounds in this bug report, and since they can be useful for the Ckan users, I'll also replicate them here.

All of them consist on use both jetty and libtomcat7-java, but adding/replacing some classes (code ported from libtomcat6, in put in the jsp-2.1-6.0.2.jar file) to the Jetty classpath.

I don't know if they have some problem. Use them at your own risk!

Workaround 1 - Install the fix package proposed by vshn

I found this workaround here: https://github.com/ckan/ckan/pull/2966

In short:

wget https://launchpad.net/~vshn/+archive/ubuntu/solr/+files/solr-jetty-jsp-fix_1.0.2_all.deb
dpkg -i solr-jetty-jsp-fix_1.0.2_all.deb
service jetty restart

This will install a JSP jar that works (the file will be named jsp-2.1-6.0.2.jar, but it contains classes ported from libtomcat6).

Workaround 2 - Manually install the JSP jar

Download the same JAR file that the DEB package above would install.

wget https://bugs.launchpad.net/ubuntu/+source/jetty/+bug/1508562/+attachment/4785985/+files/jsp-2.1-6.0.2.jar

Now, move it to a proper location inside the Jetty config dir. I did it this way:

mkdir /etc/jetty/extra-jars
mv jsp-2.1-6.0.2.jar /etc/jetty/extra-jars

And add a line like this one in the Jetty start.config file:

echo "/etc/jetty/extra-jars/jsp-2.1-6.0.2.jar" >> /etc/jetty/start.config

And:

service jetty restart

Correct solution

The correct solution is to wait for the Ubuntu Team solution. However, while waiting for this fix, you can use any of the previous workarounds (I prefer the last one).

I hope they help you!


Try this steps:

sudo mv jsp-2.1-6.0.2.jar /usr/share/jetty/lib/.

change own:

sudo chown root:root /usr/share/jetty/lib/jsp-2.1-6.0.2.jar

finally restart jetty:

sudo service jetty restart

I followed this steps and now I can see localhost:8983/solr and localhost/solr/admin

Luis Alfonso García Manzo

In Ubuntu 14.04 this can be fixed with:

cd /tmp
wget https://launchpad.net/~vshn/+archive/ubuntu/solr/+files/solr-jetty-jsp-fix_1.0.2_all.deb
sudo dpkg -i solr-jetty-jsp-fix_1.0.2_all.deb
sudo service jetty restart

Following http://docs.ckan.org/en/ckan-1.6/solr-setup.html#single-solr-instance (this one a bit old, but worked perfect for me )

You will have to edit /etc/profile and add this line to the end such as this to the end (adjusting the path for your machine’s jdk install:

JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/ (or other version)

then

export JAVA_HOME sudo service jetty start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!