Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install - Table 'mailcow.versions' doesn't exist #3265

Closed
muxflash opened this issue Jan 13, 2020 · 10 comments
Closed

Fresh install - Table 'mailcow.versions' doesn't exist #3265

muxflash opened this issue Jan 13, 2020 · 10 comments

Comments

@muxflash
Copy link

After a fresh install I have this line in my log :

sogo-mailcow_1       | Waiting for schema update...
sogo-mailcow_1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist

And I can't connect : https://${MAILCOW_HOSTNAME} (Preparing ..)

Other logs seems to be ok :
docker-compose logs --tail=1000 php-fpm-mailcow

Attaching to mailcowdockerized_php-fpm-mailcow_1
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Waiting for SQL...
php-fpm-mailcow_1    | Uptime: 2  Threads: 9  Questions: 8  Slow queries: 0  Opens: 17  Flush tables: 1  Open tables: 11  Queries per second avg: 4.000
php-fpm-mailcow_1    | OK
php-fpm-mailcow_1    | OK

docker-compose logs --tail=1000 mysql-mailcow

Attaching to mailcowdockerized_mysql-mailcow_1
mysql-mailcow_1      | 2020-01-13 17:48:53+01:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.21+maria~bionic started.
mysql-mailcow_1      | 2020-01-13 17:48:53+01:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql-mailcow_1      | 2020-01-13 17:48:53+01:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.21+maria~bionic started.
mysql-mailcow_1      | 2020-01-13 17:48:54+01:00 [Note] [Entrypoint]: Initializing database files
mysql-mailcow_1      |
mysql-mailcow_1      |
mysql-mailcow_1      | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mysql-mailcow_1      | To do so, start the server, then issue the following commands:
mysql-mailcow_1      |
mysql-mailcow_1      | '/usr/bin/mysqladmin' -u root password 'new-password'
mysql-mailcow_1      | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
mysql-mailcow_1      |
mysql-mailcow_1      | Alternatively you can run:
mysql-mailcow_1      | '/usr/bin/mysql_secure_installation'
mysql-mailcow_1      |
mysql-mailcow_1      | which will also give you the option of removing the test
mysql-mailcow_1      | databases and anonymous user created by default.  This is
mysql-mailcow_1      | strongly recommended for production servers.
mysql-mailcow_1      |
mysql-mailcow_1      | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mysql-mailcow_1      | MySQL manual for more instructions.
mysql-mailcow_1      |
mysql-mailcow_1      | Please report any problems at http://mariadb.org/jira
mysql-mailcow_1      |
mysql-mailcow_1      | The latest information about MariaDB is available at http://mariadb.org/.
mysql-mailcow_1      | You can find additional information about the MySQL part at:
mysql-mailcow_1      | http://dev.mysql.com
mysql-mailcow_1      | Consider joining MariaDB's strong and vibrant community:
mysql-mailcow_1      | https://mariadb.org/get-involved/
mysql-mailcow_1      |
mysql-mailcow_1      | 2020-01-13 17:49:09+01:00 [Note] [Entrypoint]: Database files initialized
mysql-mailcow_1      | 2020-01-13 17:49:09+01:00 [Note] [Entrypoint]: Starting temporary server
mysql-mailcow_1      | 2020-01-13 17:49:09+01:00 [Note] [Entrypoint]: Waiting for server startup
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] mysqld (mysqld 10.3.21-MariaDB-1:10.3.21+maria~bionic) starting as process 122 ...
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Using Linux native AIO
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Uses event mutexes
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Number of pools: 1
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Using SSE2 crc32 instructions
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Completed initialization of buffer pool
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: 10.3.21 started; log sequence number 1625457; transaction id 21
mysql-mailcow_1      | 2020-01-13 17:49:09 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] InnoDB: Buffer pool(s) load completed at 200113 17:49:10
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Warning] 'user' entry 'root@15e235d6cec5' ignored in --skip-name-resolve mode.
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Warning] 'user' entry '@15e235d6cec5' ignored in --skip-name-resolve mode.
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Warning] 'proxies_priv' entry '@% root@15e235d6cec5' ignored in --skip-name-resolve mode.
mysql-mailcow_1      | 2020-01-13 17:49:10 6 [Note] Event Scheduler: scheduler thread started with id 6
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] mysqld: ready for connections.
mysql-mailcow_1      | Version: '10.3.21-MariaDB-1:10.3.21+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
mysql-mailcow_1      | 2020-01-13 17:49:10+01:00 [Note] [Entrypoint]: Temporary server started.
mysql-mailcow_1      | 2020-01-13 17:49:10 10 [Warning] 'proxies_priv' entry '@% root@15e235d6cec5' ignored in --skip-name-resolve mode.
mysql-mailcow_1      | 2020-01-13 17:49:10+01:00 [Note] [Entrypoint]: Creating database mailcow
mysql-mailcow_1      | 2020-01-13 17:49:10+01:00 [Note] [Entrypoint]: Creating user mailcow
mysql-mailcow_1      | 2020-01-13 17:49:10+01:00 [Note] [Entrypoint]: Giving user mailcow access to schema mailcow
mysql-mailcow_1      | 2020-01-13 17:49:10 14 [Warning] 'proxies_priv' entry '@% root@15e235d6cec5' ignored in --skip-name-resolve mode.
mysql-mailcow_1      |
mysql-mailcow_1      | 2020-01-13 17:49:10+01:00 [Note] [Entrypoint]: Stopping temporary server
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] Event Scheduler: Killing the scheduler thread, thread id 6
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] Event Scheduler: Waiting for the scheduler thread to reply
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] Event Scheduler: Stopped
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] InnoDB: FTS optimize thread exiting.
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] InnoDB: Starting shutdown...
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] InnoDB: Instance 0, restricted to 128 pages due to innodb_buf_pool_dump_pct=25
mysql-mailcow_1      | 2020-01-13 17:49:10 0 [Note] InnoDB: Buffer pool(s) dump completed at 200113 17:49:10
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Shutdown completed; log sequence number 1625466; transaction id 24
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] mysqld: Shutdown complete
mysql-mailcow_1      |
mysql-mailcow_1      | 2020-01-13 17:49:12+01:00 [Note] [Entrypoint]: Temporary server stopped
mysql-mailcow_1      |
mysql-mailcow_1      | 2020-01-13 17:49:12+01:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
mysql-mailcow_1      |
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] mysqld (mysqld 10.3.21-MariaDB-1:10.3.21+maria~bionic) starting as process 1 ...
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Using Linux native AIO
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Uses event mutexes
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Number of pools: 1
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Using SSE2 crc32 instructions
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: Completed initialization of buffer pool
mysql-mailcow_1      | 2020-01-13 17:49:12 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: 10.3.21 started; log sequence number 1625466; transaction id 21
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] InnoDB: Buffer pool(s) load completed at 200113 17:49:13
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] Server socket created on IP: '::'.
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Warning] 'proxies_priv' entry '@% root@15e235d6cec5' ignored in --skip-name-resolve mode.
mysql-mailcow_1      | 2020-01-13 17:49:13 6 [Note] Event Scheduler: scheduler thread started with id 6
mysql-mailcow_1      | 2020-01-13 17:49:13 0 [Note] mysqld: ready for connections.
mysql-mailcow_1      | Version: '10.3.21-MariaDB-1:10.3.21+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

I try to make docker-compose down -v and docker-compose up -d but I have the same problem

I have just launch ./generate_config.sh and make no modification.
I can connect on mysql instance with root and user ( docker-compose exec mysql-mailcow mysql -u mailcow -p)
but the table doesn't exist

 sudo docker-compose exec mysql-mailcow mysql -u mailcow -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 205
Server version: 10.3.21-MariaDB-1:10.3.21+maria~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use mailcow;
Database changed
MariaDB [mailcow]> select * from versions;
ERROR 1146 (42S02): Table 'mailcow.versions' doesn't exist
MariaDB [mailcow]>

Thank for your help

@Adorfer
Copy link

Adorfer commented Jan 14, 2020

hard to tell what is happening in case people remove deliberatly remove/delete the bug report template.

@spoetnik
Copy link

I have the same problem. see #3285 for an issue following the bug template...

@stale
Copy link

stale bot commented Mar 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the dunno label Mar 22, 2020
@stale stale bot closed this as completed Mar 29, 2020
@Adorfer
Copy link

Adorfer commented Mar 29, 2020

Still no valid template used for tracking -> No chance to reproduce, closed

@unilogica
Copy link

I have the same problem with a fresh install.

redis-mailcow_1      | 1:M 01 Oct 2020 12:16:06.527 * Ready to accept connections
rspamd-mailcow_1     | Waiting for PHP on port 9001...
sogo-mailcow_1       | Waiting for schema update...
sogo-mailcow_1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
rspamd-mailcow_1     | Waiting for PHP on port 9001...
rspamd-mailcow_1     | Waiting for PHP on port 9001...
sogo-mailcow_1       | Waiting for schema update...
sogo-mailcow_1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
rspamd-mailcow_1     | Waiting for PHP on port 9001...
sogo-mailcow_1       | Waiting for schema update...
sogo-mailcow_1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
rspamd-mailcow_1     | Waiting for PHP on port 9001...
sogo-mailcow_1       | [2020-10-01T12:18:16.193218] REDIS server error, suspending; driver='d_redis_f2b_channel#0', error='Connection timed out', time_reopen='60'
sogo-mailcow_1       | Oct  1 12:18:16 9e9c255725e4 syslog-ng[11]: syslog-ng starting up; version='3.19.1'
rspamd-mailcow_1     | Waiting for PHP on port 9001...
sogo-mailcow_1       | Waiting for schema update...
sogo-mailcow_1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
rspamd-mailcow_1     | Waiting for PHP on port 9001...
rspamd-mailcow_1     | Waiting for PHP on port 9001...
sogo-mailcow_1       | Waiting for schema update...
sogo-mailcow_1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
rspamd-mailcow_1     | Waiting for PHP on port 9001...
postfix-mailcow_1    | [2020-10-01T12:18:26.433493] REDIS server error, suspending; driver='d_redis_ui_log#0', error='Connection timed out', time_reopen='60'
sogo-mailcow_1       | Waiting for schema update...

root@ha01 /opt/mailcow-dockerized # docker-compose -v
docker-compose version 1.27.4, build 40524192

root@ha01 /opt/mailcow-dockerized # docker -v
Docker version 18.06.1-ce, build e68fc7a

@am-on
Copy link

am-on commented Nov 23, 2020

I ran into the same issue with fresh install. What worked for me was following this #2970 (comment) but I had to add --force to mysql update command.

Open the shell of the MariaDB docker:

docker-compose exec mysql-mailcow sh

Then start the update script manually:

mysql_upgrade -p --force

You need to enter the root password for your database that you will find in your mailcow.conf.

Phase 4/7: Running 'mysql_fix_privilege_tables' took a while to run.

@psychowood
Copy link

I had this problem too, on a fresh install on BurmillaOS.

Moreover I had to manually stop all the mailcow containers besides mysql to prevent a deadlock when fording the mysql_upgrade command.

@Bence98007
Copy link

This is still an issue with a completly fresh and new install. The sogo container is also throwing this:

mailcow-dovecot-mailcow-1  | Waiting for versions table to be created...
mailcow-sogo-mailcow-1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.mailbox' doesn't exist
mailcow-sogo-mailcow-1       | Will retry to setup SOGo view in 3s...

When I checked the mysql container, it does have the db called "mailcow" (which is defined in the mailcow.conf) but the tables are not existing. The whole db is empty. Tried docker compose down -v --rmi all --remove-orphans then docker compose up -d nothing changed.

@CaptainPalapa
Copy link

CaptainPalapa commented Feb 21, 2024

Just download the entire docker stuff today for this, and I'm seeing the same error in the logs.

sogo-mailcow-1 | Waiting for schema update...
sogo-mailcow-1 | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
sogo-mailcow-1 | Waiting for schema update...
sogo-mailcow-1 | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
sogo-mailcow-1 | Waiting for schema update...
sogo-mailcow-1 | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
sogo-mailcow-1 | Waiting for schema update...
sogo-mailcow-1 | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
sogo-mailcow-1 | Waiting for schema update...
sogo-mailcow-1 | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
sogo-mailcow-1 | Waiting for schema update...
sogo-mailcow-1 | ERROR 1146 (42S02) at line 1: Table 'mailcow.versions' doesn't exist
sogo-mailcow-1 | Waiting for schema update...

@Citrullin
Copy link

Citrullin commented Jul 8, 2024

This is still an issue with a completly fresh and new install. The sogo container is also throwing this:

mailcow-dovecot-mailcow-1  | Waiting for versions table to be created...
mailcow-sogo-mailcow-1       | ERROR 1146 (42S02) at line 1: Table 'mailcow.mailbox' doesn't exist
mailcow-sogo-mailcow-1       | Will retry to setup SOGo view in 3s...

When I checked the mysql container, it does have the db called "mailcow" (which is defined in the mailcow.conf) but the tables are not existing. The whole db is empty. Tried docker compose down -v --rmi all --remove-orphans then docker compose up -d nothing changed.

Same. I am almost at the point to just try another mail server solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants