Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Creating an AWS RDS Aurora DB cluster using a specific aurora-mysql
engine version causes localstack to spin up another container for MySQL (ls-mysql-SOMEID
), as expected behavior.
Doing this with the following parameters causes sporadic failures to initialize the MySQL container:
- Engine:
aurora-mysql
- Engine Version:
8.0.mysql_aurora.3.06.0
Occasionally (rough approximation of 30% of the time) upon spinning up an entirely new localstack instance in docker with the above RDS DB cluster engine, the MySQL container will fail and exit with the following output:
2025-01-13 12:04:38 2025-01-13T19:04:38.844196Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
2025-01-13 12:04:38 2025-01-13T19:04:38.844508Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2025-01-13 12:04:38 2025-01-13T19:04:38.844537Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-01-13 12:04:38 2025-01-13T19:04:38.844733Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
2025-01-13 12:04:38 2025-01-13 19:04:38+00:00 [ERROR] [Entrypoint]: Unable to start server.
I have confirmed this is not specifically due to the host machine docker settings for Virtual Machine Options and file systems, for additional context my current docker VM options file system setting is osxfs (Legacy)
and Docker Desktop is configured to use the Apple Virtualization Framework
.
Expected Behavior
As occurs approximately 70% of the time, it is expected that the MySQL container spun up by localstack successfully initializes:
2025-01-13 13:50:51 2025-01-13 20:50:51+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
2025-01-13 13:50:51
2025-01-13 13:50:51 2025-01-13T20:50:51.608596Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2025-01-13 13:50:51 2025-01-13T20:50:51.620188Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.34) starting as process 1
2025-01-13 13:50:51 2025-01-13T20:50:51.651105Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-01-13 13:50:53 2025-01-13T20:50:53.483854Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-01-13 13:50:54 2025-01-13T20:50:54.632298Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2025-01-13 13:50:54 2025-01-13T20:50:54.633115Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2025-01-13 13:50:54 2025-01-13T20:50:54.684127Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2025-01-13 13:50:55 2025-01-13T20:50:55.115362Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.34' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2025-01-13 13:50:55 2025-01-13T20:50:55.115524Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
How are you starting LocalStack?
With a docker-compose file
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack
command, arguments, or docker-compose.yml
)
docker-compose.yml:
services:
localstack:
container_name: localstack
image: localstack/localstack-pro:4
restart: unless-stopped
ports:
- '4566:4566' # LocalStack Gateway
- '4510-4559:4510-4559' # external services port range
- '443:9443'
environment:
- DEBUG=${DEBUG-}
- LAMBDA_EXECUTOR=docker
- DOCKER_HOST=unix:///var/run/docker.sock
- EDGE_PORT=4566
- SERVICES=sqs,sns,ses,dynamodb,lambda,kms,s3,elasticache,rds,secretsmanager
- AWS_DEFAULT_REGION=us-west-2
- SNAPSHOT_LOAD_STRATEGY=ON_STARTUP
- SNAPSHOT_SAVE_STRATEGY=ON_SHUTDOWN
- PERSISTENCE=1
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:- }
volumes:
- './.localstack/.volume:/var/lib/localstack'
- ./.localstack/init-scripts:/etc/localstack/init/ready.d
- '/var/run/docker.sock:/var/run/docker.sock'
- './.localstack/.redis:/opt/data/redis'
- './.localstack/shutdown-scripts:/etc/localstack/init/shutdown.d'
- './.localstack/.eml:/var/lib/localstack/state/ses'
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
Inside of my localstack init shell script, this initializes the RDS cluster:
RDS_CLUSTER_NAME=local-rds-cluster-01
RDS_ENGINE=aurora-mysql
RDS_ENGINE_VERSION=8.0.mysql_aurora.3.06.0
RDS_PORT=4511
RDS_DB_NAME=myDataBaseName
RDS_DB_USER=REDACTED
RDS_DB_PASS=REDACTED
aws rds create-db-cluster \
--db-cluster-identifier $RDS_CLUSTER_NAME \
--engine $RDS_ENGINE \
--engine-version $RDS_ENGINE_VERSION \
--port $RDS_PORT \
--database-name $RDS_DB_NAME \
--master-username $RDS_DB_USER \
--master-user-password $RDS_DB_PASS \
--endpoint-url=http://localhost:4566 \
--profile=localstack
Environment
- OS: macOS v15.1.1
- LocalStack: Pro via Docker (`localstack/localstack-pro:4`)
LocalStack version: v4.0.3
LocalStack Docker image sha: sha256:062e6335d102649dbb7c455be2bee492414c6ac9c64a5f4d9589b843037d4f7c
LocalStack build date: 2024-11-29
LocalStack build git hash: 425d18c9b
Anything else?
No response