CloudBees Flow database has columns encrypted with a passkey. Some operations obsolete these columns, such as when you change the database passkey or clone the database.
To regenerate these encrypted columns, you can reinstall Flow and use ectool to import the database from backup, or follow this procedure.
- ectool import and then changing the passkey.
- A raw database import on a system with a different passkey that when database was exported.
- When using a Flow server VM, cloning the VM and starting the cloned VM. When the cloned VM talks to the Flow agents, the agents will begin reporting "session has expired".
- In a clustered environment, failing over to the other machine that has a different passkey.
Use the following steps:
- Shut down the Flow server, killing all sessions including user login sessions and step sessions.
- Start mysql
- On Windows
mysql --user=root --password=commander
- On Linux
mysql --user=root --password=commander --socket=/opt/electriccloud/electriccommander/mysql/mysql.sock
- On Windows
- Use SQL to delete the following tables:
connect commander; show tables; delete from ec_session_auth;
Note: When using Sqlserver or Oracle the table to delete is
ec_session_authentication . So the the sql will be "delete from ec_session_authentication;". delete from ec_session; delete from ec_authentication_group; delete from ec_authentication;
- Use the following command to see the Flow database upgrade history:
select * from ec_configuration_history;
- Restart the Flow server.
- Ping all resources so the agents reestablish their server communication: Navigate to the "Resources" tab, select "Ping All Resources". Note: Currently during Flow server startup it automatically pings all resources automatically so you don't have to explicitly do this. But in a future if Flow server does not "Ping All Resources" then you have to manually do it.