Skip to content

mysql doesn't work: "Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock." #157

@AkihiroSuda

Description

@AkihiroSuda

mysql:5.7 fails with "Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock." error:

$ sudo nerdctl run --rm -e MYSQL_RANDOM_ROOT_PASSWORD=1 mysql:5.7
2021-04-06 09:54:04+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
2021-04-06 09:54:04+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-04-06 09:54:04+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
2021-04-06 09:54:04+00:00 [Note] [Entrypoint]: Initializing database files
2021-04-06T09:54:04.538227Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2021-04-06T09:54:04.538279Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2021-04-06T09:54:04.538422Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-04-06T09:54:04.681246Z 0 [Warning] InnoDB: New log files created, LSN=45790
2021-04-06T09:54:04.702290Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2021-04-06T09:54:04.757163Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 05a4ce2c-96be-11eb-ae5d-6a02f70cbce2.
2021-04-06T09:54:04.758657Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-04-06T09:54:05.245398Z 0 [Warning] CA certificate ca.pem is self signed.
2021-04-06T09:54:05.312521Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2021-04-06 09:54:07+00:00 [Note] [Entrypoint]: Database files initialized
2021-04-06 09:54:07+00:00 [Note] [Entrypoint]: Starting temporary server
2021-04-06 09:54:07+00:00 [Note] [Entrypoint]: Waiting for server startup
2021-04-06T09:54:07.406640Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2021-04-06T09:54:07.406802Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2021-04-06T09:54:07.562373Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-04-06T09:54:07.563477Z 0 [Note] mysqld (mysqld 5.7.33) starting as process 79 ...
2021-04-06T09:54:07.567023Z 0 [Note] InnoDB: PUNCH HOLE support available
2021-04-06T09:54:07.567156Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-04-06T09:54:07.567244Z 0 [Note] InnoDB: Uses event mutexes
2021-04-06T09:54:07.567283Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-04-06T09:54:07.567320Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-04-06T09:54:07.567359Z 0 [Note] InnoDB: Using Linux native AIO
2021-04-06T09:54:07.567566Z 0 [Note] InnoDB: Number of pools: 1
2021-04-06T09:54:07.567771Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-04-06T09:54:07.569022Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-04-06T09:54:07.574574Z 0 [Note] InnoDB: Completed initialization of buffer pool
2021-04-06T09:54:07.576370Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-04-06T09:54:07.588582Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2021-04-06T09:54:07.597812Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-04-06T09:54:07.598199Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-04-06T09:54:07.612405Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-04-06T09:54:07.613822Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2021-04-06T09:54:07.614059Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2021-04-06T09:54:07.615034Z 0 [Note] InnoDB: Waiting for purge to start
2021-04-06T09:54:07.665894Z 0 [Note] InnoDB: 5.7.33 started; log sequence number 2746831
2021-04-06T09:54:07.666379Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-04-06T09:54:07.666880Z 0 [Note] Plugin 'FEDERATED' is disabled.
2021-04-06T09:54:07.668750Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210406  9:54:07
2021-04-06T09:54:07.674449Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2021-04-06T09:54:07.675043Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2021-04-06T09:54:07.676457Z 0 [Warning] CA certificate ca.pem is self signed.
2021-04-06T09:54:07.676935Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2021-04-06T09:54:07.677496Z 0 [ERROR] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2021-04-06T09:54:07.677657Z 0 [ERROR] Unable to setup unix socket lock file.
2021-04-06T09:54:07.677718Z 0 [ERROR] Aborting

2021-04-06T09:54:07.677938Z 0 [Note] Binlog end
2021-04-06T09:54:07.678252Z 0 [Note] Shutting down plugin 'ngram'
2021-04-06T09:54:07.678561Z 0 [Note] Shutting down plugin 'partition'
2021-04-06T09:54:07.678647Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2021-04-06T09:54:07.678714Z 0 [Note] Shutting down plugin 'ARCHIVE'
2021-04-06T09:54:07.678774Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2021-04-06T09:54:07.678929Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2021-04-06T09:54:07.679026Z 0 [Note] Shutting down plugin 'MyISAM'
2021-04-06T09:54:07.679225Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2021-04-06T09:54:07.679362Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2021-04-06T09:54:07.679428Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2021-04-06T09:54:07.679486Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2021-04-06T09:54:07.679558Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2021-04-06T09:54:07.679621Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2021-04-06T09:54:07.679662Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2021-04-06T09:54:07.679725Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2021-04-06T09:54:07.679848Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2021-04-06T09:54:07.679908Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2021-04-06T09:54:07.679958Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2021-04-06T09:54:07.680085Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2021-04-06T09:54:07.680210Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2021-04-06T09:54:07.680320Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2021-04-06T09:54:07.680367Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2021-04-06T09:54:07.680510Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2021-04-06T09:54:07.680570Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2021-04-06T09:54:07.680611Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2021-04-06T09:54:07.680689Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2021-04-06T09:54:07.680782Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2021-04-06T09:54:07.680895Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2021-04-06T09:54:07.680964Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2021-04-06T09:54:07.681066Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2021-04-06T09:54:07.681146Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2021-04-06T09:54:07.681181Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2021-04-06T09:54:07.681333Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2021-04-06T09:54:07.681423Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2021-04-06T09:54:07.681493Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2021-04-06T09:54:07.681674Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2021-04-06T09:54:07.681758Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2021-04-06T09:54:07.681823Z 0 [Note] Shutting down plugin 'InnoDB'
2021-04-06T09:54:07.682321Z 0 [Note] InnoDB: FTS optimize thread exiting.
2021-04-06T09:54:07.683916Z 0 [Note] InnoDB: Starting shutdown...
2021-04-06T09:54:07.785292Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2021-04-06T09:54:07.785637Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 210406  9:54:07
2021-04-06T09:54:09.298766Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2746850
2021-04-06T09:54:09.302354Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-04-06T09:54:09.302803Z 0 [Note] Shutting down plugin 'MEMORY'
2021-04-06T09:54:09.303010Z 0 [Note] Shutting down plugin 'CSV'
2021-04-06T09:54:09.303350Z 0 [Note] Shutting down plugin 'sha256_password'
2021-04-06T09:54:09.303536Z 0 [Note] Shutting down plugin 'mysql_native_password'
2021-04-06T09:54:09.303974Z 0 [Note] Shutting down plugin 'binlog'
2021-04-06T09:54:09.304578Z 0 [Note] mysqld: Shutdown complete

2021-04-06 09:54:38+00:00 [ERROR] [Entrypoint]: Unable to start server.

System info

$ sudo nerdctl info
Client:
 Namespace:     default
 Debug Mode:    false

Server:
 Server Version: v1.5.0-beta.4-95-g9a9bd0975
 Storage Driver: overlayfs
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Log: json-file
  Storage: native overlayfs fuse-overlayfs stargz
 Security Options:
  apparmor
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.8.0-48-generic
 Operating System: Ubuntu 20.10
 OSType: linux
 Architecture: x86_64
 Name: suda-ws01
 ID: 343cfb49-cce9-453f-b21c-e5d22ca2cb47
$ sudo nerdctl version
Client:
 Version:       v0.7.3
 Git commit:    77801f5042e05ed3cac52efbeb18aafc09795675

Server:
 containerd:
  Version:      v1.5.0-beta.4-95-g9a9bd0975
  Revision:     9a9bd097564b0973bfdb0b39bf8262aa1b7da6aa

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions