accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thai Ngo <baothai...@gmail.com>
Subject Re: Accumulo init problem
Date Thu, 06 Aug 2015 04:34:08 GMT
Hi Josh and Sean,

Thanks for your reply. I already made the verifications several times.
Below is the information you asked:

1. I got Accumulo from Apache. The version is 1.7.0. I did place the
installed accumulo in the same place with Hadoop and Zookeeper for
convenience.

2. I installed Hadoop 2.7 and Zookeeper using homebrew.

3. This is $HADOOP_PREFIX in accumulo-env.sh:

Mac :: accumulo/1.7.0/conf ‹master› » grep HADOOP_PREFIX accumulo-env.sh

   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX
=/usr/local/Cellar/hadoop/2.7.0/libexec

   HADOOP_PREFIX="$HADOOP_HOME"

# export LD_LIBRARY_PATH=${HADOOP_PREFIX
}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

Mac :: accumulo/1.7.0/conf ‹master› »

4. This is $HADOOP_PREFIX and $ACCUMULO_HOME in my environment:

Mac :: accumulo/1.7.0/conf ‹master› » echo $HADOOP_PREFIX

/usr/local/Cellar/hadoop/2.7.0/libexec

Mac :: accumulo/1.7.0/conf ‹master› » echo $ACCUMULO_HOME

/usr/local/Cellar/accumulo/1.7.0

Mac :: accumulo/1.7.0/conf ‹master› »

5. At first, I ran $ACCUMULO_HOME/bin/accumulo init but got the errors as I
said in the very first post. I then slightly modified the script
$ACCUMULO_HOME/bin/accumulo like this:

XML_FILES="${ACCUMULO_CONF_DIR}"

#LOG4J_JAR=$(find -H "${HADOOP_PREFIX}/lib"
"${HADOOP_PREFIX}"/share/hadoop/common/lib -name 'log4j*.jar' -print
2>/dev/null | head -1)

#LOG4J_JAR=$(find -H "${HADOOP_PREFIX}"/share/hadoop/common/lib -name
'log4j*.jar' -print 2>/dev/null | head -1)

LOG4J_JAR=/usr/local/Cellar/hadoop/2.7.0/libexec/share/hadoop/common/log4j-1.2.17.jar

#SLF4J_JARS="${ACCUMULO_HOME}/lib/slf4j-api.jar:${ACCUMULO_HOME}/lib/slf4j-log4j12.jar"

SLF4J_JARS="${HADOOP_PREFIX}/share/hadoop/common/lib/slf4j-api-1.7.10.jar:${HADOOP_PREFIX}/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar"

#SLF4J_JARS=/usr/local/Cellar/accumulo/1.7.0/lib/slf4j-api.jar:/usr/local/Cellar/accumulo/1.7.0/lib/slf4j-log4j12.jar

CLASSPATH="${XML_FILES}:${START_JAR}:${SLF4J_JARS}:${LOG4J_JAR}:${CLASSPATH}"


echo "Classpath ..."

echo ${CLASSPATH}

Let me know if you need any other information.

Thanks,
Thai

On Thu, Aug 6, 2015 at 9:59 AM, Sean Busbey <busbey@cloudera.com> wrote:

> is this a homebrew install, by chance?
>
> On Wed, Aug 5, 2015 at 9:46 PM, Josh Elser <elserj@apache.org> wrote:
>
>> Accumulo 1.7.0 should have the necessary slf4j jars in ACCUMULO_HOME/lib.
>> The log4j jar should be pulled automatically from your Hadoop distribution.
>>
>> Are you using some vendor's version of Hadoop or did you get it from
>> Apache (and what version is it)?
>>
>> Can you please verify the values for HADOOP_PREFIX in accumulo-env.sh?
>> Can you also make sure that you don't have any incorrect values for
>> HADOOP_PREFIX or ACCUMULO_HOME in your current environment (check `env`)?
>>
>> Thai Ngo wrote:
>>
>>> Hi Christopher,
>>>
>>> Yes, they are.
>>> This is part of the output from ls -al
>>> $HADOOP_PREFIX/share/hadoop/common/lib:
>>>
>>> -rw-r--r--  1 thaingo wheel  489884 Apr 11 01:51 log4j-1.2.17.jar
>>>
>>> -rw-r--r--  1 thaingo wheel 1419869 Apr 11 01:51 mockito-all-1.8.5.jar
>>>
>>> -rw-r--r--  1 thaingo wheel 1199572 Apr 11 01:51 netty-3.6.2.Final.jar
>>>
>>> -rw-r--r--  1 thaingo wheel   29555 Apr 11 01:51 paranamer-2.3.jar
>>>
>>> -rw-r--r--  1 thaingo wheel  533455 Apr 11 01:51 protobuf-java-2.5.0.jar
>>>
>>> -rw-r--r--  1 thaingo wheel  105112 Apr 11 01:51 servlet-api-2.5.jar
>>>
>>> -rw-r--r--  1 thaingo wheel   32119 Apr 11 01:51 slf4j-api-1.7.10.jar
>>>
>>> -rw-r--r--  1 thaingo wheel    8866 Apr 11 01:51 slf4j-log4j12-1.7.10.jar
>>>
>>> -rw-r--r--  1 thaingo wheel  995968 Apr 11 01:51 snappy-java-1.0.4.1.jar
>>>
>>> -rw-r--r--  1 thaingo wheel   23346 Apr 11 01:51 stax-api-1.0-2.jar
>>>
>>> -rw-r--r--  1 thaingo wheel   15010 Apr 11 01:51 xmlenc-0.52.jar
>>>
>>> -rw-r--r--  1 thaingo wheel   94672 Apr 11 01:51 xz-1.0.jar
>>>
>>> -rw-r--r--  1 thaingo wheel  792964 Apr 11 01:51 zookeeper-3.4.6.jar
>>>
>>> Mac :: hadoop/common/lib ‹master› »
>>>
>>>
>>> and this is the output from ls -al $ACCUMULO_HOME:
>>>
>>> Mac :: Cellar/accumulo/1.7.0 ‹master› »ls -al
>>>
>>> total 168
>>>
>>> drwxr-xr-x 15 thaingo admin    510 Aug  5 09:40 .
>>>
>>> drwxr-xr-x  3 thaingo admin    102 Aug  5 09:41 ..
>>>
>>> -rw-r--r--  1 thaingo admin 129338 May 13 01:34 CHANGES
>>>
>>> -rw-r--r--  1 thaingo admin   6194 May 13 01:34 INSTALL.md
>>>
>>> -rw-r--r--  1 thaingo admin  17174 May 13 01:34 LICENSE
>>>
>>> -rw-r--r--  1 thaingo admin   2079 May 13 01:34 NOTICE
>>>
>>> -rw-r--r--  1 thaingo admin   4568 May 13 01:34 README.md
>>>
>>> drwxr-xr-x 21 thaingo admin    714 Aug  5 11:26 bin
>>>
>>> drwxr-xr-x 20 thaingo admin    680 Aug  5 09:47 conf
>>>
>>> drwxr-xr-x 16 thaingo admin    544 Aug  5 09:40 docs
>>>
>>> drwxr-xr-x  3 thaingo admin    102 Aug  5 09:40 examples
>>>
>>> drwxr-xr-x 38 thaingo admin   1292 Aug  5 09:40 lib
>>>
>>> drwx------  2 thaingo admin     68 May 13 01:50 logs
>>>
>>> drwxr-xr-x  6 thaingo admin    204 Aug  5 09:40 proxy
>>>
>>> drwxr-xr-x  5 thaingo admin    170 Aug  5 09:40 test
>>>
>>> Mac :: Cellar/accumulo/1.7.0 ‹master› »
>>>
>>>
>>> Any thoughts?
>>>
>>> Thanks,
>>> Thai
>>>
>>> On Thu, Aug 6, 2015 at 2:22 AM, Christopher <ctubbsii@apache.org
>>> <mailto:ctubbsii@apache.org>> wrote:
>>>
>>>     Are the jars readable by the user running the Accumulo process?
>>>
>>>     --
>>>     Christopher L Tubbs II
>>>     http://gravatar.com/ctubbsii
>>>
>>>
>>>     On Wed, Aug 5, 2015 at 1:44 AM, Thai Ngo <baothaingo@gmail.com
>>>     <mailto:baothaingo@gmail.com>> wrote:
>>>      > Hello All,
>>>      >
>>>      > After installing Accumulo 1.7.0 in single node mode, I ran
>>>      > $ACCUMULO_HOME/bin/accumulo init and met the following error:
>>>      >
>>>      > Failed to instantiate SLF4J LoggerFactory
>>>      >
>>>      > Reported exception:
>>>      >
>>>      > java.lang.NoClassDefFoundError: org/apache/log4j/Level
>>>      >
>>>      > at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
>>>      >
>>>      > at
>>>     org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
>>>      >
>>>      > at
>>> org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
>>>      >
>>>      > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
>>>      >
>>>      > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
>>>      >
>>>      > at org.apache.accumulo.start.Main.<clinit>(Main.java:38)
>>>      >
>>>      > Caused by: java.lang.ClassNotFoundException:
>>> org.apache.log4j.Level
>>>      >
>>>      > at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>>      >
>>>      > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>>      >
>>>      > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>>>      >
>>>      > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>      >
>>>      > ... 6 more
>>>      >
>>>      > Exception in thread "main" java.lang.NoClassDefFoundError:
>>>      > org/apache/log4j/Level
>>>      >
>>>      > at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
>>>      >
>>>      > at
>>>     org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
>>>      >
>>>      > at
>>> org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
>>>      >
>>>      > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
>>>      >
>>>      > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
>>>      >
>>>      > at org.apache.accumulo.start.Main.<clinit>(Main.java:38)
>>>      >
>>>      > Caused by: java.lang.ClassNotFoundException:
>>> org.apache.log4j.Level
>>>      >
>>>      > at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>>      >
>>>      > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>>      >
>>>      > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>>>      >
>>>      > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>      >
>>>      > ... 6 more
>>>      >
>>>      >
>>>      > I then looked into the $ACCUMULO_HOME/bin/accumulo script, and
>>>     made some
>>>      > changes to $CLASSPATH to alternatively provide the needed jars
>>>     (log4j,
>>>      > slf4j, slf4j-log4j) for accumulo but I encountered another error:
>>>      >
>>>      > Mac :: accumulo/1.7.0/conf ‹master› » accumuloinit
>>>      >
>>>      > Classpath ...
>>>      >
>>>      >
>>>
>>> /usr/local/Cellar/accumulo/1.7.0/conf:/usr/local/Cellar/accumulo/1.7.0/lib/accumulo-start.jar:/usr/local/Cellar/hadoop/2.7.0/share/hadoop/common/lib/slf4j-api-1.7.10.jar:/usr/local/Cellar/hadoop/2.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar:/usr/local/Cellar/hadoop/2.7.0/libexec/share/hadoop/common/log4j-1.2.17.jar:
>>>      >
>>>      > Exception in thread "main" java.lang.NoClassDefFoundError:
>>>      > org/slf4j/LoggerFactory
>>>      >
>>>      > at org.apache.accumulo.start.Main.<clinit>(Main.java:38)
>>>      >
>>>      > Caused by: java.lang.ClassNotFoundException:
>>> org.slf4j.LoggerFactory
>>>      >
>>>      > at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>>      >
>>>      > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>>      >
>>>      > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>>>      >
>>>      > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>      >
>>>      > ... 1 more
>>>      >
>>>      > Mac :: accumulo/1.7.0/conf ‹master› »
>>>      >
>>>      >
>>>      >
>>>      > https://issues.apache.org/jira/browse/ACCUMULO-3685 did not fix.
>>>      >
>>>      > Any ideas how to fix the problem?
>>>      >
>>>      > Thanks,
>>>      > Thai
>>>      >
>>>      >
>>>      >
>>>      >
>>>      >
>>>      >
>>>      >
>>>      >
>>>      >
>>>      >
>>>
>>>
>>>
>
>
> --
> Sean
>

Mime
View raw message