Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-10681

elasticsearch6.ElasticsearchSinkITCase fails if wrong JNA library installed

    XMLWordPrintableJSON

Details

    Description

      The elasticsearch6.ElasticsearchSinkITCase fails on systems where a wrong JNA library is installed.

      There is an incompatible JNA native library installed on this system
      Expected: 5.2.0
      Found:    4.0.0
      /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib.
      To resolve this issue you may do one of the following:
       - remove or uninstall the offending library
       - set the system property jna.nosys=true
       - set jna.boot.library.path to include the path to the version of the
         jnidispatch library included with the JNA jar file you are using
      
              at com.sun.jna.Native.<clinit>(Native.java:199)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:264)
              at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45)
              at org.elasticsearch.bootstrap.BootstrapInfo.isMemoryLocked(BootstrapInfo.java:50)
              at org.elasticsearch.monitor.process.ProcessProbe.processInfo(ProcessProbe.java:130)
              at org.elasticsearch.monitor.process.ProcessService.<init>(ProcessService.java:44)
              at org.elasticsearch.monitor.MonitorService.<init>(MonitorService.java:48)
              at org.elasticsearch.node.Node.<init>(Node.java:363)
              at org.apache.flink.streaming.connectors.elasticsearch.EmbeddedElasticsearchNodeEnvironmentImpl$PluginNode.<init>(EmbeddedElasticsearchNodeEnvironmentImpl.java:85)
              at org.apache.flink.streaming.connectors.elasticsearch.EmbeddedElasticsearchNodeEnvironmentImpl.start(EmbeddedElasticsearchNodeEnvironmentImpl.java:53)
              at org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkTestBase.prepare(ElasticsearchSinkTestBase.java:73)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
              at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
              at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
              at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
              at org.junit.rules.RunRules.evaluate(RunRules.java:20)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
              at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
              at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:113)
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
      

      I propose to solve the problem by setting the system property jna.nosys=true to prefer the bundled JNA library.

      Attachments

        Issue Links

          Activity

            People

              trohrmann Till Rohrmann
              trohrmann Till Rohrmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: