Skip to main content

Troubleshooting

Authentication misconfiguration

If access is lost due to an authentication misconfiguration, the recovery mode can be enabled.

Once signed in using the root user, make sure that the configuration applied is in a functioning state by signing in using the configured authentication provider, keeping the recovery mode enabled until a successful sign in has been achieved.

User entities in the catalog

If an error message similar to the one below is received when trying to use a newly configured authentication provider, the current provider's sign in resolver function is unable to locate a matching user in the catalog.

Login failed; caused by Error: Failed to sign-in, unable to resolve user identity

Make sure that a user is present in the catalog that is matching the resolver functions requirements.

Unable to visit the Config Manager

If the Config Manager (/config-manager) is unavailable, make sure that the current user is included in the authorizedUsers configuration section.

Connection to the database is lost

Portal is dependent on connecting to its database. If errors similar to Error: Failed to connect to the database... are present in the logs, make sure that the database credentials and connectivity to the database is working properly.

Rolling back a broken config change

Note: This does not guarantee to set a working config to be active. This command may need to be run until a working config version is found and rolled back to.

If you make a change to the config that has resulted in the application failing to work as expected, you can rollback the change via your Postgres database.

  1. Connect to your database using the environment variable values passed into the Portal container
psql -h $PORTAL_DATABASE_HOST -p $PORTAL_DATABASE_PORT -U $PORTAL_DATABASE_USER -d backstage_plugin_config-manager
# Use the value of PORTAL_SECRET_DATABASE_PASSWORD as password when prompted
  1. Run the following command to set the config prior to the last change as active
DO $$
DECLARE
previous_active_id INT;
BEGIN
SELECT MAX(id) INTO previous_active_id
FROM config
WHERE id < (SELECT MAX(id) FROM config WHERE is_active = true);

UPDATE config SET is_active = FALSE WHERE is_active = TRUE;
UPDATE config SET is_active = TRUE WHERE id = previous_active_id;
RAISE NOTICE 'Updated active config to id: %', previous_active_id;
END $$;

Missing Team

If you are unable to find your team, there could be a few factors. The first is that the software catalog is still ingesting teams from the 3rd party provider (i.e. Github), so it might still need some time to process. Try waiting and refreshing if you had just started.

If you are still unable to find your team, you either need to create that team in the 3rd party source or ask an administrator to create it for you. Once updated, you should be able to view your team within 1 hour.