How to run Giraph on YARN (Hadoop 2.6) ('Worker failed during input split') - giraph

I'm trying to set up a pseudo-distributed Hadoop 2.6 cluster for running Giraph jobs. As I couldn't find a comprehensive guide for that, I've been relying on Giraph QuickStart (http://giraph.apache.org/quick_start.html), which is unfortunately for Hadoop 0.20.203.0, and some pieces of Hadoop 2.6/YARN tutorials. In order to do the Right Thing, I came up with a bash script that should install Hadoop and Giraph. Unfortunately Giraph jobs fail repeatedly with 'Worker failed during input split' exception. I would really appreciate if anyone could point an error in my deployment precedure or provide another working way.
EDIT: My primary objective is to be able to develop Giraph 1.1 jobs. I don't need to run any heavy computation on my own (in the end, the jobs will be run on an external cluster), so if there is any easier way to have Giraph development environment, it will do.
The installation script is as follows:
#! /bin/bash
set -exu
echo "Starting hadoop + giraph installation; JAVA HOME is $JAVA_HOME"
INSTALL_DIR=~/apache_hadoop_giraph
mkdir -p $INSTALL_DIR/downloads
############# PHASE 1: YARN ##############
#### 1: Get and unpack Hadoop:
if [ ! -f $INSTALL_DIR/downloads/hadoop-2.6.0.tar.gz ]; then
wget -P $INSTALL_DIR/downloads ftp://ftp.task.gda.pl/pub/www/apache/dist/hadoop/core/hadoop-2.6.0/hadoop-2.6.0.tar.gz
fi
tar -xf $INSTALL_DIR/downloads/hadoop-2.6.0.tar.gz -C $INSTALL_DIR
export HADOOP_PREFIX=$INSTALL_DIR/hadoop-2.6.0
export HADOOP_HOME=$HADOOP_PREFIX
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
#### 2: Configure Hadoop and YARN
sed -i -e "s|^export JAVA_HOME=\${JAVA_HOME}|export JAVA_HOME=$JAVA_HOME|g" ${HADOOP_PREFIX}/etc/hadoop/hadoop-env.sh
cat <<EOF > ${HADOOP_PREFIX}/etc/hadoop/core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
EOF
cat <<EOF > ${HADOOP_PREFIX}/etc/hadoop/hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
EOF
cat <<EOF > ${HADOOP_PREFIX}/etc/hadoop/mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
EOF
cat <<EOF > ${HADOOP_PREFIX}/etc/hadoop/yarn-site.xml
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
EOF
#### 3: Prepare HDFS:
cd $HADOOP_PREFIX
export HDFS=$HADOOP_PREFIX/bin/hdfs
sbin/stop-all.sh # Just to be sure we have no running demons
# The following line is commented out in case some of SO readers have something important in /tmp:
# rm -rf /tmp/* || echo "removal of some parts of tmp failed"
$HDFS namenode -format
sbin/start-dfs.sh
#### 4: Create HDFS directories:
$HDFS dfs -mkdir -p /user
$HDFS dfs -mkdir -p /user/`whoami`
#### 5 (optional): Run a test job
sbin/start-yarn.sh
$HDFS dfs -put etc/hadoop input
bin/yarn jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar grep input output 'dfs[a-z.]+'
$HDFS dfs -cat output/* # Prints some stuff grep'd out of input file
sbin/stop-yarn.sh
#### 6: Stop HDFS for now
sbin/stop-dfs.sh
############# PHASE 2: Giraph ##############
#### 1: Get Giraph 1.1
export GIRAPH_HOME=$INSTALL_DIR/giraph
cd $INSTALL_DIR
git clone http://git-wip-us.apache.org/repos/asf/giraph.git giraph
cd $GIRAPH_HOME
git checkout release-1.1
#### 2: Build
mvn -Phadoop_2 -Dhadoop.version=2.6.0 -DskipTests package
#### 3: Run a test job:
# Remove leftovers if any:
$HADOOP_HOME/sbin/start-dfs.sh
$HDFS dfs -rm -r -f /user/`whoami`/output
$HDFS dfs -rm -r -f /user/`whoami`/input/tiny_graph.txt
$HDFS dfs -mkdir -p /user/`whoami`/input
# Place input:
$HDFS dfs -put tiny_graph.txt input/tiny_graph.txt
# Start YARN
$HADOOP_HOME/sbin/start-yarn.sh
# Run the job (this fails with 'Worker failed during input split'):
JAR=$GIRAPH_HOME/giraph-examples/target/giraph-examples-1.1.0-for-hadoop-2.6.0-jar-with-dependencies.jar
CORE=$GIRAPH_HOME/giraph-core/target/giraph-1.1.0-for-hadoop-2.6.0-jar-with-dependencies.jar
$HADOOP_HOME/bin/hadoop jar $JAR \
org.apache.giraph.GiraphRunner \
org.apache.giraph.examples.SimpleShortestPathsComputation \
-vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat \
-vip /user/ptaku/input/tiny_graph.txt \
-vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat \
-op /user/ptaku/output/shortestpaths \
-yj $JAR,$CORE \
-w 1 \
-ca giraph.SplitMasterWorker=false
The script runs smoothly up to the last command, which hangs for a long time with map 100% reduce 0% status; investigation of logfiles for the YARN containers reveals the mysterious java.lang.IllegalStateException: coordinateVertexInputSplits: Worker failed during input split (currently not supported). Full container logs are available at pastebin:
Container 1 (master): http://pastebin.com/6nYvtNxJ
Container 2 (worker): http://pastebin.com/3a6CQamQ
I have also tried building Giraph with hadoop_yarn profile (after removing STATIC_SASL_SYMBOL from pom.xml), but it doesn't change anything.
I'm running Ubuntu 14.10 64bit with 4GB RAM and 16GB of swap. Extra system info:
>> uname -a
Linux Graffi 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>> which java
/usr/bin/java
>> java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
>> echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk-amd64/jre
>> which mvn
/usr/bin/mvn
>> mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-35-generic", arch: "amd64", family: "unix"
I would be really grateful for any help on how to get Giraph 1.1 running on Hadoop 2.6.

I had a similar problem a while ago. The problem was that my computer had uppercase letters in the hostname which is a known bug (https://issues.apache.org/jira/browse/GIRAPH-904). Changing the hostname to only lowercase letters fixed it for me.

Related

Is there a way to store required libraries persistently? I'm running into error code H10

Im deploying a sinatra webapp that makes use of a c library, through Ruby FFI. I need this library to be compiled on the target machine. I do this through a Rakefile normally, but because of Heroku's ephemeral hard drive, any time I run rake the compiled files dissappear. How can I make these libraries persist? Is there a way to push the files to git from heroku?
Possibly related: Whenever I try to access the page, the application crashes with a code=H10 error. The app runs fine locally.
My attempt at customizing a buildpack:
#!/usr/bin/env ruby
# This script compiles an application so it can run on Heroku.
# It will install the application's specified version of Ruby, it's dependencies
# and certain framework specific requirements (such as calling `rake assets:precompile`
# for rails apps). You can see all features described in the devcenter
# https://devcenter.heroku.com/articles/ruby-support
$stdout.sync = true
$:.unshift File.expand_path("../../../lib", __FILE__)
require "language_pack"
require "language_pack/shell_helpers"
begin
# my addition begins here
`mkdir /app/src`
`cd /app && curl -s https://www.astro.com/ftp/swisseph/swe_unix_src_2.10.02.tar.gz | tar xzvf -`
`cd '/app/src' && make libswe.so`
# my addition ends here
LanguagePack::ShellHelpers.initialize_env(ARGV[2])
if pack = LanguagePack.detect(ARGV[0], ARGV[1])
pack.topic("Compiling #{pack.name}")
pack.log("compile") do
pack.compile
end
end
rescue Exception => e
LanguagePack::ShellHelpers.display_error_and_exit(e)
end
Alternatively, I also tried:
#!/usr/bin/env bash
# The actual compilation code lives in `bin/support/ruby_compile`. This file instead
# bootstraps the ruby needed and then executes `bin/support/ruby_compile`
BUILD_DIR=$1
CACHE_DIR=$2
ENV_DIR=$3
BIN_DIR=$(cd $(dirname $0); pwd)
BUILDPACK_DIR=$(dirname $BIN_DIR)
# my addition begins here
mkdir /app/src
cd /app && curl -s https://www.astro.com/ftp/swisseph/swe_unix_src_2.10.02.tar.gz | tar xzvf -
cd '/app/src' && make libswe.so
# my addition ends here
source "$BIN_DIR/support/bash_functions.sh"
heroku_buildpack_ruby_install_ruby "$BIN_DIR" "$BUILDPACK_DIR"
if detect_needs_java "$BUILD_DIR"; then
cat <<EOM
## Warning: Your app needs java
The Ruby buildpack determined your app needs java installed
we recommend you add the jvm buildpack to your application:
$ heroku buildpacks:add heroku/jvm --index=1
-----> Installing Java
EOM
compile_buildpack_v2 "$BUILD_DIR" "$CACHE_DIR" "$ENV_DIR" "https://buildpack-registry.s3.us-east-1.amazonaws.com/buildpacks/heroku/jvm.tgz" "heroku/jvm"
fi
$heroku_buildpack_ruby_dir/bin/ruby $BIN_DIR/support/ruby_compile $#
Both seem to work at first (i.e. compile the C library, output the files I need), but when I run heroku run bash or the web application Im not able to find the files. This is the specific error, btw:
/app/vendor/bundle/ruby/3.0.0/gems/ffi-1.15.5/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/app/src/libswe.so': /app/src/libswe.so: cannot open shared object file: No such file or directory (LoadError)
I've also tried heroku release phase, but even then the files did not persist. Procfile:
release: bundle exec rake
web: bundle exec thin start -R config.ru -e $RACK_ENV -p ${PORT:-5000}
Rakefile:
#require "bundler/gem_tasks"
task default: [:clean, :c_build, :get_ephe]
task :clean do
`rm ./src/libswe.so`
`rm -rf ephe`
end
task :c_build do
`wget https://www.astro.com/ftp/swisseph/swe_unix_src_2.10.02.tar.gz`
`tar xvf swe_unix_src_2.10.02.tar.gz`
`rm swe_unix_src_2.10.02.tar.gz`
`cd src && make libswe.so && echo "Compiled Library"`
end
task :get_ephe do
`mkdir ephe`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/seas_12.se1`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/seas_18.se1`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/sefstars.txt`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/semo_12.se1`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/semo_18.se1`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/sepl_12.se1`
`wget -P ephe https://www.astro.com/ftp/swisseph/ephe/sepl_18.se1`
end

Oracle XE ( 11.2.0 ) Database Configuration failed on Ubunto 14 and 16

I am facing Error while configuring Oracle XE after installation.
I Follow this Tutorial
https://askubuntu.com/questions/566734/how-to-install-oracle-11gr2-on-ubuntu-14-04
When I run this statement for database Configuration.
/etc/init.d/oracle-xe configure
I face this Error after input ports and password
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y
Starting Oracle Net Listener...Done
Configuring database...
**Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details**
I guess it maybe memory Target size issue.
I Tried this
nano /u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora
comment # memory_target=100663296
but It won't work work for me.
Error Log.
PostDbCreation.log
begin
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
File created.
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
ORA-00845: MEMORY_TARGET not supported on this system
select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
BEGIN utl_recomp.recomp_serial(); END;
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
The best would be to start from the beginning.
Step 1 - Installation of SSH server
sudo apt install openssh-server
Step 2 - Execute the following commands (pre-requisite packages)
sudo apt-get install alien libaio1 unixodbc vim
Step 3 - Download the Oracle 11g express edition setup file from Oracle website http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html . Then go to folder where you have downloaded the setup file (rpm) and convert it to debian type (deb):
sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
Step 4 - Execute the pre-requisites,
Create a special chkconfig script:
sudo vim /sbin/chkconfig
and add following into the file:
#!/bin/bash
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
Save the above file and provide appropriate permissions
sudo chmod 755 /sbin/chkconfig
Execute the following commands:
free -m
sudo ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
touch /var/lock/subsys/listener
Execute the below which prevents oracle installation errors. It is weird but helped in my case. Ignore errors that will appear.
sudo -s
umount /dev/shm
sudo rm -rf /dev/shm
sudo mkdir /dev/shm
mount --move /run/shm /dev/shm
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
Step 5 - Create the below file,
sudo vim /etc/rc2.d/S01shm_load
Copy content below into the opened file:
#!/bin/sh case "$1"
in start) mkdir /var/lock/subsys 2>/dev/null
touch /var/lock/subsys/listener
rm /dev/shm 2>/dev/null
mkdir /dev/shm 2>/dev/null
mount -t tmpfs shmfs -o size=2048m /dev/shm ;;
*) echo error
exit 1 ;;
esac
Execute the following command
sudo chmod 755 /etc/rc2.d/S01shm_load
Step 6 - Restart the machine.
Step 7 - Install Oracle 11gR2 XE. Go to the directory where you created the ubuntu package file and enter following commands (not as root user),
sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
sudo /etc/init.d/oracle-xe configure
Enter the following configuration information:
Valid HTTP port for the Oracle Application Express (the default is 8080, use 7070)
Valid port for the Oracle database listener (the default is 1521)
Password for the SYS and SYSTEM administrative user accounts
Confirm password for SYS and SYSTEM administrative user accounts
Whether you want the database to start automatically when the computer starts, Y
Step 8 - Before you start using Oracle 11gR2 XE you have to set-up few things more.
Change to users home directory (type cd)
Open bashrc using the command
vim .bashrc
Add following lines to .bashrc :
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
Execute .profile to load the changes:
. ./.profile
Open root bash using
sudo vim /root/.bashrc
and copy the same contents at the end of that file
Step 9 - Restart the appliance. Oracle should have been started now
Step 10 - Execute the following command to enter SQL prompt
sqlplus sys as sysdba

Parameterize docker build by passing jar file name from command line

I am trying to parameterize the final jar file name in docker build. I need docker-maven-plugin to take jar file name passed via command line parameter. Maven build is not throwing any error while building image.
If I hard-code the jar file name in dockerfile, it is working fine.
Maven command to docker build:
mvn -X -s settings.xml docker:build -DJAR_FILE_NAME=${filename}
My docker file:
RUN curl -kfsSL https://example.com/UnlimitedJCEPolicyJDK8/US_export_policy.jar > US_export_policy.jar \
&& curl -kfsSL https://example.com//UnlimitedJCEPolicyJDK8/local_policy.jar > local_policy.jar \
&& mv local_policy.jar ${JAVA_HOME}/jre/lib/security \
&& mv US_export_policy.jar ${JAVA_HOME}/jre/lib/security \
&& rm -rf US_export_policy.jar local_policy.jar
ENV JAVA_KEYSTORE ${JAVA_HOME}/jre/lib/security/cacerts
RUN curl -kfsSL https://example.com/mycert.cer > mycert.cer \
&& ${JAVA_HOME}/bin/keytool -v -importcert -file mycert.cer -keystore ${JAVA_KEYSTORE} -storepass dummy -alias dummy -noprompt \
&& rm mycert.cer
VOLUME /tmp
#ADD myservice-2.0.2-SNAPSHOT.jar app.jar <-hard-coded name works fine
RUN echo "final jar file name"
RUN echo ${JAR_FILE_NAME}
ADD ${JAR_FILE_NAME} app.jar
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
My POM.xml
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.0</version>
<configuration>
<imageName>${docker.image.prefix}/myservice</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>${docker.resource.targetPath}</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
Output from docker build process:
Step 6 : VOLUME /tmp
---> Using cache
---> xxxxxxxxx
Step 7 : RUN /bin/bash -c echo JAR_FILE_NAME1 in docker :$JAR_FILE_NAME
---> Using cache
---> xxxxxxxxx
Step 8 : RUN /bin/bash -c echo JAR_FILE_NAME2 in docker :${JAR_FILE_NAME}
---> Using cache
---> xxxxxxxxx
Step 9 : RUN echo $JAR_FILE_NAME
---> Using cache
---> xxxxxxxxx
Step 10 : RUN echo "final jar file name"
---> Using cache
---> xxxxxxxxx
Step 11 : RUN echo ${JAR_FILE_NAME}
---> Using cache
---> xxxxxxxxx
Step 12 : ADD ${JAR_FILE_NAME} app.jar
---> Using cache
---> xxxxxxxxx
Step 13 : RUN bash -c 'touch /app.jar'
---> Using cache
---> xxxxxxxxx
Step 14 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
---> Using cache
---> xxxxxxxxx
Successfully built xxxxxxxxx
[INFO] Built xxx/myservice
Output while pulling image:
I0603 13:48:32.849159 23106 exec.cpp:132] Version: 0.23.0
I0603 13:48:32.857393 23114 exec.cpp:206] Executor registered on slave 20170523-104056-1453378314-5050-11670-S48
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
Error: Invalid or corrupt jarfile /app.jar
Why don't you use a regular docker build command instead of going through maven? You can use a maven base image, something like maven:onbuild even. An example here may help.
I parameterized the output jar to be used in docker image in this way.
In Dockerfile, used a concrete name without any version. Removed ${JAR_FILE_NAME}, dynamic parameters from Dockerfile.
ADD myservice.jar app.jar
In POM.xml, I made maven to output artifact without version in the jar file name, by adding below element right under tag.
<finalName>${project.artifactId}</finalName>
So, no manual update needed for Dockerfile. Forgetting to update Dockerfile and then build getting failed was really disturbing. I let Maven to manage versions and those versions are used as finite image tags, and thus "reproducible builds" work for me.
I had the same kind of problem: I dont't want to hard-code the project version in my Dockerfile.
I first though about removing the version in the jar's file name (this can be achieved using your build tool, I personnaly use gradle).
Yet I was quite unhappy with it since I consider having the version in jar's name is a good practice (there is an interstning discustion about this in this question for instance).
So I came up with this solution: copy/add the jar using a wildcard:
FROM eclipse-temurin:17-jre-alpine
WORKDIR /app/
COPY ./path/to/my/jar/*.jar /app/my-app.jar
ENTRYPOINT ["java", "-jar", "/app/my-app.jar"]
Here I managed to make my build tool produce the jar I want alone in its folder.
The point is to have a way to use a wildcard to get this single jar without ambiguity.

PHP7.0 Phar issues with apache2

I have created PHP file within a folder,
/var/www/folder/test.php:
<?php
echo "Test file called!" ;
I have then created a PHAR via the cli:
php -d "phar.readonly = 0"
-r "(new Phar('/var/www/app.phar'))->buildFromDirectory('folder') ;"
I can call the PHP file directly from within the Phar when mod-php5 is enabled, but not when mod-php7.0 is?
$ apt-get install apache2
$ curl localhost/app.phar/test.php
Test file called!
$ apt-get install php7.0 php7.0-common php7.0*
$ a2dismod php5
$ a2enmod php7.0
$ service apache2 restart
$ curl localhost/app.phar/test.php
...
<title>File Not Found</title>...
<h1>404 - File /test.php Not Found</h1>
...
We currently run a mixture of Tomcat and Apache2 so are sadly invested in our way of deploying WAR and PHAR files.

Jetty 6.1 with Solr 4.4

Is it possible to run Solr 4.4 with jetty 6.1 from Ubuntus package repository? I followed this example:
http://www.kingstonlabs.com/blog/how-to-install-solr-36-on-ubuntu-1204/
And tried some other examples, but it seemed to be impossible to run run Solr 4.4 from Jetty's webapps directory.
In the example you can read in the comments, that people ended up with 404 when try to reach
http://localhost:8080/solr
I tried also the configuration steps from the Apache Solr 4 Cookbook by Rafal Kuc, page 6 "Running Solr on Jetty"
Here a summary of the steps:
tar xvfz solr-4.4.0.tgz
sudo cp ~/solr-4.4.0/example/webapps/solr.war /usr/share/jetty/webapps
sudo mkdir /usr/share/jetty/temp
sudo cp ~/solr-4.4.0/example/contexts/solr-jetty-context.xml /usr/share/jetty/contexts
#Change temp dir
sudo vi /usr/share/jetty/contexts/solr-jetty-context.xml
sudo cp ~/solr-4.4.0/example/etc/jetty.xml /usr/share/jetty/etc/
sudo cp ~/solr-4.4.0/example/etc/webdefault.xml /usr/share/jetty/etc/
sudo cp ~/solr-4.4.0/example/etc/logging.properties /usr/share/jetty/etc/
sudo mkdir /usr/share/solr
sudo cp ~/solr-4.4.0/example/solr/solr.xml /usr/share/solr/
sudo mkdir -p /usr/share/solr/collection1/conf
sudo cp ~/solr-4.4.0/example/solr/collection1/conf/schema.xml /usr/share/solr/collection1/conf/
sudo cp ~/solr-4.4.0/example/solr/collection1/conf/solrconfig.xml /usr/share/solr/collection1/conf/
# JETTY_HOME = 0.0.0.0; NO_START=0;
# JAVA_OPTIONS="-Xmx256m -Djava.awt.headless=true -Dsolr.solr.home=/usr/share/solr/"
sudo vi /etc/default/jetty
But
http://localhost:8983/solr
is not reachable afterwards. If found some error messages in the logs and i think that the jetty.xml from the Solr 4.4.0 files which substituting the Jetty 6.1 jetty.xml does not work with the rest of jetty 6.1
I remember so issues in the logs about Java/Jetty Server classes. i think tey differ.
Anybody with experiences in this case an can surely confirm my guess?
The clue is to integrate the libs from the solr example directory example/lib/ext into the solr.war.
Extract the files from the solr.war. Then put the libs into the WEB-INF/lib folder.
Create a new solr.war with the libs included.

Resources