Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6967

[GSS](7.1.0) standalone.sh fails to backup gc.log.#.current file silently.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR10
    • 7.0.0.GA, 7.0.1.GA, 7.0.2.GA, 7.0.3.GA, 7.1.0.DR7
    • Scripts
    • Workaround Exists
    • Hide

      Modify line 265 in standalone.sh as below:

      265c265
      <         mv "$JBOSS_LOG_DIR/gc.log.*.current" "$JBOSS_LOG_DIR/backupgc.log.current" >/dev/null 2>&1
      ---
      >         mv "$JBOSS_LOG_DIR"/gc.log.*.current "$JBOSS_LOG_DIR/backupgc.log.current" >/dev/null 2>&1
      
      Show
      Modify line 265 in standalone.sh as below: 265c265 < mv "$JBOSS_LOG_DIR/gc.log.*.current" "$JBOSS_LOG_DIR/backupgc.log.current" >/dev/ null 2>&1 --- > mv "$JBOSS_LOG_DIR" /gc.log.*.current "$JBOSS_LOG_DIR/backupgc.log.current" >/dev/ null 2>&1
    • Hide
      1. Get rid of ">/dev/null" from line 265 in standalone.sh.
      2. Run standalone.sh for creating $JBOSS_LOG_DIR/gc.log.0.current file. Please ignore "No such file or directory" message (*1) printed out to the console at this time.
      3. Stop the server by Ctrl-C.
      4. Run standalone.sh again. The message (*1) will still be printed out to the console. The error (*1) at this time should not occur.

      Error message (*1)

      mv: cannot stat `/path/to/standalone/log/gc.log.*.current': No such file or directory
      
      Show
      Get rid of ">/dev/null" from line 265 in standalone.sh. Run standalone.sh for creating $JBOSS_LOG_DIR/gc.log.0.current file. Please ignore "No such file or directory" message (*1) printed out to the console at this time. Stop the server by Ctrl-C. Run standalone.sh again. The message (*1) will still be printed out to the console. The error (*1) at this time should not occur. Error message (*1) mv: cannot stat `/path/to/standalone/log/gc.log.*.current': No such file or directory

      gc.log.*.current enclosed with double quotes in the following line (line 265) in standalone.sh is not evaluated as a wildcard by bash,

      mv "$JBOSS_LOG_DIR/gc.log.*.current" "$JBOSS_LOG_DIR/backupgc.log.current" >/dev/null 2>&1
      

      therefore standalone.sh fails to move an existing gc.log.<number>.current file to backupgc.log.current silently.

              rhn-engineering-lgao Lin Gao
              rhn-support-myoshida Masato Yoshida
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: