Mysql process down with mysqld: Can't read dir of '/var/vcap/sys/run/mysql/lf-state
book
Article ID: 409738
calendar_today
Updated On:
Products
Services Suite
Issue/Introduction
Customer mysql process was down. In mysql.stderr.out logs we see below error
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
mysqld: Can't read dir of '/var/vcap/sys/run/mysql/lf-state' (Errcode: 2 - No such file or directory)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
mysqld: Can't read dir of '/var/vcap/sys/run/mysql/lf-state' (Errcode: 2 - No such file or directory)
Cause
Runtime dirs under /var/vcap/sys/run/ are supposed to be created by job control scripts during start. If it is missing, it usually means: The job templates are corrupted or A manual restart was attempted outside of BOSH/monit
Resolution
1. Check if directory exists
ls -ld /var/vcap/sys/run/mysql/lf-state
If missing, create it:
sudo mkdir -p /var/vcap/sys/run/mysql/lf-state
2. Fix ownership & permissions
sudo chown -R vcap:vcap /var/vcap/sys/run/mysql
sudo chmod -R 755 /var/vcap/sys/run/mysql
(In BOSH VMs, MySQL often runs as vcap user. If it’s mysql, replace accordingly.)