Forum: Building VoltDB Applications

Post: Building voltdb on Redhat Enterprise Linux

Building voltdb on Redhat Enterprise Linux
tuancao
Apr 17, 2010
Hi,

I have just tried to build the voter example on our cluster running Redhat Enterprise Linux.
[cat82@wl01 voter]$ uname -a
Linux wl01.cac.cornell.edu 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


[cat82@wl01 voter]$ ant server
catalog:
[java] No logging configuration supplied via -Dlog4j.configuration. Supplying default config that logs to INFO or higher to STDOUT


[java] ** BEGIN PROJECT COMPILE: project.xml **
[java] 16 [main] INFO COMPILER - Catalog leader: localhost hosts, sites 1, 2
[java] 246 [main] INFO COMPILER - Path to catalog ddl.sql
[java] INFO [Initialize.class]: Compiling Statement: select count(*) from contestants;
[java] INFO [Initialize.class]: Compiling Statement: insert into contestants (contestant_name, contestant_number) values (?, ?);
[java] INFO [Results.class]: Compiling Statement: select a.contestant_name c1, sum(b.num_votes) c2 from v_votes_by_contestant_number b, contestants a where a.contestant_number = b.contestant_number group by a.contestant_name;
[java] INFO [Vote.class]: Compiling Statement: select contestant_number from contestants where contestant_number = ?;
[java] INFO [Vote.class]: Compiling Statement: select num_votes from v_votes_by_phone_number where phone_number = ?;
[java] INFO [Vote.class]: Compiling Statement: insert into votes (phone_number, contestant_number) values (?, ?);


server:
[java] No logging configuration supplied via -Dlog4j.configuration. Supplying default config that logs to INFO or higher to STDOUT
[java] 11 [main] INFO HOST - Loading...


[java] _ __ ____ ____ ____
[java] | | / /___ / / /_/ __ \/ __ )
[java] | | / / __ \/ / __/ / / / __ |
[java] | |/ / /_/ / / /_/ /_/ / /_/ /
[java] |___/\____/_/\__/_____/_____/


[java] Initialization Log Output:
[java] --------------------------------


[java] 15 [main] INFO HOST - Build: 0.6.02 https://svn.voltdb.com/eng/branches/voltdb-0.6?revision=212
[java] 30 [main] INFO HOST - HTTP admin console listening on port 8080
[java] 30 [main] INFO HOST - Loading application catalog jarfile from /home/fs01/cat82/tuandev/voltdb-0.6.02/examples/voter/catalog.jar
[java] 99 [main] INFO HOST - Creating host manager for 1 hosts using leader localhost/127.0.0.1
[java] 107 [Thread-3] INFO HOST - Connecting to VoltDB cluster as the leader...
[java] 107 [Thread-3] INFO HOST - Maximum clock/network skew is 0 milliseconds (according to leader)
[java] 127 [main] INFO HOST - Attempting to load native VoltDB library voltdb-0.6.02. Expect to see a confirmation following this upon success. If none appears then you may need to compile VoltDB for your platform
[java] 128 [main] FATAL HOST - Library VOLTDB JNI shared library loading failed. Library path ../../voltdb
[java] java.lang.Thread.dumpThreads(Native Method)
[java] java.lang.Thread.getAllStackTraces(Thread.java:1487)
[java] org.voltdb.VoltDB.crashVoltDB(VoltDB.java:210)
[java] org.voltdb.EELibraryLoader.loadExecutionEngineLibrary(EELibraryLoader.java:56)
[java] org.voltdb.jni.ExecutionEngine.(ExecutionEngine.java:95)
[java] org.voltdb.jni.ExecutionEngineJNI.(ExecutionEngineJNI.java:83)
[java] org.voltdb.ExecutionSite.(ExecutionSite.java:437)
[java] org.voltdb.RealVoltDB.initialize(RealVoltDB.java:270)
[java] org.voltdb.VoltDB.initialize(VoltDB.java:257)
[java] org.voltdb.VoltDB.main(VoltDB.java:245)
[java] VoltDB has encountered an unrecoverable error and is exiting.
[java] The log may contain additional information.
[java] Java Result: 255


BUILD SUCCESSFUL
Total time: 3 seconds


I setup the library path:
[cat82@wl01 voter]$ ls ../../voltdb
COPYING libvoltdb-0.6.02.so voltdb-0.6.02.jar


I guess the problem is that voltdb does not support Redhat Enterprise Linux. If so, could you please provide some solution?


Thanks,
Tuan
Hi Tuan, Your operating
ajgent
Apr 19, 2010
Hi Tuan,

Your operating system (Redhat Enterprise Linux) is unlikely to be the cause of the problem. The error ( FATAL HOST - Library VOLTDB JNI shared library loading failed. Library path ../../voltdb ) indicates that the VoltDB server cannot find or open the shared library.

As a starting point, you might want to check the ant build script to see what argument the server target is using for the -Djava.library.path=qualifier.

Do you have the voter example in the examples subfolder of your VoltDB installation or in an alternate location?

Thanks,

--Andrew
-Djava.library.path
tuancao
Apr 19, 2010
Hi Tuan,

Your operating system (Redhat Enterprise Linux) is unlikely to be the cause of the problem. The error ( FATAL HOST - Library VOLTDB JNI shared library loading failed. Library path ../../voltdb ) indicates that the VoltDB server cannot find or open the shared library.

As a starting point, you might want to check the ant build script to see what argument the server target is using for the -Djava.library.path=qualifier.

Do you have the voter example in the examples subfolder of your VoltDB installation or in an alternate location?

Thanks,

--Andrew


Hi Andrew,

[cat82@wl01 voter]$ ls
build.xml catalog.jar ddl.sql debugoutput example_voter.tar.gz obj project.xml readme.txt src

[cat82@wl01 voter]$ less build.xml | grep "Djava.library.path"
jvmarg value="-Djava.library.path=../../voltdb" /

[cat82@wl01 voter]$ ls ../../voltdb
COPYING libvoltdb-0.6.02.so voltdb-0.6.02.jar

my voter directory is on the same level with other examples, such as auction,satellite and so on:

[cat82@wl01 voter]$ ls ../
auction helloworld README satellite voter

and then
cat82@wl01 voter]$ ant server
.....
[java] 193 [main] INFO HOST - Attempting to load native VoltDB library voltdb-0.6.02. Expect to see a confirmation following this upon success. If none appears then you may need to compile VoltDB for your platform
[java] 254 [main] FATAL HOST - Library VOLTDB JNI shared library loading failed. Library path ../../voltdb
[java] java.lang.Thread.dumpThreads(Native Method)
[java] java.lang.Thread.getAllStackTraces(Thread.java:1487)
[java] org.voltdb.VoltDB.crashVoltDB(VoltDB.java:210)
[java] org.voltdb.EELibraryLoader.loadExecutionEngineLibrary(EELibraryLoader.java:56)
[java] org.voltdb.jni.ExecutionEngine.(ExecutionEngine.java:95)
[java] org.voltdb.jni.ExecutionEngineJNI.(ExecutionEngineJNI.java:83)
[java] org.voltdb.ExecutionSite.(ExecutionSite.java:437)
[java] org.voltdb.RealVoltDB.initialize(RealVoltDB.java:270)
[java] org.voltdb.VoltDB.initialize(VoltDB.java:257)
[java] org.voltdb.VoltDB.main(VoltDB.java:245)
[java] VoltDB has encountered an unrecoverable error and is exiting.
[java] The log may contain additional information.
[java] Java Result: 255

I have no idea why it happens.

Thanks,
Tuan
Problem solved
ajgent
Apr 20, 2010

Hi Andrew,

[cat82@wl01 voter]$ ls
build.xml catalog.jar ddl.sql debugoutput example_voter.tar.gz obj project.xml readme.txt src

[cat82@wl01 voter]$ less build.xml | grep "Djava.library.path"
jvmarg value="-Djava.library.path=../../voltdb" /

[cat82@wl01 voter]$ ls ../../voltdb
COPYING libvoltdb-0.6.02.so voltdb-0.6.02.jar...

Thanks,
Tuan

Tuan and I worked offline to resolve his issue. The problem was having the wrong VoltDB kit installed. When using VoltDB on Redhat, be sure to install the CENTOS distribution, not the Ubuntu release.

--Andrew