KBEC-00437 - Required changes after changing the hostname of the CloudBees CD (CloudBees Flow) server

Article ID:360038509872
2 minute readKnowledge base

Issue

After changing the hostname of the machine running CloudBees CD (CloudBees Flow), you are not able to login to CloudBees CD (CloudBees Flow) anymore.

Evidence

You will see the following message in the "commander.log" (the default location for this file is described in KBEC-00173 - Default locations and use scenarios for CloudBees CD (CloudBees Flow) log files)

InvalidServer: The hostname of the last server ('myOldHostname') to connect to the database is different from the hostname of the current server ('myNewHostname'). Check that the server is configured for the correct database. To allow this server to become the new owner for this data, update the database configuration with the ignoreServerMismatch flag set before connecting to the database.

Resolution

1 . Modify the "conf/wrapper.conf" file (located in the CloudBees CD (CloudBees Flow) installation path, the default paths are listed in KBEC-00173 - Default locations and use scenarios for CloudBees CD (CloudBees Flow) log files) to add the following new line:

wrapper.java.additional.261=-DCOMMANDER_IGNORE_SERVER_MISMATCH=1

This option will make the CloudBees CD (CloudBees Flow) server ignore the server name mismatch upon the next restart ( in the ec_configuration_history table in database, which tracks the last CloudBees CD (CloudBees Flow) server that successfully connected to the database).

Make sure none of the "wrapper.java.additional.nnnn" numbers already exist in the wrapper.conf as those numbers should be unique in that file. So in above example 261 should be unique in the wrapper.conf
Note: "ectool setDatabaseConfiguration --ignoreServerMismatch true" works only in unclustered mode.

The COMMANDER_IGNORE_SERVER_MISMATCH=1 mentioned above works when the CloudBees CD (CloudBees Flow) Server is single/standalone mode and clustered mode.

2 . Restart the CD service, using the commands documented in Start and stop servers and agents manually

3 . Verify you are now able to login again.

4 . Comment out that line (or remove it) from the "conf/wrapper.conf" file.

5 . Restart the CD service, using the commands documented in Start and stop servers and agents manually

Tested product version

CloudBees CD (CloudBees Flow) version 8.0.3.125753