I am trying to install CKAN from package on ubuntu 14.04 using the latest docs.
So while setting up solr when I execute the command:
sudo service jetty restart
I get this on my terminal:
* Starting Jetty servlet engine. jetty
* /var/run/jetty.pid exists, but jetty was not running. Ignoring /var/run/jetty.pid
/etc/init.d/jetty: 274: /etc/init.d/jetty: /usr/sbin/rotatelogs: not found
* Jetty servlet engine started, reachable on http://ammar-HP-ProBook-450-G4:8983/. jetty [fail]
Hence I cannot see a solr welcome page on localhost:8983/solr/
Help Please...
I'm not sure why its used a different hostname to localhost, but it sounds it is running on this slightly different address and you can simply configure CKAN to use it:
solr_url=http://ammar-HP-ProBook-450-G4:8983/solr
Related
I install the solr-jetty package in a Ubuntu 14 container running in a cloud9 workspace.
To install the package I run the following command:
sudo apt-get install solr-jetty
The installation doesn't return any error.
Then I try to start solr with the following command:
sudo service jetty start
But I receive the following error:
* Starting Jetty servlet engine. jetty
* Jetty servlet engine started, reachable on http://host-solr-3694477:8983/. jetty
...fail!
In the log file of jetty I get the following message:
failed setting default capabilities.
set_caps(CAPS) failed for user 'jetty'
Service exit with a return value of 4
How can I resolve this issue?
To resolve the problem I had to change the user that run jetty from jetty to root.
This can be configured by editing the /etc/default/jetty file.
I think it is not the more correct solution because it can add security problems. If anyone have a better solution ...
Docker user here, same problem, but - this worked for me (and this is as unadvised as changing the user to 'root', suggested above):
https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
Set the following on your 'docker run' command when creating a container:
--privileged=true
I'm just using docker for development, so not overly concerned yet with the security implications of this.
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 running by visiting http://localhost:8983/solr/.
I can see that Jetty is running because when I visit http://localhost:8983 I see that it is up.
I added the jdk as follows:
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-amd64
I am getting a 500 error when i try to open the solr page:
HTTP ERROR 500
Problem accessing /solr/index.jsp. Reason:
JSP support not configured
Powered by Jetty://
Any ideas? Should I redo the whole thing from the start?
Edit/Update
I just couldn't do anything with this installation. The bigger problem was that installation files were meshed up! I tried to install tomcat/solr instead of jetty/solr and things went sour. So I just created a VM and did a fresh install there. For anyone interested I did a tomcat/solr installation following this and a CKAN installation following this (with out of course the solr instructions). Also, for some reason the CKAN installation has commented out the solr URL, so even if it is right, I had to delete the comment.
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
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
I have followed this guide to install Solr in TomCat running on Windows Server 2008 R2.
http://drupal.org/node/1359598
As described in step 6 of the guide I can run Solr from the command line using the following:
java -Dsolr.solr.home=c:/solr/ -jar start.jar
As expected I can now see Solr at http://localhost:8983/solr/
If I reboot the server Solr does not start automatically. I have to run the start.jar file via the command line as shown above.
I have tried adding the following to the Java Options in the Configure TomCat UI.
-Dsolr.solr.home=c:\solr
This doesn't work. The only way I can run Solr is to use the command line. I'm sure that this is a simple problem to resolve but I can't work it out. Does anyone have any idea what I've configured incorrectly?
My technology stack is:
JRE 7
TomCat 7.0
Solr 3.6.0
Windows Server 2008 R2 (IIS 7.5)
Default servlet container in solr is jetty, not tomcat. So when you are running java -jar start.jar you are starting jetty.
Please refer to the following doc on running solr with tomcat .
Once you have done this, to start tomcat as a service that automatically restarts follow this doc http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
I have downloaded mod_jk-1.2.28-httpd-2.2.X.so for Apache 2.2 running on CentOS, and set up as per http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html. When I try to start httpd it fails with the following error:
"Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /opt/apache-tomcat-6.0.26/conf/jk/mod_jk.conf-auto: Cannot load /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so into server: /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so: wrong ELF class: ELFCLASS32"
Does that mean that mod_jk-1.2.28-httpd-2.2.X.so has not been properly compiled?. What can I do about that?
Thanks
Peter
It means that you have a 32-bit module, but are not running a 32-bit httpd. Install the proper gcc package from the repositories and rebuild the module.
To fix, I installed the Tomcat Connector using yum:
yum search mod_jk
mod_jk-ap20.x86_64 : Tomcat mod_jk connector for Apache 2.0.x
mod_jk-ap22.x86_64 : Tomcat mod_jk connector for Apache 2.x
yum install mod_jk
I want to setup search for my site. I couldn't find much information to install Jetty + Solr on my linode.
I could install solr-jetty on ubuntu simply using apt-get. any body has better experience with debian?
You shouldn't need to install it through the package manager. Jetty is deployed with Solr from the Solr homepage. So long as you have java installed on your server you can simply unpack the Solr distibution, read example/README.txt