Error on macOS 11.4

Running tutor local quickstart fails with this final error:

Creating tutor_local_mysql-job_run ... done
Initialising MySQL...
…
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1130 (HY000): Host '172.18.0.14' is not allowed to connect to this MySQL server
    [10/10] Waiting for MySQL service (this may take a while)...
MySQL initialisation error
ERROR: 1
Error: Command failed with status 1: docker-compose -f /Users/yaron/Library/Application Support/tutor/env/local/docker-compose.yml -f /Users/yaron/Library/Application Support/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /Users/yaron/Library/Application Support/tutor/env/local/docker-compose.jobs.yml run --rm mysql-job sh -e -c echo "Initialising MySQL..."
mysql_connection_max_attempts=10
mysql_connection_attempt=0

Maybe the MySQL access should try some other methods such as running docker exec commands in case of failure.

I’ve managed to run this exact same command (exited with 1) manually and it worked.

Apparently docker-compose is now docker compose, so long PyNaCl nightmares!

Hi @yaron!

I don’t quite understand: which tutor version are you running? what command? how did you manage to resolve this error? if the error comes from the mysql container, what are the mysql logs?

1 Like

Latest, I’ve installed it minutes before posting this.

The command I ran was tutor local quickstart (mentioned in my original post).

The docker on this machine is running some different services so it’s definitely not a docker service problem.

Is there anything interesting from the mysql logs? (tutor local logs mysql)

Attaching to tutor_local_mysql_1
mysql_1          | 2021-06-09 20:26:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
mysql_1          | 2021-06-09 20:26:25+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql_1          | 2021-06-09 20:26:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
mysql_1          | 2021-06-09T20:26:26.182005Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1          | 2021-06-09T20:26:26.192548Z 0 [Note] mysqld (mysqld 5.7.33) starting as process 1 ...
mysql_1          | 2021-06-09T20:26:26.202385Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysql_1          | 2021-06-09T20:26:26.204716Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1          | 2021-06-09T20:26:26.204781Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1          | 2021-06-09T20:26:26.204795Z 0 [Note] InnoDB: Uses event mutexes
mysql_1          | 2021-06-09T20:26:26.204805Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1          | 2021-06-09T20:26:26.204812Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql_1          | 2021-06-09T20:26:26.204823Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1          | 2021-06-09T20:26:26.205814Z 0 [Note] InnoDB: Number of pools: 1
mysql_1          | 2021-06-09T20:26:26.206403Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1          | 2021-06-09T20:26:26.208344Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1          | 2021-06-09T20:26:26.230763Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1          | 2021-06-09T20:26:26.233382Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1          | 2021-06-09T20:26:26.324749Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1          | 2021-06-09T20:26:26.486144Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1          | 2021-06-09T20:26:26.491228Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1          | 2021-06-09T20:26:26.602913Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1          | 2021-06-09T20:26:26.618042Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1          | 2021-06-09T20:26:26.618273Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1          | 2021-06-09T20:26:26.621583Z 0 [Note] InnoDB: 5.7.33 started; log sequence number 6778221
mysql_1          | 2021-06-09T20:26:26.623432Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1          | 2021-06-09T20:26:26.624557Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1          | 2021-06-09T20:26:26.750430Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1          | 2021-06-09T20:26:26.750479Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
mysql_1          | 2021-06-09T20:26:26.764602Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1          | 2021-06-09T20:26:26.764763Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
mysql_1          | 2021-06-09T20:26:26.777231Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1          | 2021-06-09T20:26:26.777313Z 0 [Note] IPv6 is available.
mysql_1          | 2021-06-09T20:26:26.777345Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210609 20:26:26
mysql_1          | 2021-06-09T20:26:26.777354Z 0 [Note]   - '::' resolves to '::';
mysql_1          | 2021-06-09T20:26:26.777405Z 0 [Note] Server socket created on IP: '::'.
mysql_1          | 2021-06-09T20:26:26.784370Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql_1          | 2021-06-09T20:26:27.444327Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1          | 2021-06-09T20:26:27.445182Z 0 [Note] mysqld: ready for connections.
mysql_1          | Version: '5.7.33'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
mysql_1          | 2021-06-09 20:27:10+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
mysql_1          | 2021-06-09 20:27:11+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql_1          | 2021-06-09 20:27:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
mysql_1          | 2021-06-09T20:27:12.722878Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1          | 2021-06-09T20:27:12.735719Z 0 [Note] mysqld (mysqld 5.7.33) starting as process 1 ...
mysql_1          | 2021-06-09T20:27:12.746301Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysql_1          | 2021-06-09T20:27:12.748691Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1          | 2021-06-09T20:27:12.748746Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1          | 2021-06-09T20:27:12.748762Z 0 [Note] InnoDB: Uses event mutexes
mysql_1          | 2021-06-09T20:27:12.748777Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1          | 2021-06-09T20:27:12.748787Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql_1          | 2021-06-09T20:27:12.748808Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1          | 2021-06-09T20:27:12.750641Z 0 [Note] InnoDB: Number of pools: 1
mysql_1          | 2021-06-09T20:27:12.751874Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1          | 2021-06-09T20:27:12.753753Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1          | 2021-06-09T20:27:12.783306Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1          | 2021-06-09T20:27:12.786558Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1          | 2021-06-09T20:27:13.027537Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1          | 2021-06-09T20:27:13.056344Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 6778240
mysql_1          | 2021-06-09T20:27:13.056415Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 6778249
mysql_1          | 2021-06-09T20:27:13.056437Z 0 [Note] InnoDB: Database was not shutdown normally!
mysql_1          | 2021-06-09T20:27:13.056455Z 0 [Note] InnoDB: Starting crash recovery.
mysql_1          | 2021-06-09T20:27:13.628960Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql_1          | 2021-06-09T20:27:13.629024Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1          | 2021-06-09T20:27:13.636428Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1          | 2021-06-09T20:27:13.856447Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1          | 2021-06-09T20:27:13.876538Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1          | 2021-06-09T20:27:13.876598Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1          | 2021-06-09T20:27:13.885317Z 0 [Note] InnoDB: Waiting for purge to start
mysql_1          | 2021-06-09T20:27:13.937870Z 0 [Note] InnoDB: 5.7.33 started; log sequence number 6778249
mysql_1          | 2021-06-09T20:27:13.938951Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1          | 2021-06-09T20:27:13.940343Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1          | 2021-06-09T20:27:14.069171Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210609 20:27:14
mysql_1          | 2021-06-09T20:27:14.103697Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1          | 2021-06-09T20:27:14.103760Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
mysql_1          | 2021-06-09T20:27:14.130784Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1          | 2021-06-09T20:27:14.130984Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
mysql_1          | 2021-06-09T20:27:14.154320Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1          | 2021-06-09T20:27:14.154397Z 0 [Note] IPv6 is available.
mysql_1          | 2021-06-09T20:27:14.154781Z 0 [Note]   - '::' resolves to '::';
mysql_1          | 2021-06-09T20:27:14.154837Z 0 [Note] Server socket created on IP: '::'.
mysql_1          | 2021-06-09T20:27:14.165360Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql_1          | 2021-06-09T20:27:15.366435Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1          | 2021-06-09T20:27:15.366901Z 0 [Note] mysqld: ready for connections.
mysql_1          | Version: '5.7.33'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
mysql_1          | 2021-06-09T23:15:42.700116Z 0 [Note] Giving 0 client threads a chance to die gracefully
mysql_1          | 2021-06-09T23:15:42.700894Z 0 [Note] Shutting down slave threads
mysql_1          | 2021-06-09T23:15:42.701513Z 0 [Note] Forcefully disconnecting 0 remaining clients
mysql_1          | 2021-06-09T23:15:42.703734Z 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql_1          | 2021-06-09T23:15:42.706004Z 0 [Note] Binlog end
mysql_1          | 2021-06-09T23:15:42.771907Z 0 [Note] Shutting down plugin 'ngram'
mysql_1          | 2021-06-09T23:15:42.772929Z 0 [Note] Shutting down plugin 'partition'
mysql_1          | 2021-06-09T23:15:42.772962Z 0 [Note] Shutting down plugin 'BLACKHOLE'
mysql_1          | 2021-06-09T23:15:42.773671Z 0 [Note] Shutting down plugin 'ARCHIVE'
mysql_1          | 2021-06-09T23:15:42.773705Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
mysql_1          | 2021-06-09T23:15:42.774951Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
mysql_1          | 2021-06-09T23:15:42.776892Z 0 [Note] Shutting down plugin 'MyISAM'
mysql_1          | 2021-06-09T23:15:42.780927Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
mysql_1          | 2021-06-09T23:15:42.782299Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
mysql_1          | 2021-06-09T23:15:42.782358Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
mysql_1          | 2021-06-09T23:15:42.782374Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
mysql_1          | 2021-06-09T23:15:42.782383Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
mysql_1          | 2021-06-09T23:15:42.782394Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
mysql_1          | 2021-06-09T23:15:42.782403Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
mysql_1          | 2021-06-09T23:15:42.782414Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
mysql_1          | 2021-06-09T23:15:42.782423Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
mysql_1          | 2021-06-09T23:15:42.782436Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
mysql_1          | 2021-06-09T23:15:42.782451Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
mysql_1          | 2021-06-09T23:15:42.782461Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
mysql_1          | 2021-06-09T23:15:42.782545Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
mysql_1          | 2021-06-09T23:15:42.782566Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
mysql_1          | 2021-06-09T23:15:42.782584Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
mysql_1          | 2021-06-09T23:15:42.782631Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
mysql_1          | 2021-06-09T23:15:42.782641Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
mysql_1          | 2021-06-09T23:15:42.782653Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
mysql_1          | 2021-06-09T23:15:42.782670Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
mysql_1          | 2021-06-09T23:15:42.782711Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
mysql_1          | 2021-06-09T23:15:42.782721Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
mysql_1          | 2021-06-09T23:15:42.782733Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
mysql_1          | 2021-06-09T23:15:42.782751Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
mysql_1          | 2021-06-09T23:15:42.782764Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
mysql_1          | 2021-06-09T23:15:42.782797Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
mysql_1          | 2021-06-09T23:15:42.783040Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
mysql_1          | 2021-06-09T23:15:42.783069Z 0 [Note] Shutting down plugin 'INNODB_CMP'
mysql_1          | 2021-06-09T23:15:42.783087Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
mysql_1          | 2021-06-09T23:15:42.783098Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
mysql_1          | 2021-06-09T23:15:42.783114Z 0 [Note] Shutting down plugin 'INNODB_TRX'
mysql_1          | 2021-06-09T23:15:42.783135Z 0 [Note] Shutting down plugin 'InnoDB'
mysql_1          | 2021-06-09T23:15:42.796488Z 0 [Note] InnoDB: FTS optimize thread exiting.
mysql_1          | 2021-06-09T23:15:42.799592Z 0 [Note] InnoDB: Starting shutdown...
mysql_1          | 2021-06-09T23:15:42.905229Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql_1          | 2021-06-09T23:15:42.958689Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 210609 23:15:42
mysql_1          | 2021-06-09T23:15:44.883378Z 0 [Note] InnoDB: Shutdown completed; log sequence number 6778277
mysql_1          | 2021-06-09T23:15:44.893981Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql_1          | 2021-06-09T23:15:44.894066Z 0 [Note] Shutting down plugin 'MEMORY'
mysql_1          | 2021-06-09T23:15:44.894317Z 0 [Note] Shutting down plugin 'CSV'
mysql_1          | 2021-06-09T23:15:44.894383Z 0 [Note] Shutting down plugin 'sha256_password'
mysql_1          | 2021-06-09T23:15:44.894406Z 0 [Note] Shutting down plugin 'mysql_native_password'
mysql_1          | 2021-06-09T23:15:44.908468Z 0 [Note] Shutting down plugin 'binlog'
mysql_1          | 2021-06-09T23:15:44.937893Z 0 [Note] mysqld: Shutdown complete
mysql_1          |

These are the relevant log, sorry for spamming, wasn’t sure if it’s better to do it like that or link to an external paste bin.

Feel free to remove the comment and I’ll attach it in another way.

Actually, I prefer if error logs are posted here :slight_smile: it makes it easier for other users with a similar issue to find a solution.

It looks like this errror is causing the mysql process to shutdown. Did the server crash at some point? If you attempt to run quickstart again, does it fix the problem?

Sadly the same thing happens, is there a way to clear absolutely everything and start from scratch including removing the current images and containers?

Yes:

tutor local stop
docker image prune -a
docker container prune -a
sudo rm -rf "$(tutor config printroot)/

:warning: THIS WILL ERASE ALL YOUR DATA. DO NOT ATTEMPT THIS ON A PRODUCTION INSTANCE.

Yup, it’s not a mistake, same thing happened.

I can try and send all the logs for all the containers, what is the recommended command for that?

(Edit: I’ve linked to the output from tutor local logs on GhostBin, if you don’t mind me posting this monstrous log here I’d love to).

https://ghostbin.co/paste/9zndfca

  1. How much memory do you have on this computer?
  2. Did you follow the indication from the Tutor installation about resource allocation on Mac OS? Install Tutor — Tutor documentation
  3. Do you know if the same command was working in Tutor v11?
  4. Please attempt to run the following commands: tutor local start -d && sleep 30 && tutor local init. Is it successful?
  1. This is a 16GB machine, should be sufficient.
  2. Sure, I have enough space, CPUs and memory.
  3. Never tried but I will soon.
  4. Tried, back to square one, sadly :frowning_face:

EDIT: 3. Tried 11.3.1, it seems like the same containers are used so there’s absolutely no change.

Can you please try again if it works with v11? You should remove the tutor root and then run quickstart:

tutor local stop
sudo rm -rf "$(tutor config printroot)"
pip install tutor==11.3.1
tutor local quickstart