Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-982

Upgrade: SNMP Connection Handler does not start after the upgrade

    Details

      Description

      Found using revision 8976

      After the upgrade, the SNMP Connection Handler does not start if the default security agent file is used.

      Scenario
      ********
      1. Create OpenDJ 2.4.5 instance
      $ ./OpenDJ-2.4.5/setup --cli -p 1389 --adminConnectorPort 4444 -D cn=myself -w password -b dc=com -n

      2. Enable SNMP Connection Handler
      $ ./OpenDJ-2.4.5/bin/dsconfig set-connection-handler-prop --handler-name "SNMP Connection Handler" \
      --set enabled:true --set listen-port:8085 --set opendmk-jarfile:/tmp/OpenDMK-bin/lib/jdmkrt.jar \
      -h localhost -p 4444 -X -D cn=myself -w password -n

      3. Get SNMP Connection Handler properties
      $ ./OpenDJ-2.4.5/bin/dsconfig get-connection-handler-prop --handler-name "SNMP Connection Handler" -h localhost -p 4444 -X -D cn=myself -w password -n
      Property : Value(s)
      -------------------:-----------------------------------------------
      allowed-client : -
      allowed-manager : *
      allowed-user : *
      community : OpenDS
      denied-client : -
      enabled : true
      listen-address : 0.0.0.0
      listen-port : 8085
      opendmk-jarfile : /tmp/OpenDMK-bin/lib/jdmkrt.jar
      registered-mbean : false
      security-agent-file : config/snmp/security/opends-snmp.security
      security-level : authnopriv
      trap-port : 162
      traps-community : OpenDS
      traps-destination : -

      1. Check that the security agent file exist
        $ ls ./OpenDJ-2.4.5/config/snmp/security/opends-snmp.security
        ./OpenDJ-2.4.5/config/snmp/security/opends-snmp.security

      4. Check SNMP
      $ snmpwalk -v 1 -c OpenDS@OpenDS localhost:8085
      iso.3.6.1.2.1.66.1.1.1.1 = STRING: "OpenDJ 2.4.5 - 20120220171857Z"
      iso.3.6.1.2.1.66.1.1.2.1 = STRING: "/var/tmp/t/OpenDJ-2.4.5"
      ...

      5. Stop the instance
      $ ./OpenDJ-2.4.5/bin/stop-ds

      6. Copy new binaries
      $ cp -r ./opendj/* ./OpenDJ-2.4.5/

      7. Upgrade the instance
      $ ./OpenDJ-2.4.5/upgrade -n

      8. Start the instance
      $ ./OpenDJ-2.4.5/bin/start-ds
      ...
      [10/Jun/2013:11:06:46 +0200] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381715 msg=JVM Arguments: "-Dorg.opends.server.scriptName=start-ds"
      [10/Jun/2013:11:06:47 +0200] category=JEB severity=NOTICE msgID=8847402 msg=The database backend userRoot containing 0 entries has started
      [10/Jun/2013:11:06:47 +0200] category=EXTENSIONS severity=NOTICE msgID=1507549 msg=DIGEST-MD5 SASL mechanism using a server fully qualified domain name of: csovant-PC
      [10/Jun/2013:11:06:47 +0200] category=PROTOCOL severity=SEVERE_ERROR msgID=2360761 msg=Cannot initialize the SNMP Connection Handler. Please check the configuration attributes
      [10/Jun/2013:11:06:47 +0200] category=PROTOCOL severity=NOTICE msgID=2556180 msg=Started listening for new connections on Administration Connector 0.0.0.0 port 4444
      [10/Jun/2013:11:06:47 +0200] category=PROTOCOL severity=NOTICE msgID=2556180 msg=Started listening for new connections on LDAP Connection Handler 0.0.0.0 port 1389
      [10/Jun/2013:11:06:48 +0200] category=CORE severity=NOTICE msgID=458887 msg=The Directory Server has started successfully
      [10/Jun/2013:11:06:48 +0200] category=CORE severity=NOTICE msgID=458891 msg=The Directory Server has sent an alert notification generated by class org.opends.server.core.DirectoryServer (alert type org.opends.server.DirectoryServerStarted, alert ID 458887): The Directory Server has started successfully

      9. Get SNMP Connection Handler properties
      $ ./OpenDJ-2.4.5/bin/dsconfig get-connection-handler-prop --handler-name "SNMP Connection Handler" -h localhost -p 4444 -X -D cn=myself -w password -n
      Property : Value(s)
      -------------------:-----------------------------------------------
      allowed-client : -
      allowed-manager : *
      allowed-user : *
      community : OpenDJ
      denied-client : -
      enabled : true
      listen-address : 0.0.0.0
      listen-port : 8085
      opendmk-jarfile : /tmp/OpenDMK-bin/lib/jdmkrt.jar
      registered-mbean : false
      security-agent-file : config/snmp/security/opendj-snmp.security
      security-level : authnopriv
      trap-port : 162
      traps-community : OpenDJ
      traps-destination : -

      10. Check that the security agent file file exist
      $ ls ./OpenDJ-2.4.5/config/snmp/security/opendj-snmp.security
      ls: cannot access ./OpenDJ-2.4.5/config/snmp/security/opendj-snmp.security: No such file or directory

      $ ls ./OpenDJ-2.4.5/config/snmp/security/opends-snmp.security
      ./OpenDJ-2.4.5/config/snmp/security/opends-snmp.security

      => the default security agent file can be modified by the user, maybe the upgrade tool could rename this file ("config/snmp/security/opends-snmp.security") to "config/snmp/security/opendj-snmp.security"

        Attachments

          Activity

            People

            • Assignee:
              violette Violette Roche Montane
              Reporter:
              csovant Christophe Sovant
              QA Assignee:
              Christophe Sovant
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: