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

后端 未结 5 1640
伪装坚强ぢ
伪装坚强ぢ 2021-02-20 10:24

I am trying to install CKAN on my local computer using Ubuntu 14.04 LTS.

I followed the instructions for installing from source found here and I try to check if solr is

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-20 10:57

    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!

提交回复
热议问题