Database query errors on startup
Hello,
I just cloned this repo, issued docker-compose build --no-cache and then docker-compose up and I got the following errors.
Any ideas on why this could be failing?
Using commit https://github.com/mattermost/mattermost-docker/commit/02745dd6b468d2b6ae0e43aa7f01d8d346e8ed1a
Thanks,
Recreating mattermostdocker_db_1
Starting mattermostdocker_web_1
Recreating mattermostdocker_app_1
Attaching to mattermostdocker_web_1, mattermostdocker_db_1, mattermostdocker_app_1
web_1 | Starting Nginx
web_1 | ln: failed to create symbolic link '/etc/nginx/sites-enabled/mattermost': File exists
db_1 | AWS_ACCESS_KEY_ID is required for Wal-E but not set. Skipping Wal-E setup.
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
app_1 | Configure database connection...OK
db_1 | The database cluster will be initialized with locale "en_US.utf8".
app_1 | Wait until database db:5432 is ready...
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1 | creating subdirectories ... ok
db_1 | selecting default max_connections ... 100
db_1 | selecting default shared_buffers ... 128MB
db_1 | selecting dynamic shared memory implementation ... posix
db_1 | creating configuration files ... ok
db_1 | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
db_1 | initializing pg_authid ... ok
db_1 | initializing dependencies ... ok
db_1 | creating system views ... ok
db_1 | loading system objects' descriptions ... ok
db_1 | creating collations ... ok
db_1 | creating conversions ... ok
db_1 | creating dictionaries ... ok
db_1 | setting privileges on built-in objects ... ok
db_1 | creating information schema ... ok
db_1 | loading PL/pgSQL server-side language ... ok
db_1 | vacuuming database template1 ... ok
db_1 | copying template1 to template0 ... ok
db_1 | copying template1 to postgres ... ok
db_1 | syncing data to disk ... ok
db_1 |
db_1 | Success. You can now start the database server using:
db_1 |
db_1 | postgres -D /var/lib/postgresql/data
db_1 | or
db_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1 |
db_1 |
db_1 | WARNING: enabling "trust" authentication for local connections
db_1 | You can change this by editing pg_hba.conf or using the option -A, or
db_1 | --auth-local and --auth-host, the next time you run initdb.
db_1 | ****************************************************
db_1 | WARNING: No password has been set for the database.
db_1 | This will allow anyone with access to the
db_1 | Postgres port to access your database. In
db_1 | Docker's default configuration, this is
db_1 | effectively any other container on the same
db_1 | system.
db_1 |
db_1 | Use "-e POSTGRES_PASSWORD=password" to set
db_1 | it in "docker run".
db_1 | ****************************************************
db_1 | waiting for server to start....LOG: database system was shut down at 2017-02-13 14:57:15 IST
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | done
db_1 | server started
db_1 | ALTER ROLE
db_1 |
db_1 |
db_1 | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/make_db.sh
db_1 | CREATE DATABASE
db_1 | CREATE ROLE
db_1 | GRANT
db_1 |
db_1 | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/setup-wale.sh
db_1 |
db_1 | LOG: received fast shutdown request
db_1 | LOG: aborting any active transactions
db_1 | waiting for server to shut down....LOG: autovacuum launcher shutting down
db_1 | LOG: shutting down
db_1 | LOG: database system is shut down
db_1 | done
db_1 | server stopped
db_1 |
db_1 | PostgreSQL init process complete; ready for start up.
db_1 |
db_1 | LOG: database system was shut down at 2017-02-13 14:57:17 IST
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | LOG: incomplete startup packet
app_1 | Starting platform
db_1 | ERROR: relation "systems" does not exist at character 19
db_1 | STATEMENT: SELECT Value FROM Systems WHERE Name='Version'
db_1 | ERROR: relation "idx_teams_name" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teams_description" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teams_invite_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teams_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teams_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teams_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teammembers_team_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teammembers_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_teammembers_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channels_team_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channels_name" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channels_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channels_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channels_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channelmembers_channel_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channelmembers_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_channels_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_channel_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_root_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_message_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_posts_hashtags_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_email" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_all_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_all_no_full_name_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_names_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_users_names_no_full_name_txt" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_audits_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_sessions_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_sessions_token" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_sessions_expires_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_sessions_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_sessions_last_activity_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_oauthapps_creator_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_oauthaccessdata_client_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_oauthaccessdata_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_oauthaccessdata_refresh_token" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_oauthauthdata_client_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_incoming_webhook_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_incoming_webhook_team_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_outgoing_webhook_team_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_incoming_webhook_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_incoming_webhook_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_incoming_webhook_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_outgoing_webhook_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_outgoing_webhook_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_outgoing_webhook_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_command_team_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_command_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_command_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_command_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_preferences_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_preferences_category" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_preferences_name" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_password_recovery_code" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_emoji_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_emoji_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_emoji_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_status_user_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_status_status" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_fileinfo_update_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_fileinfo_create_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_fileinfo_delete_at" does not exist
db_1 | STATEMENT: SELECT $1::regclass
db_1 | ERROR: relation "idx_reactions_post_id" does not exist
db_1 | STATEMENT: SELECT $1::regclass
@gmatoshp FYI
Have you run the db container or used docker-compose up before this? If yes, you may have a incomplete database. If you don't need the old data, you can try to run rm -rf volumes/db/ to remove the old database. Then run docker-compose up again. Let me know if it works.
@rqc I got the same errors. After some digging, it seems those errors are harmless http://forum.mattermost.org/t/solved-postgresql-error-after-mattermost-upgrade-from-3-2-0-to-3-4-0-some-relation-does-not-exist/2428/4
Thanks @xcompass, I realized that too from using the service. 👍
Hello, I have the same probleme knowing that i use docker stack to deploy my stack services??
Any help !
Thanks
Hi, it seems to be an issue from Mattermost migration itself. However those errors are not an issue.
same problem. after run “rm -rf volumes/db/” , the problem is still alive.
docker-compose up
Starting mattermostdocker_web_1 ... done Starting mattermostdocker_app_1 ... done Starting mattermostdocker_db_1 ... done Attaching to mattermostdocker_app_1, mattermostdocker_db_1, mattermostdocker_web_1 app_1 | Using existing config file /mattermost/config/config.json app_1 | Configure database connection...OK app_1 | Wait until database db:5432 is ready... db_1 | AWS_ACCESS_KEY_ID is required for Wal-E but not set. Skipping Wal-E setup. db_1 | AWS_SECRET_ACCESS_KEY is required for Wal-E but not set. Skipping Wal-E setup. db_1 | WALE_S3_PREFIX is required for Wal-E but not set. Skipping Wal-E setup. db_1 | AWS_REGION is required for Wal-E but not set. Skipping Wal-E setup. web_1 | linking plain config web_1 | ln: /etc/nginx/conf.d/mattermost.conf: File exists db_1 | LOG: database system was shut down at 2018-04-11 04:09:46 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 | LOG: autovacuum launcher started db_1 | LOG: incomplete startup packet app_1 | Starting platform db_1 | ERROR: relation "idx_teams_description" does not exist db_1 | STATEMENT: SELECT $1::regclass
I also have this issue, is it for sure harmless? Is there something to do to prevent it?
Same bunch of errors here on a fresh install from the master branch, I also tried to switch to postgres:13.1-alpine.
There are probably some missing index computations on the related tables while migrating...(?!)