Uploaded image for project: 'Server Deployments and Scale'
  1. Server Deployments and Scale
  2. SCALE-45

Catalina.out file is missing in $JIRA_INST/logs folder in dockerized Jira

    • Severity 2 - Major

      Issue Summary

      Jira deployed from an official docker image does not create catalina.out file in $JIRA_INST/logs folder

      Steps to Reproduce

      Deploy Jira from the official docker image (in my case I tried 8.9.1)

      Expected Results

      catalina.out file should be present in the $JIRA_INST/logs/ directory

      Actual Results

      catalina.out file is not there

      Workaround

      no workaround known yet

        1. image-2021-01-12-14-22-25-372.png
          image-2021-01-12-14-22-25-372.png
          8 kB
        2. image-2021-01-12-14-23-42-712.png
          image-2021-01-12-14-23-42-712.png
          32 kB
        3. image-2021-01-12-14-28-10-281.png
          image-2021-01-12-14-28-10-281.png
          19 kB
        4. image-2021-01-12-14-29-14-037.png
          image-2021-01-12-14-29-14-037.png
          12 kB
        5. catalina.2021-01-12.log
          8 kB
        6. catalina.out
          1.72 MB

            [SCALE-45] Catalina.out file is missing in $JIRA_INST/logs folder in dockerized Jira

            Nadya Yusupova (Inactive) made changes -
            Labels New: dcxp-triaged
            Nadya Yusupova (Inactive) made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: Gathering Impact [ 12072 ] New: Closed [ 6 ]

            Duplicate of SCALE-46

            Nadya Yusupova (Inactive) added a comment - - edited Duplicate of SCALE-46
            Bruno made changes -
            Remote Link Original: This issue links to "DCD-1187 (Bulldog)" [ 524557 ] New: This issue links to "CLIP-1187 (JIRA Server (Bulldog))" [ 524557 ]
            Yifei Zhang made changes -
            Comment [ Hi [~soslopov] , yup yup, let me elaborate a bit more.
             # The reason why {{catalina.out}} is not created is because of the manner in which Jira is started by Docker. The shell script {{start-jira.sh}} starts the Jira process in foreground mode, i.e. {{{}./start-jira.sh -fg{}}}. In this mode, the script calls catalina.sh with the "run" parameter, (see [https://www.mulesoft.com/tcat/tomcat-start] ). Instead of redirecting {{STDOUT}} and {{STDERR}} to {{{}catalina.out{}}}, it'll stream to console/terminal directly.
             # The reason why docker must run {{start-jira.sh}} in foreground is due to the nature of docker container. Unlike VM, docker container is a box of processes, once the init process is considered completed, the container will be stopped. Basically running {{start-jira.sh}} in daemon will stop docker container immediately, hence Jira instance will be stopped as well. So, running {{start-jira.sh}} in foreground within docker is by purpose so that Jira, as a long-running service, wont be stopped immediately. 
             # Since we know that {{STDOUT}} and {{STDERR}} are streamed to console/terminal within the container, we can then retrieve them by running `docker logs` command. [https://docs.docker.com/config/containers/logging/]

             

              ]

            In short, catalina.out is not available when Jira is running in a Docker container, and this is by design.

            Instead, by convention the content should be retrieved using docker logs <container-id/name>. This will return an aggregate of all logged data that is sent to STDOUT and STDERR namely the contents of catalina.<date>.log and atlassian-jira.log.

            Yifei Zhang added a comment - In short, catalina.out is not available when Jira is running in a Docker container, and this is by design. Instead, by convention the content should be retrieved using docker logs <container-id/name> . This will return an aggregate of all logged data that is sent to STDOUT and STDERR namely the contents of catalina.<date>.log and atlassian-jira.log .
            Rinish made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 609495 ]
            Pascal Oberle made changes -
            Link Original: This issue was cloned as SCALE-63 [ SCALE-63 ]
            Pascal Oberle made changes -
            Link New: This issue was cloned as SCALE-63 [ SCALE-63 ]
            Carlos Corredor made changes -
            Priority Original: Low [ 4 ] New: Medium [ 3 ]

              Unassigned Unassigned
              soslopov Sergey
              Affected customers:
              4 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: