How to create Crowd Support Zip via command line


Summary

When the Crowd web interface, the UI, is not working properly, running and getting the Support Zip is a challenge, requiring Crowd or the System administrator to collect logs and data from the Operating System. 
To facilitate it, this solution comes to automatize the log/data search and packaging using the same structure the Support Zip tool provides, among other benefits.

Environment and requirements

The solution runs in Linux based Operating System with:

  • /bin/bash

  • zip and/or gzip applications

It's also required by the system administrator:

  • Being familiar with the Operating System command line interface.

  • Recognize the Crowd Home and Crowd Application folders.
  • Have read permission on Crowd Home and Crowd Application folders (recommended root/Administrator or the Crowd user if using Linux).

(warning) Attention when using Crowd with multiple nodes, the script shall be run in each node separately and the home folder refers to the Crowd home from the node (not the shared home folder). Also, before running the scripts, ensure there is enough disk space on node-home/export for the data transfer and zip creation!

Script and its usage

Below you may find the scripts, usage, and real examples for Linux and Windows. 

Linux

Linux

Script

File: crowd-supportzip.sh

Usage

The basic script shall be run as follows:

./crowd-supportzip.sh [-h <crowd home path>] [-a <crowd app path>]

With details:

# ./crowd-supportzip.sh -h
Usage: ./supportzip.sh [-h <crowd home path>] [-a <crowd app path>] -t
          -h: obligatory, absolute path of Crowd home directory
          -a: obligatory, absolute path of Crowd application directory
          -t: optional, to collect thread dumps

Example

Below you may find an example of running the script using Linux and paths:

  • Node home folder (-h) "/opt/atlassian/crowd/crowd-home", and
  • Application folder (-a) "/opt/atlassian/crowd/atlassian-crowd-5.3.6"

The script call shall be set as (the "-t" is optional to generate thread dumps):

./crowd-supportzip.sh -h /opt/atlassian/crowd/crowd-home -a /opt/atlassian/crowd/atlassian-crowd-5.3.6 -t

With details:

# ./crowd-supportzip.sh -h /opt/atlassian/crowd/crowd-home -a /opt/atlassian/crowd/atlassian-crowd-5.3.6 -t
       __          ------------------------------------------
 _(\    |@@|        | Beep - Generating Atlassian Support Zip  |
(__/\__ \--/ __    /_------------------------------------------
   \___|----|  |   __
       \ }{ /\ )_ / _\
       /\__/\ \__O (__
      (--/\--)    \__/
      _)(  )(_
     `------`


##############################
# Atlassian support zip tool #
##############################
User = dalves
Crowd Home = /Users/dalves/Documents/Study/Atlassian/crowd/installation/crowd_home_5_3_6
Crowd App = /Users/dalves/Documents/Study/Atlassian/crowd/installation/atlassian-crowd-5.3.6

Hit CTRL+C (10s wait) if any path or user is incorrect.

 - Packing application logs
 - Packing application config files
 - Packing the application.xml, if any available
 - Packing tomcat configuration files
cp: /Users/dalves/Documents/Study/Atlassian/crowd/installation/atlassian-crowd-5.3.6/apache-tomcat/conf/Catalina is a directory (not copied).
 - Packing Tomcat logs
 - Packing Tomcat access logs, if enabled
 - Generating thread dumps -  this will take ~1 minute

Creating zip file...

The support zip file can be found in /opt/atlassian/crowd/crowd-home/export/Crowd_support_2024-12-09-10-20-48.zip, please upload this file to Atlassian.
.
Have a g'day =)


The support.zip generated file will be placed at <crowd-home>/export. 

Other Notes

  • This solution is not a substitute of UI Support Zip. If you have the chance to generate the support zip though the UI, please prefer to use it. 
  • This solution is not supported by Atlassian, and the performance of the UI may differ from the command line tool.
  • Username and passwords are sanitized in server.xml/tomcat-users.xml (tomcat configuration).




Last modified on Jan 20, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.