Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2007

standalone.sh fails to backup gc.log.#.current file silently.

    XMLWordPrintable

Details

    • 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
    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-lgao Lin Gao
              rhn-engineering-lgao Lin Gao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: