Crowd startup takes an extremely long time on Linux

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When first starting Crowd it takes an extremely long time to start up (up to an hour).

The following appears in the catalina.out

1 2 3 4 Jul 08, 2015 3:08:22 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [3,599,693] milliseconds. Jul 08, 2015 3:08:22 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deployment of configuration descriptor /opt/atlassian/crowd/apache-tomcat/conf/Catalina/localhost/openidserver.xml has finished in 3,613,735 ms

Diagnosis

Environment

  • Oracle Java installed in a Unix/Linux environment

  • Tomcat 7

Diagnostic steps

  • Run the following from the command line

    • head -n 1 /dev/random

  • If the command does not return immediately, use the steps below to configure the JVM to use /dev/urandom instead of /dev/random

Cause

There is a known issue with Java and Tomcat in he library used for random number generation in Sun's JVM which relies on /dev/random. This random number generator can block the application server process from starting 'because on some operating systems /dev/random waits for a certain amount of "noise" to be generated on the host machine before returning a result' (see Avoiding JVM Delays Caused by Random Number Generation).

Workaround

  1. Stop Crowd

  2. Update java.security file

    1. For Java 8, open the $JAVA_HOME/lib/security/java.security file in a text editor

      1. Find the line: securerandom.source=file:/dev/random

      2. Change it to read: securerandom.source=file:/dev/urandom

    2. For Java 11+, open the $JAVA_HOME/conf/security/java.security file in a text editor

      1. Find the line: securerandom.source=file:/dev/random

      2. Change it to read: securerandom.source=file:/dev/urandom

  3. Save your change and exit the text editor

  4. Start Crowd

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.