I'm connecting my crowd instance to a mysql database and am getting some errors in the logs like:
2018-06-28 17:43:57,724 http-nio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Table 'crowd.cwd_property' doesn't exist
2018-06-28 17:43:57,782 http-nio-8095-exec-7 ERROR [engine.jdbc.spi.SqlExceptionHelper] Table 'crowd.cwd_cluster_job' doesn't exist
when I look in mysql, those specific tables do appear to be missing:
aembree @ dev : ~ [ 18:00 ] >>> sudo mysql -B --execute 'use crowd; show tables;'
Tables_in_crowd
CWD_DATABASECHANGELOG
CWD_DATABASECHANGELOGLOCK
cwd_app_dir_default_groups
cwd_app_dir_group_mapping
cwd_app_dir_mapping
cwd_app_dir_operation
cwd_application
cwd_application_alias
cwd_audit_log_changeset
cwd_audit_log_entity
cwd_audit_log_entry
cwd_cluster_heartbeat
cwd_cluster_message
cwd_cluster_message_id
cwd_directory
cwd_directory_operation
cwd_expirable_user_token
cwd_granted_perm
cwd_group
cwd_group_attribute
cwd_membership
cwd_synchronisation_status
cwd_synchronisation_token
cwd_token
cwd_tombstone
cwd_user
cwd_user_attribute
cwd_user_credential_record
cwd_webhook
hibernate_unique_key
why were some tables created, but others weren't? I confirmed I have 'transaction-isolation = READ-COMMITTED' set and the database engine is innoDB by default.
Is this a new installation of Crowd? Or is this an upgrade? What version is this?
I would want to confirm that you are following this guide if using MySQL: https://confluence.atlassian.com/crowd/mysql-4030924.html
When the database is created, are you using the utf8 encoding and the utf8_bin collation?
You can detect the cause for this using the below SQL statements, replacing <DATABASE_NAME> in each:
Make sure to set MySQL to use the information_schema DB to make the queries below work. Use this command "Use information_schema" before and replace <DATABASE_NAME> with confluence database name you want to check.
SELECT schema_name, default_character_set_name, default_collation_name FROM schemata WHERE schema_name = '<DATABASE_NAME>' AND (default_character_set_name <> 'utf8' OR default_collation_name <> 'utf8_bin'); SELECT table_name, table_collation, engine FROM tables WHERE table_schema = '<DATABASE_NAME>' AND table_collation <> 'utf8_bin'; SELECT table_name, column_name, character_set_name, collation_name FROM columns WHERE table_schema = '<DATABASE_NAME>' and data_type in ('varchar', 'text') and (character_set_name <> 'utf8' OR collation_name <> 'utf8_bin');
If any rows are returned in any of those three queries, then there is something in the database which is either not set to use utf8 encoding, or does not have the utf8_bin collation.
Also, it could be that the user account Crowd is setup to use might not have been granted all the rights to create the necessary tables/relations, but if that happens then we typically should see that in the logs when first started.
looks like I forgot the collation! thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.