How Do You Troubleshoot the Installation of Apache Accumulo on Linux?

Problem scenario
You are trying to install open source Accumulo on Linux. You have two GB of swap space. You have installed Java, Hadoop, and Zookeeper. You have run the script for Accumulo 1.9.2.

You run this (and expected it to work): /bin/accumulo-1.9.2/bin/accumulo init

But you get this error:

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N 2019-03-20 17:21:56,705 [start.Main] ERROR: Problem initializing the class loader java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at org.apache.accumulo.start.Main.getClassLoader( at org.apache.accumulo.start.Main.main( Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.vfs2.impl.DefaultFileSystemManager.( at org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.generateVfs( at org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.getClassLoader( ... 6 more Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at at java.lang.ClassLoader.loadClass( at org.apache.accumulo.start.classloader.AccumuloClassLoader$2.loadClass( at java.lang.ClassLoader.loadClass( ... 9 more Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils at org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.close( at org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader$ at Caused by: java.lang.ClassNotFoundException: at at java.lang.ClassLoader.loadClass( at org.apache.accumulo.start.classloader.AccumuloClassLoader$2.loadClass( at java.lang.ClassLoader.loadClass( ... 3 more

You have modified this script purely for troubleshooting purposes: /bin/accumulo-1.9.2/bin/accumulo

You have it print out the $CLASSPATH variable when it runs. In two directories that you see when you run it (before it errors out), you have copied the commons-io-2.5.jar file. This way two directories definitely have the .jar file. You changed the permissions and ownership of these files to various permissive settings. You kept reproducing the problem after you did this. The problem even happens when you log in as root and start HDFS and Yarn and then run accumulo init. Why are you getting the error above when the commons-io-2.5.jar file is present in the classpath? How do you install Accumulo and run the accumulo init script?

Modify the accumulo-site.xml file. It may be here on your server: /usr/bin/accumulo-1.9.2/conf/accumulo-site.xml

Determine the version of Hadoop you are using (e.g., 2 or 3, or something else). This example will be for Hadoop 3. Add the third line in the below section (you'll see lines 1, 2, and 4 below in the file above; the third line needs to be added):

  <!-- Hadoop 3 requirements -->
  <!-- End Hadoop 3 requirements -->

Leave a comment

Your email address will not be published. Required fields are marked *