[
https://issues.apache.org/jira/browse/HADOOP-9205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan A. Veselovsky updated HADOOP-9205:
---------------------------------------
Resolution: Invalid
Status: Resolved (was: Patch Available)
The described problem appears to be reproducible *only* on JDKs 7 patched in
order to enable privileged ports (<1024) usage by non-root users via linux
capabilities. (The exact patching proc looks like the folowing:
patchelf --set-rpath ${J7_HOME}/jre/lib/amd64/jli ${J7_HOME}/bin/java
setcap cap_net_bind_service=+epi ${J7_HOME}/bin/java
patchelf --set-rpath ${J7_HOME}/jre/lib/amd64/jli ${J7_HOME}/jre/bin/java
setcap cap_net_bind_service=+epi ${J7_HOME}/jre/bin/java
This patching is needed to run some security tests because they use <1024
ports, and there is no simple way to re-configure these ports to higher values.)
So, the problem described in this issue appears to be a side effect of this
patch. On a clean JDK 7 installed from scratch the problem is *not*
reproducible, as both Thomas and Kihwal stated.
The command to verify:
mvn clean test -Pnative -Dtest=org.apache.hadoop.util.TestNativeCodeLoader
-Drequire.test.libhadoop=true
So, I'm closing this issue as invalid.
Sorry for this mess and many thanks for the provided information.
> Java7: path to native libraries should be passed to tests via
> -Djava.library.path rather than env.LD_LIBRARY_PATH
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-9205
> URL: https://issues.apache.org/jira/browse/HADOOP-9205
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
> Reporter: Ivan A. Veselovsky
> Assignee: Ivan A. Veselovsky
> Attachments: HADOOP-9205.patch
>
>
> Currently the path to native libraries is passed to unit tests via
> environment variable LD_LIBRARTY_PATH. This is okay for Java6, but does not
> work for Java7, since Java7 ignores this environment variable.
> So, to run the tests with native implementation on Java7 one needs to pass
> the paths to native libs via -Djava.library.path system property rather than
> the LD_LIBRARY_PATH env variable.
> The suggested patch fixes the problem via setting the paths to native libs
> using both LD_LIBRARY_PATH and -Djava.library.path property. This way the
> tests work equally on both Java6 and Java7.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira