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

The opennms.bat doesn't work for stopping OpenNMS and the Temp directory is not quoted

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14.0.0
    • Component/s: Command-Line Tools
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      The opennms.bat file is generated like this:

      "C:\Program Files\Java\jdk1.7.0_45\bin\java"^
          -Xmx512m -XX:MaxPermSize=256m^
          -XX:+HeapDumpOnOutOfMemoryError^
          -DisThreadContextMapInheritable=true^
          -Dopennms.home="C:/Program Files/OpenNMS"^
          -Djava.endorsed.dirs="C:/Program Files/OpenNMS/lib/endorsed"^
          -Djava.io.tmpdir=C:/Program Files/OpenNMS/data/tmp^
          -Dcom.sun.management.jmxremote.port=18980^
          -Dcom.sun.management.jmxremote.ssl=false^
          -Dcom.sun.management.jmxremote.authenticate=false^
          -jar "C:/Program Files/OpenNMS/lib/opennms_bootstrap.jar" %*
      

      The java.io.tmpdir is not quoted, so it will brake the execution. It should be:

          -Djava.io.tmpdir="C:/Program Files/OpenNMS/data/tmp"^
      

      Also, in order to stop OpenNMS, you cannot pass the JMX entries, in other word the correct stop command should be:

      "C:\Program Files\Java\jdk1.7.0_45\bin\java"^
          -Xmx512m -XX:MaxPermSize=256m^
          -XX:+HeapDumpOnOutOfMemoryError^
          -DisThreadContextMapInheritable=true^
          -Dopennms.home="C:/Program Files/OpenNMS"^
          -Djava.endorsed.dirs="C:/Program Files/OpenNMS/lib/endorsed"^
          -Djava.io.tmpdir="C:/Program Files/OpenNMS/data/tmp"^
          -jar "C:/Program Files/OpenNMS/lib/opennms_bootstrap.jar" stop
      

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: