Enum StartupStage

    • Enum Constant Detail

      • INITIAL_STAGE

        public static final StartupStage INITIAL_STAGE
        The initial state. It is the only stage that works in the servlet initial thread; all other stages work in a special separate startup threads.

        Note: some of fields in the StartupContext are not initialized yet.

        Immediately followed by LOOKING_FOR_DATA_DIR.

      • FATAL_ERROR

        public static final StartupStage FATAL_ERROR
        The system failed to start at very beginning. It can occur if the logging is not initialized, or a problem with binaries, or something related.

        The system is not initialized because of failed to initialize the logging engine. TeamCity could not work without logging, see TW-24753.

        Note: some of fields in the StartupContext can be uninitialized.

      • XMX_WARNING

        public static final StartupStage XMX_WARNING
        xmx warning stage.

        The stage shows the server memory configuration warning in case when xmx has not default value, the OS system is windows and xmx < 1300mb show a warning about switching to x64 JDK.

        followed by LOOKING_FOR_DB_SETTINGS step

        See Also:
      • WAITING_FOR_DATA_DIRECTORY_INITIALIZATION

        public static final StartupStage WAITING_FOR_DATA_DIRECTORY_INITIALIZATION
        When we are waiting for main server to perform server initialization for the first time
      • PROCESS_DATA_DIR_SELECTED_BY_USER

        public static final StartupStage PROCESS_DATA_DIR_SELECTED_BY_USER
        Processing data directory selected by user during first start

        1st start-up, "database.properties" doesn't exist. Immediately followed by either DB_SETTINGS_SCREEN (regular start), ASK_NODE_TYPE (in case of starting node with id but without data directory) or EXCEPTION (failure to create the data directory or any of its subdirectories).

      • ASK_NODE_TYPE

        public static final StartupStage ASK_NODE_TYPE
        Ask for TeamCity node type in case of starting node without initalized data directory but with specified node id.
      • CREATE_NEW_DATA_DIR

        public static final StartupStage CREATE_NEW_DATA_DIR
        Creating and initializing Data Directory.

        Immediately followed by CREATE_NEW_DB.

      • LOOKING_FOR_DB_SETTINGS

        public static final StartupStage LOOKING_FOR_DB_SETTINGS
        Looking for the database configuration file, and attempting to detect an internal database if no.

        Regular start-up of a configured TeamCity instance. Immediately followed by either of these steps:

        • DB_CONNECT (normal start-up).
        • RECREATE_DB_SCREEN (recoverable error) — if "database.properties" doesn't exist or the target database is empty.
        • EXCEPTION (fatal error) — if "database.properties" doesn't exist and, additionally, data versions are inconsistent across the currently running TeamCity instance and the data directory (unable to either re-create the database or proceed with an upgrade).

      • RECREATE_DB_SCREEN

        public static final StartupStage RECREATE_DB_SCREEN
        When neither database properties file nor internal database found - asking a user whether they want to create a brand new one.

        Regular start-up of a configured TeamCity instance, recoverable error. Immediately followed by either of these steps:

      • DB_SETTINGS_SCREEN

        public static final StartupStage DB_SETTINGS_SCREEN
        Database connection settings.

        Either the 1st start-up or a recoverable error, "database.properties" doesn't exist. Immediately followed by either of these steps:

        • CREATE_NEW_DB — if "Proceed" button is clicked, and the necessary JDBC driver is already available.
        • DOWNLOADING_JDBC_DRIVERS — if "Refresh JDBC drivers" button is clicked, and the necessary JDBC driver is not yet available.
      • CREATE_NEW_DB

        public static final StartupStage CREATE_NEW_DB
        Creating a new database.

        Immediately followed by either of these steps:

      • DB_CONNECT

        public static final StartupStage DB_CONNECT
        Try to connect to the database.

        Regular start-up of a configured TeamCity instance. Immediately followed by either of these steps:

      • DB_CONNECT_CONTINUE

        public static final StartupStage DB_CONNECT_CONTINUE
        When the database is not responding, we're assuming that it is not started yet and repeating connecting attempts every several seconds.

        Immediately followed by either of these steps:

      • DB_CHECKING

        public static final StartupStage DB_CHECKING
        Checking the database structure and getting the version.

        Immediately followed by either of these steps:

        • APPLICATION_STARTING (normal start-up).
        • UPGRADE_SCREEN (normal start-up, data upgrade pending).
        • RECREATE_DB_SCREEN (recoverable error) — if the target database is empty.
        • EXCEPTION (fatal error) — if TeamCity fails to upgrade because data versions are different across the data directory and the database.

      • SECOND_INSTANCE

        public static final StartupStage SECOND_INSTANCE
        When another TeamCity is already running with this database.
      • CORRUPTED_INSTALLATION

        public static final StartupStage CORRUPTED_INSTALLATION
        When we find some files from the previous version TW-17256
      • OUTDATED_SECONDARY_NODE

        public static final StartupStage OUTDATED_SECONDARY_NODE
        Secondary TeamCity node (read-only or messages processing node) is started against the Data Directory of more recent version.
      • WAITING_FOR_UPGRADE_LOCK

        public static final StartupStage WAITING_FOR_UPGRADE_LOCK
        When we are going to perform db upgrade, but can't take exclusive db lock (other nodes are using server)
      • WAITING_FOR_OTHER_NODE_SHUTDOWN

        public static final StartupStage WAITING_FOR_OTHER_NODE_SHUTDOWN
        When we are going to start main node, but there is running another node of the different version.
      • MAIN_SERVER_OF_A_DIFFERENT_VERSION_ERROR

        public static final StartupStage MAIN_SERVER_OF_A_DIFFERENT_VERSION_ERROR
        When we are going to start second node, but there is running main server of a different version.
      • OTHER_NODE_WITH_SAME_ID_IS_ACTIVE

        public static final StartupStage OTHER_NODE_WITH_SAME_ID_IS_ACTIVE
        There is an active node with the same node id
      • OTHER_NODE_WITH_DIFFERENT_DATA_DIRECTORY

        public static final StartupStage OTHER_NODE_WITH_DIFFERENT_DATA_DIRECTORY
        When we are going to start main server, but there is running second node working with the same DB but different Data Directory. Or vice-versa
      • MAIN_SERVER_WITH_DIFFERENT_DATA_DIRECTORY

        public static final StartupStage MAIN_SERVER_WITH_DIFFERENT_DATA_DIRECTORY
        When we are going to start second node, but there is running main server working with the same DB but different Data Directory.
      • WAITING_FOR_UPGRADE_END

        public static final StartupStage WAITING_FOR_UPGRADE_END
        When we are waiting for other node to perform db upgrade
      • TEAMCITY_NODE_ID_NOT_SPECIFIED

        public static final StartupStage TEAMCITY_NODE_ID_NOT_SPECIFIED
        When node without condifugred TeamCity node id parameter is starting as secondary node according to nodes-config file
      • UPGRADE_SCREEN

        public static final StartupStage UPGRADE_SCREEN
        Asking for the data upgrade confirmation.

        Normal start-up of a configured TeamCity instance, upgrade pending. Immediately followed by either of these steps:

        • BACKUP — if the user selects to back up the existing data before upgrade;
        • UPGRADE — otherwise.

      • BACKUP

        public static final StartupStage BACKUP
        Backup of old-version data before upgrade.

        Immediately followed by UPGRADE.

      • RESTORE_SETTINGS_SCREEN

        public static final StartupStage RESTORE_SETTINGS_SCREEN
        Restore settings.

        1st start-up. Immediately followed by either of these steps:

      • BACKUP_FILE_CHECKING

        public static final StartupStage BACKUP_FILE_CHECKING
        Checking the backup structure, version. Parse database connection settings for the following stage. Unpack jdbc libs if they are exist in backup.

        1st start-up. Immediately followed by either of these steps:

      • RESTORE_DATABASE_SETTINGS_SCREEN

        public static final StartupStage RESTORE_DATABASE_SETTINGS_SCREEN
        Target database connection settings. Define database to be restored to.

        1st start-up. Immediately followed by either of these steps:

        • RESTORE — if "Proceed" button is clicked, and the necessary JDBC driver is already available.
        • DOWNLOADING_JDBC_DRIVERS — if "Refresh JDBC drivers" button is clicked, and the necessary JDBC driver is not yet available.
      • RESTORE_DB_CHECKING

        public static final StartupStage RESTORE_DB_CHECKING
        Checking the target database is empty.

        Immediately followed by either of these steps:

  • Field Detail

    • active

      public final boolean active
      Stage is active - that means the system does some startup/maintenance work during this stage.
    • adminRequires

      public final boolean adminRequires
      Means the system is asking something from a system administrator. So the system shows a special maintenance form and waitin for the adminsitrator to type some information and submit it.
    • shuttingDown

      public final boolean shuttingDown
      Means that the system is in its shut down sequence.
    • page

      @NotNull
      public final String page
      Page name.

      It is the name of FreeMarker template file, without extensions.

    • description

      @NotNull
      public final String description
      Human-readable description what does the stage do.
    • iconCode

      @NotNull
      public final String iconCode
      Icon code.

      The code that is used to define a CSS class to show an icon.

  • Method Detail

    • values

      public static StartupStage[] values()
      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
      for (StartupStage c : StartupStage.values())
          System.out.println(c);
      
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StartupStage valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null