Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-8615

JNA Pinger fails when run by unprivileged user

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 18.0.0
    • Fix Version/s: 19.0.0
    • Component/s: Architecture
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      The Camel Discovery tests are failing on our Bamboo cluster because of an exception inside JNA:

      build	18-Jan-2016 14:12:08	2016-01-18 14:12:08,350 DEBUG [Camel (discoveryCamelContext) thread #5 - JmsConsumer[Location-LOC1]] org.opennms.netmgt.discovery.actors.Discoverer - Error pinging [4, 2, 2, 2]
      build	18-Jan-2016 14:12:08	org.opennms.netmgt.icmp.IcmpMessengerIOException: IPv4 and IPv6 are not available.
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.icmp.jna.JnaIcmpMessenger.<init>(JnaIcmpMessenger.java:75)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.icmp.jna.JnaPinger.initialize(JnaPinger.java:71)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.icmp.jna.JnaPinger.ping(JnaPinger.java:141)
      build	18-Jan-2016 14:12:08		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      build	18-Jan-2016 14:12:08		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      build	18-Jan-2016 14:12:08		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      build	18-Jan-2016 14:12:08		at java.lang.reflect.Method.invoke(Method.java:497)
      build	18-Jan-2016 14:12:08		at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
      build	18-Jan-2016 14:12:08		at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
      build	18-Jan-2016 14:12:08		at com.sun.proxy.$Proxy43.ping(Unknown Source)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.discovery.actors.Discoverer.ping(Discoverer.java:107)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.discovery.actors.Discoverer.lambda$discover$5(Discoverer.java:88)
      build	18-Jan-2016 14:12:08		at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
      build	18-Jan-2016 14:12:08		at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.discovery.actors.Discoverer.discover(Discoverer.java:88)
      build	18-Jan-2016 14:12:08		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      build	18-Jan-2016 14:12:08		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      build	18-Jan-2016 14:12:08		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      build	18-Jan-2016 14:12:08		at java.lang.reflect.Method.invoke(Method.java:497)
      build	18-Jan-2016 14:12:08		at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408)
      build	18-Jan-2016 14:12:08		at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279)
      build	18-Jan-2016 14:12:08		at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)
      build	18-Jan-2016 14:12:08		at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:167)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.interceptor.Debug$1.process(Debug.java:50)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
      build	18-Jan-2016 14:12:08		at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
      build	18-Jan-2016 14:12:08		at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
      build	18-Jan-2016 14:12:08		at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1102)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1094)
      build	18-Jan-2016 14:12:08		at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:991)
      build	18-Jan-2016 14:12:08		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      build	18-Jan-2016 14:12:08		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      build	18-Jan-2016 14:12:08		at java.lang.Thread.run(Thread.java:745)
      build	18-Jan-2016 14:12:08	Caused by: java.lang.reflect.InvocationTargetException
      build	18-Jan-2016 14:12:08		at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      build	18-Jan-2016 14:12:08		at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      build	18-Jan-2016 14:12:08		at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      build	18-Jan-2016 14:12:08		at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      build	18-Jan-2016 14:12:08		at org.opennms.jicmp.jna.NativeDatagramSocket.create(NativeDatagramSocket.java:75)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.icmp.jna.V4Pinger.<init>(V4Pinger.java:57)
      build	18-Jan-2016 14:12:08		at org.opennms.netmgt.icmp.jna.JnaIcmpMessenger.<init>(JnaIcmpMessenger.java:57)
      build	18-Jan-2016 14:12:08		... 44 more
      build	18-Jan-2016 14:12:08	Caused by: com.sun.jna.LastErrorException: [1] 蠮À
      build	18-Jan-2016 14:12:08		at org.opennms.jicmp.jna.UnixV4NativeSocket.socket(Native Method)
      build	18-Jan-2016 14:12:08		at org.opennms.jicmp.jna.UnixV4NativeSocket.<init>(UnixV4NativeSocket.java:51)
      build	18-Jan-2016 14:12:08		... 51 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ranger Benjamin Reed
              Reporter:
              seth Seth Leger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: