Ad Widget

Collapse

Error doing snmp_open()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Icenode
    Junior Member
    • Apr 2009
    • 27

    #1

    Error doing snmp_open()

    After an upgrade to net-snmp-5.5 my SNMP checks no longer work. I've googled my problem and read all the threads on here in english that looked similar but I can't figure it out. I keep getting "Error doing snmp_open()"

    This upgrade was forced due to a corrupted file from a power outage that fsck didn't fix. So to be honest, I'm really not even sure what version of net-snmp I was on before.


    Log in debug mode.

    In snmp_open_session()
    SNMP [[email protected]:161:161]
    Error doing snmp_open()
    End of get_value_snmp():NOTSUPPORTED
    Item [Monolith:SystemUptime] error: Error doing snmp_open()

    Is it suppose to have the port listed twice, or is this a possible cause of why the connection isn't being made?


    Thanks for any help in advance.
  • Icenode
    Junior Member
    • Apr 2009
    • 27

    #2
    Guess it might help if you had more info about my setup.

    FreeBSD 6.1-RELEASE

    zabbix-agent-1.8.2_1,2
    zabbix-frontend-1.8.2_2,2
    zabbix-server-1.8.2_2,2

    net-snmp-5.5

    All packages were installed from ports.

    Comment

    • ruswold
      Senior Member
      • Mar 2010
      • 210

      #3
      Originally posted by Icenode
      Guess it might help if you had more info about my setup.

      FreeBSD 6.1-RELEASE

      zabbix-agent-1.8.2_1,2
      zabbix-frontend-1.8.2_2,2
      zabbix-server-1.8.2_2,2

      net-snmp-5.5

      All packages were installed from ports.
      Maybe you need recompile zabbix-server port?
      Last edited by ruswold; 08-07-2010, 17:02.

      Comment

      • Icenode
        Junior Member
        • Apr 2009
        • 27

        #4
        Deinstalled and reinstalled both net-snmp and zabbix-server ports as well. I didn't change any of my config settings, I just reinstalled with the config settings I previously used.

        Also since I administer more Windows servers than BSD, I of course rebooted hoping for it to fix itself.

        Can't see any change in behavior from any of it.


        Edit: 13:20 CST - Deinstalled both ports again. Ran make install clean for zabbix-server and let it install net-snmp port for me. Started the zabbix-server processes again, same result.
        Last edited by Icenode; 08-07-2010, 20:05.

        Comment

        • ruswold
          Senior Member
          • Mar 2010
          • 210

          #5
          Originally posted by Icenode
          Deinstalled and reinstalled both net-snmp and zabbix-server ports as well. I didn't change any of my config settings, I just reinstalled with the config settings I previously used.

          Also since I administer more Windows servers than BSD, I of course rebooted hoping for it to fix itself.

          Can't see any change in behavior from any of it.


          Edit: 13:20 CST - Deinstalled both ports again. Ran make install clean for zabbix-server and let it install net-snmp port for me. Started the zabbix-server processes again, same result.
          If you try recreate snmp item, any changes?
          Or manually check snmp: snmpget -c public -v 1 HOST .1.3.6.1.2.1.1.3.0 , returned value system uptime
          Last edited by ruswold; 09-07-2010, 07:41.

          Comment

          • Icenode
            Junior Member
            • Apr 2009
            • 27

            #6
            Recreated one of my checks, same error.

            Below worked great:
            snmpget -c bflsnmp -v 1 %hostname% .1.3.6.1.2.1.1.3.0

            DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (13856344) 1 day, 14:29:23.44

            Is it possible for someone to look in a zabbix log in debug mode and see if the SNMP entry lists the port twice? I'm curious if that's the correct syntax.

            SNMP [%hostname%@x.x.x.x:161:161]


            ruswold: Thanks for your help, keep any ideas coming.

            Comment

            • ruswold
              Senior Member
              • Mar 2010
              • 210

              #7
              Originally posted by Icenode
              Recreated one of my checks, same error.

              Below worked great:
              snmpget -c bflsnmp -v 1 %hostname% .1.3.6.1.2.1.1.3.0

              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (13856344) 1 day, 14:29:23.44

              Is it possible for someone to look in a zabbix log in debug mode and see if the SNMP entry lists the port twice? I'm curious if that's the correct syntax.

              SNMP [%hostname%@x.x.x.x:161:161]


              ruswold: Thanks for your help, keep any ideas coming.
              I set debuglevel=4 in my zabbix and i see
              SNMP [[email protected]:161] where public - community, 10.10.3.2 - IP Host

              Check you snmp item. I think you must set community to bflsnmp.

              Comment

              • Icenode
                Junior Member
                • Apr 2009
                • 27

                #8
                I'm sorry, your correct about the community, it is actually showing bflsnmp, i mistakenly put hostname. I hadn't had my morning caffeine yet.

                If you copy and pasted from your log, I see that it doesn't have your SNMP port listed twice like mine does.

                SNMP [[email protected]:161]
                SNMP [[email protected]:161:161]


                If that's correct, I suspect this is my problem, but what is causing the double entry of my port # for SNMP checks? If ruswold confirms this is straight from his log, could a developer please comment?
                Last edited by Icenode; 09-07-2010, 20:17.

                Comment

                • ruswold
                  Senior Member
                  • Mar 2010
                  • 210

                  #9
                  Originally posted by Icenode
                  I'm sorry, your correct about the community, it is actually showing bflsnmp, i mistakenly put hostname. I hadn't had my morning caffeine yet.

                  If you copy and pasted from your log, I see that it doesn't have your SNMP port listed twice like mine does.

                  SNMP [[email protected]:161]
                  SNMP [[email protected]:161:161]

                  If that's correct, I suspect this is my problem, but what is causing the double entry of my port # for SNMP checks? If ruswold confirms this is straight from his log, could a developer please comment?
                  You may try also use: zabbix_get -sHOST -kITEM

                  Comment

                  • Icenode
                    Junior Member
                    • Apr 2009
                    • 27

                    #10
                    zabbix_get seems to be trying to query a zabbix agent. Is there a way to have it perform an SNMP check?

                    By default it seems to be looking for port 10050 and times out. I specify port 161 and it just says connection refused. Since I am able to SNMPGET and SNMPWALK this box I assume the reason to be because zabbix_get isn't using SNMP.

                    zabbix_get -sx.x.x.x -kSystemUptime
                    zabbix_get [79045]: Timeout while executing operation.

                    zabbix_get -sx.x.x.x -p 161 -kSystemUptime
                    zabbix_get [79224]: Get value error: Cannot connect to [x.x.x.x:161] [Connection refused]

                    Still no developers able to confirm rather or not the SNMP connect string I'm seeing in my log is bugged? It really seems like the issue is SNMP is never connecting to the host, and if the port isn't suppose to be inserted in the connection string twice, I don't see how that couldn't be causing my problem. My only issue is, I don't know of a way to test my theory.

                    Comment

                    • ruswold
                      Senior Member
                      • Mar 2010
                      • 210

                      #11
                      http://www.zabbix.com/forum/showthread.php?t=5117 - the same problem
                      DNS field of host is empty. Check it.

                      Comment

                      • Icenode
                        Junior Member
                        • Apr 2009
                        • 27

                        #12
                        Yeah, I had read that and entered in the DNS names even though I have it check by IP. This has been in for all of our testing.

                        I was using the short DNS name just like I do for every other server, so I decided to try the FQDN just incase. Same results, so I am changing it back to match every other server.

                        Comment

                        • Icenode
                          Junior Member
                          • Apr 2009
                          • 27

                          #13
                          Resolved the issue by downgrading to NET-SNMP 5.2.1.2

                          Zabbix 1.8.2_2 is apparently not compatible with NET-SNMP 5.5

                          This thread shows that Zabbix 1.4.x was not compatible with NET-SNMP 5.4.1


                          I did not step down in a controlled fashion to find out where the compatibility ended. I tried 5.3.4 and was unable to get it to install for some reason, so I tried 5.2.1.2 next and it worked.

                          There needs to be a compatibility list put together by the development team so users know not to upgrade past a certain point.

                          Comment

                          • dba
                            Junior Member
                            • Jul 2010
                            • 1

                            #14
                            zabbix-server-1.8.2_2 works well with net-snmp-5.4.2.1.

                            Comment

                            • VinhHD
                              Junior Member
                              • Jul 2010
                              • 1

                              #15
                              got same problem here
                              i had 3 switch cisco
                              2 switches are good but another one is not connect Timeout while connecting to [x.x.x.x:161]
                              these 3 switches are separated,weren't grouped in any tamplates
                              otherwise,i'm sure that items in my unmonitored switch are well-configured ( community string,key,...), as well as cconfiguration in that switch
                              so, any idea ?

                              Comment

                              Working...