Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.8
    • Fix Version/s: 1.9.90
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Environment:
      FreeBSD 8.2 AMD64
      openjdk version "1.6.0"
      OpenJDK Runtime Environment (build 1.6.0-b22)
      OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
      iplike-2.0.2
      jicmp-1.2.0-2

      Description

      OpenNMS discovery process fails one a range is added to "Home / Admin / Discovery / Modify Configuration"

      1. discovery.log
        12 kB
        Sevan Janiyan
      2. output.log
        15 kB
        Sevan Janiyan

        Activity

        Hide
        Matt Brozowski added a comment -

        You are definitely configured to use the JNA pinger which you may not be intending since you commented on using jicmp... however...

        can you grep for 43 in you /usr/include/sys/errno.h and pasted it here....

        most likely is will return EINVAL

        if it does then look in output.log for a BSDSocket.create(N, N, N) and compare those numbers with the ones printed out by the printConstants binary in the 1.9 source tree.

        Show
        Matt Brozowski added a comment - You are definitely configured to use the JNA pinger which you may not be intending since you commented on using jicmp... however... can you grep for 43 in you /usr/include/sys/errno.h and pasted it here.... most likely is will return EINVAL if it does then look in output.log for a BSDSocket.create(N, N, N) and compare those numbers with the ones printed out by the printConstants binary in the 1.9 source tree.
        Hide
        Sevan Janiyan added a comment -

        #define EPROTONOSUPPORT 43 /* Protocol not supported */
        org.opennms.jicmp.jna.BSDV4NativeSocket(2, 3, 1)
        org.opennms.jicmp.jna.BSDV6NativeSocket(28, 3, 58)

        Show
        Sevan Janiyan added a comment - #define EPROTONOSUPPORT 43 /* Protocol not supported */ org.opennms.jicmp.jna.BSDV4NativeSocket(2, 3, 1) org.opennms.jicmp.jna.BSDV6NativeSocket(28, 3, 58)
        Hide
        Sevan Janiyan added a comment -

        Output from printConstants

        — socket constants —
        SOCK_DGRAM = 2
        SOCK_RAW = 3

        — ipv4 constants —
        AF_INET = 2
        PF_INET = 2
        IPPROTO_ICMP = 1
        IPPROTO_UDP = 17

        — ipv6 constants —
        AF_INET6 = 28
        PF_INET6 = 28
        IPPROTO_ICMPV6 = 58

        — sockaddr sizes —
        sizeof(sockaddr_in) = 16
        sizeof(sockaddr_in6) = 28

        Show
        Sevan Janiyan added a comment - Output from printConstants — socket constants — SOCK_DGRAM = 2 SOCK_RAW = 3 — ipv4 constants — AF_INET = 2 PF_INET = 2 IPPROTO_ICMP = 1 IPPROTO_UDP = 17 — ipv6 constants — AF_INET6 = 28 PF_INET6 = 28 IPPROTO_ICMPV6 = 58 — sockaddr sizes — sizeof(sockaddr_in) = 16 sizeof(sockaddr_in6) = 28
        Hide
        Sevan Janiyan added a comment -

        Just to clarify for anyone referring back to this.
        IPv6 is switched off in the kernel, OpenNMS is configured to discover IPv4 address only. There is nothing configured IPv6 wise on the system.

        Running
        java -jar org.opennms.core.jicmpv6-1.9.8-SNAPSHOT.jar $SOME-IPv4-ADDRESS
        as root works fine.

        Show
        Sevan Janiyan added a comment - Just to clarify for anyone referring back to this. IPv6 is switched off in the kernel, OpenNMS is configured to discover IPv4 address only. There is nothing configured IPv6 wise on the system. Running java -jar org.opennms.core.jicmpv6-1.9.8-SNAPSHOT.jar $SOME-IPv4-ADDRESS as root works fine.
        Hide
        Sevan Janiyan added a comment -

        As a temp workaround I've switch to using the JniPinger by setting
        org.opennms.netmgt.icmp.pingerClass=org.opennms.netmgt.icmp.jni.JniPinger
        in etc/opennms.properties

        Show
        Sevan Janiyan added a comment - As a temp workaround I've switch to using the JniPinger by setting org.opennms.netmgt.icmp.pingerClass=org.opennms.netmgt.icmp.jni.JniPinger in etc/opennms.properties
        Hide
        Andy Ellsworth added a comment -

        Seeing similar behavior for JNA pinger in 1.9.90 snapshot.

        • CentOS 5.6 system with ipv6 disabled globally
        • Nodes manually provisioned via provisioning groups (no discovery)
        • All ICMP polling fails, pollerd.log shows the following:

        2011-06-16 23:05:36,204 DEBUG [PollerScheduler-30 Pool-fiber0] IcmpMonitor: failed to ping /10.1.1.1
        java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedConstructorAccessor180.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.opennms.jicmp.jna.NativeDatagramSocket.create(NativeDatagramSocket.java:74)
        at org.opennms.netmgt.icmp.jna.V6Pinger.<init>(V6Pinger.java:52)
        at org.opennms.netmgt.icmp.jna.JnaIcmpMessenger.<init>(JnaIcmpMessenger.java:53)
        at org.opennms.netmgt.icmp.jna.JnaPinger.initialize(JnaPinger.java:65)
        at org.opennms.netmgt.icmp.jna.JnaPinger.ping(JnaPinger.java:81)
        at org.opennms.netmgt.icmp.jna.JnaPinger.ping(JnaPinger.java:103)
        at org.opennms.netmgt.poller.monitors.IcmpMonitor.poll(IcmpMonitor.java:117)
        at org.opennms.netmgt.poller.pollables.LatencyStoringServiceMonitorAdaptor.poll(LatencyStoringServiceMonitorAdaptor.java:116)
        at org.opennms.netmgt.poller.pollables.PollableServiceConfig.poll(PollableServiceConfig.java:116)
        at org.opennms.netmgt.poller.pollables.PollableService.poll(PollableService.java:185)
        at org.opennms.netmgt.poller.pollables.PollableElement.poll(PollableElement.java:299)
        at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:312)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:234)
        at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:319)
        at org.opennms.netmgt.poller.pollables.PollableInterface.poll(PollableInterface.java:212)
        at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:312)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:234)
        at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:319)
        at org.opennms.netmgt.poller.pollables.PollableNode$3.run(PollableNode.java:302)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:234)
        at org.opennms.netmgt.poller.pollables.PollableNode.doPoll(PollableNode.java:305)
        at org.opennms.netmgt.poller.pollables.PollableElement.doPoll(PollableElement.java:190)
        at org.opennms.netmgt.poller.pollables.PollableService.doPoll(PollableService.java:218)
        at org.opennms.netmgt.poller.pollables.PollableService$PollRunner.run(PollableService.java:64)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270)
        at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256)
        at org.opennms.netmgt.poller.pollables.PollableService.doRun(PollableService.java:390)
        at org.opennms.netmgt.poller.pollables.PollableService.run(PollableService.java:371)
        at org.opennms.netmgt.scheduler.Schedule.run(Schedule.java:138)
        at org.opennms.netmgt.scheduler.Schedule$ScheduleEntry.run(Schedule.java:83)
        at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:295)
        at org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:427)
        at java.lang.Thread.run(Thread.java:662)
        Caused by: com.sun.jna.LastErrorException: errno was 97
        at org.opennms.jicmp.jna.UnixV6NativeSocket.socket(Native Method)
        at org.opennms.jicmp.jna.UnixV6NativeSocket.<init>(UnixV6NativeSocket.java:54)
        ... 46 more

        Show
        Andy Ellsworth added a comment - Seeing similar behavior for JNA pinger in 1.9.90 snapshot. CentOS 5.6 system with ipv6 disabled globally Nodes manually provisioned via provisioning groups (no discovery) All ICMP polling fails, pollerd.log shows the following: 2011-06-16 23:05:36,204 DEBUG [PollerScheduler-30 Pool-fiber0] IcmpMonitor: failed to ping /10.1.1.1 java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor180.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.opennms.jicmp.jna.NativeDatagramSocket.create(NativeDatagramSocket.java:74) at org.opennms.netmgt.icmp.jna.V6Pinger.<init>(V6Pinger.java:52) at org.opennms.netmgt.icmp.jna.JnaIcmpMessenger.<init>(JnaIcmpMessenger.java:53) at org.opennms.netmgt.icmp.jna.JnaPinger.initialize(JnaPinger.java:65) at org.opennms.netmgt.icmp.jna.JnaPinger.ping(JnaPinger.java:81) at org.opennms.netmgt.icmp.jna.JnaPinger.ping(JnaPinger.java:103) at org.opennms.netmgt.poller.monitors.IcmpMonitor.poll(IcmpMonitor.java:117) at org.opennms.netmgt.poller.pollables.LatencyStoringServiceMonitorAdaptor.poll(LatencyStoringServiceMonitorAdaptor.java:116) at org.opennms.netmgt.poller.pollables.PollableServiceConfig.poll(PollableServiceConfig.java:116) at org.opennms.netmgt.poller.pollables.PollableService.poll(PollableService.java:185) at org.opennms.netmgt.poller.pollables.PollableElement.poll(PollableElement.java:299) at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:312) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:234) at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:319) at org.opennms.netmgt.poller.pollables.PollableInterface.poll(PollableInterface.java:212) at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:312) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:234) at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:319) at org.opennms.netmgt.poller.pollables.PollableNode$3.run(PollableNode.java:302) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:234) at org.opennms.netmgt.poller.pollables.PollableNode.doPoll(PollableNode.java:305) at org.opennms.netmgt.poller.pollables.PollableElement.doPoll(PollableElement.java:190) at org.opennms.netmgt.poller.pollables.PollableService.doPoll(PollableService.java:218) at org.opennms.netmgt.poller.pollables.PollableService$PollRunner.run(PollableService.java:64) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:270) at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:256) at org.opennms.netmgt.poller.pollables.PollableService.doRun(PollableService.java:390) at org.opennms.netmgt.poller.pollables.PollableService.run(PollableService.java:371) at org.opennms.netmgt.scheduler.Schedule.run(Schedule.java:138) at org.opennms.netmgt.scheduler.Schedule$ScheduleEntry.run(Schedule.java:83) at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:295) at org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:427) at java.lang.Thread.run(Thread.java:662) Caused by: com.sun.jna.LastErrorException: errno was 97 at org.opennms.jicmp.jna.UnixV6NativeSocket.socket(Native Method) at org.opennms.jicmp.jna.UnixV6NativeSocket.<init>(UnixV6NativeSocket.java:54) ... 46 more
        Hide
        Matt Brozowski added a comment -

        Can you grep /usr/include/sys/errno.h for what error code 97 is?

        Show
        Matt Brozowski added a comment - Can you grep /usr/include/sys/errno.h for what error code 97 is?
        Hide
        Andy Ellsworth added a comment -

        #define EAFNOSUPPORT 97 /* Address family not supported by protocol */

        Show
        Andy Ellsworth added a comment - #define EAFNOSUPPORT 97 /* Address family not supported by protocol */
        Hide
        Seth Leger added a comment -

        Ben put in some code that will evaluate whether IPv6 and IPv4 sockets can be created during the initialization of the ICMP libraries so we believe that this problem was fixed in 1.9.90. Please reopen if you can reverify that it occurs in this release. Thanks!

        Show
        Seth Leger added a comment - Ben put in some code that will evaluate whether IPv6 and IPv4 sockets can be created during the initialization of the ICMP libraries so we believe that this problem was fixed in 1.9.90. Please reopen if you can reverify that it occurs in this release. Thanks!

          People

          • Assignee:
            Benjamin Reed
            Reporter:
            Sevan Janiyan
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development