You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by David Medinets <da...@gmail.com> on 2011/12/30 00:52:47 UTC

Failed to load native map library: libNativeMap-Linux-i386-32.so

I am trying to get the following command to run:

bin/accumulo shell -u root

and still getting the "Failed to find an available server in the list
of servers" message.

--
-- How to make libNativeMap optional?
--

In tserver_ubuntu20gb.debug.log, I am seeing this error:

Failed to load native map library
/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/lib/native/map/libNativeMap-Linux-i386-32.so
Uncaught exception in TabletServer.main, exiting

I read through JIRA ACCUMULO-185 at

  http://www.mail-archive.com/accumulo-dev@incubator.apache.org/msg00986.html

While the JIRA comments say the lib is optional, it does not say how
to resolve the uncaught exception. I notice that the error message
says that the tablet server is exiting.

--
-- Compilation Attempt
--

I switched to the C++ directory and ran make with these results:

$ make
cd nativeMap ; make
make[1]: Entering directory
`/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
-Wall  -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
-I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
libNativeMap-Linux-amd64-64.so
org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
In file included from /usr/include/stdio.h:28:0,
                 from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
                 from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
                 from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
file or directory
compilation terminated.
In file included from /usr/include/unistd.h:26:0,
                 from util.cc:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
file or directory
compilation terminated.
make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
make[1]: Leaving directory
`/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
make: *** [nm] Error 2

I have the missing predefs.h file at

  /usr/include/i386-linux-gnu/bits/predefs.h

But I don't know how to tell the accumulo make about that location.

--

Please let know if there is a way to resolve either of these two issues.

Thanks.

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by David Medinets <da...@gmail.com>.
I've posting my tinkering in the hopes that someone much more
knowledge about C++ can make sense of this issue.

My bits/predefs.h file located in /usr/include/i386-linux-gnu so I
modified the nativeMap/Makefile file to include
-I/usr/include/i386-linux-gnu on the CXXFLAGS variable just as a shot
in the dark. Then I ran make again. Here are the results:

ubuntu@ubuntu20gb:~/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++$
make
cd nativeMap ; make
make[1]: Entering directory
`/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
-Wall  -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
-I/usr/lib/jvm/java-7-openjdk-i386/include
-I/usr/include/i386-linux-gnu -m64 -o libNativeMap-Linux-amd64-64.so
org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
util.cc: In function ‘size_t getMemUsage()’:
util.cc:35:30: warning: ignoring return value of ‘int fscanf(FILE*,
const char*, ...)’, declared with attribute warn_unused_result
[-Wunused-result]
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.so when searching for
-lstdc++
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a when searching for
-lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_s.so when searching for
-lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_s.so when searching for
-lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
make[1]: Leaving directory
`/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
make: *** [nm] Error 2

I think I made the compilation worse.

On Thu, Dec 29, 2011 at 11:04 PM, David Medinets
<da...@gmail.com> wrote:
> I just noticed something in the response of the make command. Notice
> that it refers to amd64. The compilation should be using i386. I am
> looking at the Makefile files to see if I can find the problem. I
> haven't done C++ development since 1986 or so. Wish me luck.
>
> $ make
> cd nativeMap ; make
> make[1]: Entering directory
> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
> g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
> -Wall  -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
> -I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
> libNativeMap-Linux-amd64-64.so
> org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
> In file included from /usr/include/stdio.h:28:0,
>                 from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
>                 from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
>                 from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
> /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
> file or directory
> compilation terminated.
> In file included from /usr/include/unistd.h:26:0,
>                 from util.cc:17:
> /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
> file or directory
> compilation terminated.
> make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
> make[1]: Leaving directory
> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
> make: *** [nm] Error 2
>
>
> On Thu, Dec 29, 2011 at 10:58 PM, David Medinets
> <da...@gmail.com> wrote:
>> I have JAVA_HOME set to /usr/lib/jvm/java-7-openjdk-i386
>>
>> On Thu, Dec 29, 2011 at 7:02 PM, Billie J Rinaldi
>> <bi...@ugov.gov> wrote:
>>> You have to set JAVA_HOME to be able to make the native map library.
>>>
>>> Billie

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by David Medinets <da...@gmail.com>.
I just noticed something in the response of the make command. Notice
that it refers to amd64. The compilation should be using i386. I am
looking at the Makefile files to see if I can find the problem. I
haven't done C++ development since 1986 or so. Wish me luck.

$ make
cd nativeMap ; make
make[1]: Entering directory
`/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
-Wall  -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
-I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
libNativeMap-Linux-amd64-64.so
org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
In file included from /usr/include/stdio.h:28:0,
                 from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
                 from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
                 from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
file or directory
compilation terminated.
In file included from /usr/include/unistd.h:26:0,
                 from util.cc:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
file or directory
compilation terminated.
make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
make[1]: Leaving directory
`/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
make: *** [nm] Error 2


On Thu, Dec 29, 2011 at 10:58 PM, David Medinets
<da...@gmail.com> wrote:
> I have JAVA_HOME set to /usr/lib/jvm/java-7-openjdk-i386
>
> On Thu, Dec 29, 2011 at 7:02 PM, Billie J Rinaldi
> <bi...@ugov.gov> wrote:
>> You have to set JAVA_HOME to be able to make the native map library.
>>
>> Billie

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by David Medinets <da...@gmail.com>.
I have JAVA_HOME set to /usr/lib/jvm/java-7-openjdk-i386

On Thu, Dec 29, 2011 at 7:02 PM, Billie J Rinaldi
<bi...@ugov.gov> wrote:
> You have to set JAVA_HOME to be able to make the native map library.
>
> Billie

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by Aaron Cordova <aa...@cordovas.org>.
4G is not too small.

The problem here is that Accumulo has a setting for how much memory the tablet server should try to use, in this case 1G for map memory and 500MB for block cache while the JVM is capped at 256MB. This is actually a known, old problem and the defaults need to be fixed if they haven't already.

Change -Xmx256m to -Xmx2G or some value larger than your map memory + block cache size on the line defining ACCUMULO_TSERVER_OPTS

The other option is to reduce the 1G and 500M figures, which can be done through the accumulo-site.xml file by adding or changing the following lines (I think the second value is tserver.cache.data.size but it may be named something else ... )  :

<property>
	<name>tserver.memory.maps.max</name>
	<value>200MB</value>
</property>

<property>
	<name>tserver.cache.data.size</name>
	<value>50MB</value>
</property>


In a standalone setup you don't really want to swap, so reducing the settings in accumulo-site.xml to allow everything to fit comfortably in memory is the way to go. No matter what settings you choose, the JVM max in accumulo-env.sh should be set to a greater value than the sum of the two values in accumulo-site.xml


> 589,299,712 is too large for this
> JVM configuration 261,750,784

On Dec 30, 2011, at 12:26 AM, David Medinets wrote:

> The output is i686.
> 
> I was looking in the wrong log file.  When I look in
> tserver_ubuntu20gb.log this is what I see. I obviously have the jvm
> settings wrong.
> 
> 30 00:21:01,238 [tabletserver.TabletServer] ERROR: Uncaught exception
> in TabletServer.main, exiting
> java.lang.IllegalArgumentException: Maximum tablet server map memory
> 1,073,741,824 and block cache sizes 589,299,712 is too large for this
> JVM configuration 261,750,784
> 
> My virtualbox instance has 4,096Mb of memory. With hadoop and
> zookeeper running, this is the results of 'free -k'
> 
> $ free -k
>             total       used       free     shared    buffers     cached
> Mem:       4128460    2190868    1937592          0     223872    1123444
> -/+ buffers/cache:     843552    3284908
> Swap:      4192252          0    4192252
> 
> I am trying to change the jvm settings. So far without luck,
> 
> test -z "$ACCUMULO_TSERVER_OPTS" && export
> ACCUMULO_TSERVER_OPTS="${POLICY} -Xmx256m -Xms256m -Xss128k"
> test -z "$ACCUMULO_MASTER_OPTS"  && export
> ACCUMULO_MASTER_OPTS="${POLICY} -Xmx256m -Xms256m"
> test -z "$ACCUMULO_MONITOR_OPTS" && export
> ACCUMULO_MONITOR_OPTS="${POLICY} -Xmx128m -Xms128m"
> test -z "$ACCUMULO_GC_OPTS"      && export ACCUMULO_GC_OPTS="-Xmx256m -Xms256m"
> test -z "$ACCUMULO_LOGGER_OPTS"  && export
> ACCUMULO_LOGGER_OPTS="-Xmx128m -Xms128m"
> test -z "$ACCUMULO_GENERAL_OPTS" && export
> ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC
> -XX:CMSInitiatingOccupancyFraction=75"
> test -z "$ACCUMULO_OTHER_OPTS"   && export
> ACCUMULO_OTHER_OPTS="-Xmx128m -Xms128m"
> 
> Is 4,096Mb just too small?
> 
> On Thu, Dec 29, 2011 at 11:36 PM, Trevor Adams <tr...@gmail.com> wrote:
>> What is the output of `uname -m`, since that g++ command is still trying to
>> generate a 64bit executable (-m64). That could also explain the complaints
>> about incompatible libraries.
>> -Trevor
>> 
>> 
>> On Thu, Dec 29, 2011 at 11:31 PM, John W Vines <jo...@ugov.gov>
>> wrote:
>>> 
>>> 
>>> 
>>> ----- Original Message -----
>>> | From: "David Medinets" <da...@gmail.com>
>>> | To: "accumulo-user" <ac...@incubator.apache.org>
>>> | Sent: Thursday, December 29, 2011 6:52:47 PM
>>> | Subject: Failed to load native map library:
>>> libNativeMap-Linux-i386-32.so
>>> | I am trying to get the following command to run:
>>> |
>>> | bin/accumulo shell -u root
>>> |
>>> | and still getting the "Failed to find an available server in the list
>>> | of servers" message.
>>> |
>>> | --
>>> | -- How to make libNativeMap optional?
>>> | --
>>> |
>>> | In tserver_ubuntu20gb.debug.log, I am seeing this error:
>>> |
>>> | Failed to load native map library
>>> |
>>> /home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/lib/native/map/libNativeMap-Linux-i386-32.so
>>> | Uncaught exception in TabletServer.main, exiting
>>> |
>>> | I read through JIRA ACCUMULO-185 at
>>> |
>>> |
>>> http://www.mail-archive.com/accumulo-dev@incubator.apache.org/msg00986.html
>>> |
>>> | While the JIRA comments say the lib is optional, it does not say how
>>> | to resolve the uncaught exception. I notice that the error message
>>> | says that the tablet server is exiting.
>>> |
>>> | --
>>> | -- Compilation Attempt
>>> | --
>>> |
>>> | I switched to the C++ directory and ran make with these results:
>>> |
>>> | $ make
>>> | cd nativeMap ; make
>>> | make[1]: Entering directory
>>> |
>>> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
>>> | g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
>>> | -Wall -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
>>> | -I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
>>> | libNativeMap-Linux-amd64-64.so
>>> | org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
>>> | In file included from /usr/include/stdio.h:28:0,
>>> | from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
>>> | from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
>>> | from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
>>> | /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
>>> | file or directory
>>> | compilation terminated.
>>> | In file included from /usr/include/unistd.h:26:0,
>>> | from util.cc:17:
>>> | /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
>>> | file or directory
>>> | compilation terminated.
>>> | make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
>>> | make[1]: Leaving directory
>>> |
>>> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
>>> | make: *** [nm] Error 2
>>> |
>>> | I have the missing predefs.h file at
>>> |
>>> | /usr/include/i386-linux-gnu/bits/predefs.h
>>> |
>>> | But I don't know how to tell the accumulo make about that location.
>>> |
>>> | --
>>> |
>>> | Please let know if there is a way to resolve either of these two
>>> | issues.
>>> |
>>> | Thanks.
>>> 
>>> While this doesn't resolve the problem you have found, it is worth noting
>>> that in absence of any native map libraries the default map will be used. No
>>> configuration changes need to be made to tell the system to use the native
>>> or default maps, rather it attempts to load the native map and will fall
>>> back to the default map if necessary.
>>> 
>>> John
>> 
>> 


Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by David Medinets <da...@gmail.com>.
The output is i686.

I was looking in the wrong log file.  When I look in
tserver_ubuntu20gb.log this is what I see. I obviously have the jvm
settings wrong.

30 00:21:01,238 [tabletserver.TabletServer] ERROR: Uncaught exception
in TabletServer.main, exiting
java.lang.IllegalArgumentException: Maximum tablet server map memory
1,073,741,824 and block cache sizes 589,299,712 is too large for this
JVM configuration 261,750,784

My virtualbox instance has 4,096Mb of memory. With hadoop and
zookeeper running, this is the results of 'free -k'

$ free -k
             total       used       free     shared    buffers     cached
Mem:       4128460    2190868    1937592          0     223872    1123444
-/+ buffers/cache:     843552    3284908
Swap:      4192252          0    4192252

I am trying to change the jvm settings. So far without luck,

test -z "$ACCUMULO_TSERVER_OPTS" && export
ACCUMULO_TSERVER_OPTS="${POLICY} -Xmx256m -Xms256m -Xss128k"
test -z "$ACCUMULO_MASTER_OPTS"  && export
ACCUMULO_MASTER_OPTS="${POLICY} -Xmx256m -Xms256m"
test -z "$ACCUMULO_MONITOR_OPTS" && export
ACCUMULO_MONITOR_OPTS="${POLICY} -Xmx128m -Xms128m"
test -z "$ACCUMULO_GC_OPTS"      && export ACCUMULO_GC_OPTS="-Xmx256m -Xms256m"
test -z "$ACCUMULO_LOGGER_OPTS"  && export
ACCUMULO_LOGGER_OPTS="-Xmx128m -Xms128m"
test -z "$ACCUMULO_GENERAL_OPTS" && export
ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75"
test -z "$ACCUMULO_OTHER_OPTS"   && export
ACCUMULO_OTHER_OPTS="-Xmx128m -Xms128m"

Is 4,096Mb just too small?

On Thu, Dec 29, 2011 at 11:36 PM, Trevor Adams <tr...@gmail.com> wrote:
> What is the output of `uname -m`, since that g++ command is still trying to
> generate a 64bit executable (-m64). That could also explain the complaints
> about incompatible libraries.
> -Trevor
>
>
> On Thu, Dec 29, 2011 at 11:31 PM, John W Vines <jo...@ugov.gov>
> wrote:
>>
>>
>>
>> ----- Original Message -----
>> | From: "David Medinets" <da...@gmail.com>
>> | To: "accumulo-user" <ac...@incubator.apache.org>
>> | Sent: Thursday, December 29, 2011 6:52:47 PM
>> | Subject: Failed to load native map library:
>> libNativeMap-Linux-i386-32.so
>> | I am trying to get the following command to run:
>> |
>> | bin/accumulo shell -u root
>> |
>> | and still getting the "Failed to find an available server in the list
>> | of servers" message.
>> |
>> | --
>> | -- How to make libNativeMap optional?
>> | --
>> |
>> | In tserver_ubuntu20gb.debug.log, I am seeing this error:
>> |
>> | Failed to load native map library
>> |
>> /home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/lib/native/map/libNativeMap-Linux-i386-32.so
>> | Uncaught exception in TabletServer.main, exiting
>> |
>> | I read through JIRA ACCUMULO-185 at
>> |
>> |
>> http://www.mail-archive.com/accumulo-dev@incubator.apache.org/msg00986.html
>> |
>> | While the JIRA comments say the lib is optional, it does not say how
>> | to resolve the uncaught exception. I notice that the error message
>> | says that the tablet server is exiting.
>> |
>> | --
>> | -- Compilation Attempt
>> | --
>> |
>> | I switched to the C++ directory and ran make with these results:
>> |
>> | $ make
>> | cd nativeMap ; make
>> | make[1]: Entering directory
>> |
>> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
>> | g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
>> | -Wall -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
>> | -I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
>> | libNativeMap-Linux-amd64-64.so
>> | org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
>> | In file included from /usr/include/stdio.h:28:0,
>> | from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
>> | from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
>> | from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
>> | /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
>> | file or directory
>> | compilation terminated.
>> | In file included from /usr/include/unistd.h:26:0,
>> | from util.cc:17:
>> | /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
>> | file or directory
>> | compilation terminated.
>> | make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
>> | make[1]: Leaving directory
>> |
>> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
>> | make: *** [nm] Error 2
>> |
>> | I have the missing predefs.h file at
>> |
>> | /usr/include/i386-linux-gnu/bits/predefs.h
>> |
>> | But I don't know how to tell the accumulo make about that location.
>> |
>> | --
>> |
>> | Please let know if there is a way to resolve either of these two
>> | issues.
>> |
>> | Thanks.
>>
>> While this doesn't resolve the problem you have found, it is worth noting
>> that in absence of any native map libraries the default map will be used. No
>> configuration changes need to be made to tell the system to use the native
>> or default maps, rather it attempts to load the native map and will fall
>> back to the default map if necessary.
>>
>> John
>
>

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by Trevor Adams <tr...@gmail.com>.
What is the output of `uname -m`, since that g++ command is still trying to
generate a 64bit executable (-m64). That could also explain the complaints
about incompatible libraries.
-Trevor

On Thu, Dec 29, 2011 at 11:31 PM, John W Vines <jo...@ugov.gov>wrote:

>
>
> ----- Original Message -----
> | From: "David Medinets" <da...@gmail.com>
> | To: "accumulo-user" <ac...@incubator.apache.org>
> | Sent: Thursday, December 29, 2011 6:52:47 PM
> | Subject: Failed to load native map library: libNativeMap-Linux-i386-32.so
> | I am trying to get the following command to run:
> |
> | bin/accumulo shell -u root
> |
> | and still getting the "Failed to find an available server in the list
> | of servers" message.
> |
> | --
> | -- How to make libNativeMap optional?
> | --
> |
> | In tserver_ubuntu20gb.debug.log, I am seeing this error:
> |
> | Failed to load native map library
> |
> /home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/lib/native/map/libNativeMap-Linux-i386-32.so
> | Uncaught exception in TabletServer.main, exiting
> |
> | I read through JIRA ACCUMULO-185 at
> |
> |
> http://www.mail-archive.com/accumulo-dev@incubator.apache.org/msg00986.html
> |
> | While the JIRA comments say the lib is optional, it does not say how
> | to resolve the uncaught exception. I notice that the error message
> | says that the tablet server is exiting.
> |
> | --
> | -- Compilation Attempt
> | --
> |
> | I switched to the C++ directory and ran make with these results:
> |
> | $ make
> | cd nativeMap ; make
> | make[1]: Entering directory
> |
> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
> | g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
> | -Wall -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
> | -I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
> | libNativeMap-Linux-amd64-64.so
> | org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
> | In file included from /usr/include/stdio.h:28:0,
> | from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
> | from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
> | from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
> | /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
> | file or directory
> | compilation terminated.
> | In file included from /usr/include/unistd.h:26:0,
> | from util.cc:17:
> | /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
> | file or directory
> | compilation terminated.
> | make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
> | make[1]: Leaving directory
> |
> `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
> | make: *** [nm] Error 2
> |
> | I have the missing predefs.h file at
> |
> | /usr/include/i386-linux-gnu/bits/predefs.h
> |
> | But I don't know how to tell the accumulo make about that location.
> |
> | --
> |
> | Please let know if there is a way to resolve either of these two
> | issues.
> |
> | Thanks.
>
> While this doesn't resolve the problem you have found, it is worth noting
> that in absence of any native map libraries the default map will be used.
> No configuration changes need to be made to tell the system to use the
> native or default maps, rather it attempts to load the native map and will
> fall back to the default map if necessary.
>
> John
>

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by Billie J Rinaldi <bi...@ugov.gov>.
You have to set JAVA_HOME to be able to make the native map library.

Billie

Re: Failed to load native map library: libNativeMap-Linux-i386-32.so

Posted by John W Vines <jo...@ugov.gov>.

----- Original Message -----
| From: "David Medinets" <da...@gmail.com>
| To: "accumulo-user" <ac...@incubator.apache.org>
| Sent: Thursday, December 29, 2011 6:52:47 PM
| Subject: Failed to load native map library: libNativeMap-Linux-i386-32.so
| I am trying to get the following command to run:
| 
| bin/accumulo shell -u root
| 
| and still getting the "Failed to find an available server in the list
| of servers" message.
| 
| --
| -- How to make libNativeMap optional?
| --
| 
| In tserver_ubuntu20gb.debug.log, I am seeing this error:
| 
| Failed to load native map library
| /home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/lib/native/map/libNativeMap-Linux-i386-32.so
| Uncaught exception in TabletServer.main, exiting
| 
| I read through JIRA ACCUMULO-185 at
| 
| http://www.mail-archive.com/accumulo-dev@incubator.apache.org/msg00986.html
| 
| While the JIRA comments say the lib is optional, it does not say how
| to resolve the uncaught exception. I notice that the error message
| says that the tablet server is exiting.
| 
| --
| -- Compilation Attempt
| --
| 
| I switched to the C++ directory and ran make with these results:
| 
| $ make
| cd nativeMap ; make
| make[1]: Entering directory
| `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
| g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing
| -Wall -I/usr/lib/jvm/java-7-openjdk-i386/include/linux
| -I/usr/lib/jvm/java-7-openjdk-i386/include -m64 -o
| libNativeMap-Linux-amd64-64.so
| org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc
| In file included from /usr/include/stdio.h:28:0,
| from /usr/lib/jvm/java-7-openjdk-i386/include/jni.h:39,
| from org_apache_accumulo_server_tabletserver_NativeMap.h:18,
| from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
| /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
| file or directory
| compilation terminated.
| In file included from /usr/include/unistd.h:26:0,
| from util.cc:17:
| /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
| file or directory
| compilation terminated.
| make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
| make[1]: Leaving directory
| `/home/ubuntu/accumulo-1.5.0-incubating-SNAPSHOT/src/server/src/main/c++/nativeMap'
| make: *** [nm] Error 2
| 
| I have the missing predefs.h file at
| 
| /usr/include/i386-linux-gnu/bits/predefs.h
| 
| But I don't know how to tell the accumulo make about that location.
| 
| --
| 
| Please let know if there is a way to resolve either of these two
| issues.
| 
| Thanks.

While this doesn't resolve the problem you have found, it is worth noting that in absence of any native map libraries the default map will be used. No configuration changes need to be made to tell the system to use the native or default maps, rather it attempts to load the native map and will fall back to the default map if necessary.

John