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

Start-ds on Windows ignores commented start-ds.java-args lines

    Details

    • Type: Bug
    • Status: Dev backlog
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.5.2, 6.5.1, 6.5.0, 6.0.0, 5.5.2, 5.5.0, 5.5.1, 4.0.0, 7.0.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows Server

      Description

      If the java.properties file contains more than one start-ds.java-args, and the commented out "start-ds.java-args" line doesn't have a space between the # and the start of the parameter, the DS will use the commented start-ds.java-args

      Example:

      Two start-ds.java-args lines with the second (containing bad-gc.log) being commented out.  When the DS is started using the badgc.log (commented-out) line.

      start-ds.java-args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCCause -Xloggc:C:\70\opendj1\logs\good-gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=8K
      
      #start-ds.java-args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCCause -Xloggc:E:\data\bad-gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=8K

      Startup

      PS C:\70> cp "E:\java.properties" C:\70\opendj1\config\
      
      PS C:\70> C:\70\opendj1\bat\stop-ds --restart
      Stopping Server...
      [26/Jun/2019:13:17:04 -0700] category=CORE severity=NOTICE msgID=134 msg=ForgeRock Directory Services 7.0.0-SNAPSHOT (bu
      ild 20190626131546, revision number 82d80289e000d9c96c445c007aeb2a6a4d5e1186) starting up
      [26/Jun/2019:13:17:04 -0700] category=JVM severity=NOTICE msgID=21 msg=Installation Directory:  C:\70\opendj1
      [26/Jun/2019:13:17:04 -0700] category=JVM severity=NOTICE msgID=23 msg=Instance Directory:      C:\70\opendj1
      [26/Jun/2019:13:17:04 -0700] category=JVM severity=NOTICE msgID=17 msg=JVM Information: 1.8.0_211-b12 by Oracle Corporat
      ion, 64-bit architecture, 948764672 bytes heap size
      [26/Jun/2019:13:17:04 -0700] category=JVM severity=NOTICE msgID=18 msg=JVM Host: opendjexample.local default/MASTER100,
      running Windows Server 2012 6.2 amd64, 3919106048 bytes physical memory size, number of processors available 1
      [26/Jun/2019:13:17:04 -0700] category=JVM severity=NOTICE msgID=19 msg=JVM Arguments: "-XX:+PrintGCDetails", "-XX:+Print
      GCTimeStamps", "-XX:+PrintGCDateStamps", "-XX:+PrintGCCause", "-Xloggc:E:\data\bad-gc.log", "-XX:+UseGCLogFileRotation",
       "-XX:NumberOfGCLogFiles=5", "-XX:GCLogFileSize=8K", "-Dorg.opends.server.scriptName=start-ds"

      If however, the commented line has a single space after the comment, the server uses the good-gc.log startup line.

      start-ds.java-args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCCause -Xloggc:C:\70\opendj1\logs\good-gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=8K
      
      # start-ds.java-args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCCause -Xloggc:E:\data\bad-gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=8K

      Startup

      PS C:\70> cp "E:\java.properties" C:\70\opendj1\config\
      PS C:\70> C:\70\opendj1\bat\stop-ds --restart
      Stopping Server...
      [26/Jun/2019:13:19:26 -0700] category=CORE severity=NOTICE msgID=134 msg=ForgeRock Directory Services 7.0.0-SNAPSHOT (bu
      ild 20190626131546, revision number 82d80289e000d9c96c445c007aeb2a6a4d5e1186) starting up
      [26/Jun/2019:13:19:26 -0700] category=JVM severity=NOTICE msgID=21 msg=Installation Directory:  C:\70\opendj1
      [26/Jun/2019:13:19:26 -0700] category=JVM severity=NOTICE msgID=23 msg=Instance Directory:      C:\70\opendj1
      [26/Jun/2019:13:19:26 -0700] category=JVM severity=NOTICE msgID=17 msg=JVM Information: 1.8.0_211-b12 by Oracle Corporat
      ion, 64-bit architecture, 948764672 bytes heap size
      [26/Jun/2019:13:19:26 -0700] category=JVM severity=NOTICE msgID=18 msg=JVM Host: opendjexample.local default/MASTER100,
      running Windows Server 2012 6.2 amd64, 3919106048 bytes physical memory size, number of processors available 1
      [26/Jun/2019:13:19:26 -0700] category=JVM severity=NOTICE msgID=19 msg=JVM Arguments: "-XX:+PrintGCDetails", "-XX:+Print
      GCTimeStamps", "-XX:+PrintGCDateStamps", "-XX:+PrintGCCause", "-Xloggc:C:\70\opendj1\logs\good-gc.log", "-XX:+UseGCLogFi
      leRotation", "-XX:NumberOfGCLogFiles=5", "-XX:GCLogFileSize=8K", "-Dorg.opends.server.scriptName=start-ds"

      The above is not seen on Unix systems.

      Additionally, if the uncommented start-ds.java-args comes after the commented one, then it will start fine with the (goodgc.log) proper parameters.

      #start-ds.java-args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCCause -Xloggc:E:\data\bad-gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=8K
      
      start-ds.java-args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCCause -Xloggc:C:\70\opendj1\logs\good-gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=8K

      Startup

      PS C:\70> cp "E:\java.properties" C:\70\opendj1\config\
      PS C:\70> C:\70\opendj1\bat\stop-ds --restart
      Stopping Server...
      [26/Jun/2019:13:24:21 -0700] category=CORE severity=NOTICE msgID=134 msg=ForgeRock Directory Services 7.0.0-SNAPSHOT (bu
      ild 20190626131546, revision number 82d80289e000d9c96c445c007aeb2a6a4d5e1186) starting up
      [26/Jun/2019:13:24:21 -0700] category=JVM severity=NOTICE msgID=21 msg=Installation Directory:  C:\70\opendj1
      [26/Jun/2019:13:24:21 -0700] category=JVM severity=NOTICE msgID=23 msg=Instance Directory:      C:\70\opendj1
      [26/Jun/2019:13:24:21 -0700] category=JVM severity=NOTICE msgID=17 msg=JVM Information: 1.8.0_211-b12 by Oracle Corporat
      ion, 64-bit architecture, 948764672 bytes heap size
      [26/Jun/2019:13:24:21 -0700] category=JVM severity=NOTICE msgID=18 msg=JVM Host: opendjexample.local default/MASTER100,
      running Windows Server 2012 6.2 amd64, 3919106048 bytes physical memory size, number of processors available 1
      [26/Jun/2019:13:24:21 -0700] category=JVM severity=NOTICE msgID=19 msg=JVM Arguments: "-XX:+PrintGCDetails", "-XX:+Print
      GCTimeStamps", "-XX:+PrintGCDateStamps", "-XX:+PrintGCCause", "-Xloggc:C:\70\opendj1\logs\good-gc.log", "-XX:+UseGCLogFi
      leRotation", "-XX:NumberOfGCLogFiles=5", "-XX:GCLogFileSize=8K", "-Dorg.opends.server.scriptName=start-ds"

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lee.trujillo Lee Trujillo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: