Can't create website anymore

Q: Date/Time this occurred (Provide your time zone also)
Monday, August 28, 2023 (GMT+2)

Q: DevKinsta Version
Version 2.11.0 (2.11.0.7044)

Q: OS Version
Mac Ventura 13.4.1

Q: Docker Desktop Version
4.19.0 (106363)

Q: Detailed Description of the Problem
When I try to create a site, the process stops at 20%.
The app used to work and I didn’t do anything different, I have some website installed that doens’t work anymore (can’t connect to the database).
This is the app log. Thanks !

[2023-08-28 11:12:36.097] [info]  [containerExec] Command 'mysql -u root -p****** -e "create database bricoleursdedouceurs;"' on devkinsta_db finished with exit code 1
[2023-08-28 11:12:36.097] [error] [ipcMainStep] Error in operation SITE_CREATION, step database: Error: Error (1): hERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111)
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:955997
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2233687)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2236221)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2234462)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2225709)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2226008)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-08-28 11:12:36.115] [info]  [ProgressIndicator] { isFailed: true, isOpen: true }
[2023-08-28 11:12:36.984] [info]  [createDatabase] Creating database
[2023-08-28 11:12:36.984] [info]  [createNewDb] Create database: bricoleursdedouceurs
[2023-08-28 11:12:36.984] [info]  [dockerUtil/getContainer] Get 'devkinsta_db' Docker container
[2023-08-28 11:12:36.985] [warn]  {
  host: '127.0.0.1',
  mariadb: {
    name: 'devkinsta_db',
    user: 'root',
    password: 'Oc2ZdwpewY3GDAD4',
    containerId: 'devkinsta_db',
    port: '15100'
  },
  adminer: {
    containerId: '20071c0cef5fe30d6bbbd30ab83b48984f850e7f34d0b5e2291ecea7d5b3a51d',
    name: 'devkinsta_adminer',
    port: 15200
  },
  mailhog: {
    containerId: 'devkinsta_mailhog',
    name: 'devkinsta_mailhog',
    port: '15400'
  },
  fpm: {
    containerId: 'devkinsta_fpm',
    name: 'devkinsta_fpm',
    publicFolder: '/Users/Mat/DevKinsta/public',
    privateFolder: '/Users/Mat/DevKinsta/private',
    logsFolder: '/Users/Mat/DevKinsta/logs'
  },
  nginx: {
    containerId: 'devkinsta_nginx',
    name: 'devkinsta_nginx',
    kinstaFolder: '/Users/Mat/DevKinsta/kinsta',
    publicFolder: '/Users/Mat/DevKinsta/public',
    privateFolder: '/Users/Mat/DevKinsta/private',
    logsFolder: '/Users/Mat/DevKinsta/logs'
  }
}
[2023-08-28 11:12:37.021] [info]  [ProgressIndicator] { isFailed: false, isOpen: true }
[2023-08-28 11:12:37.089] [info]  [containerExec] Command 'mysql -u root -p****** -e "create database bricoleursdedouceurs;"' on devkinsta_db finished with exit code 1
[2023-08-28 11:12:37.089] [error] [ipcMainStep] Error in operation SITE_CREATION, step database: Error: Error (1): hERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111)
    at /Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:2:955997
    at tryCatch (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2233687)
    at Generator.<anonymous> (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2236221)
    at Generator.next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2234462)
    at asyncGeneratorStep (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2225709)
    at _next (/Applications/DevKinsta.app/Contents/Resources/app.asar/main.prod.js:8:2226008)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-08-28 11:12:37.112] [info]  [ProgressIndicator] { isFailed: true, isOpen: true }

Hi @Mathieu :wave:

It looks like the MySQL server is missing the socket file, so may just require a full restart of your computer.

Can you try that and let us know if that works?

If not, we’ll try some other steps

Best regards,
Zach

Thanks for your reply.

I already tried that 2 times without any results :confused:

Hi Mathieu :wave:

Thank you for your reply!

Based on the previous logs you provided:

[2023-08-28 11:12:36.097] [info]  [containerExec] Command 'mysql -u root -p****** -e "create database bricoleursdedouceurs;"' on devkinsta_db finished with exit code 1
[2023-08-28 11:12:36.097] [error] [ipcMainStep] Error in operation SITE_CREATION, step database: Error: Error (1): hERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111)

it seems somehow DevKinsta couldn’t execute that mysql command line on your “devkinsta_db” database container (in your Docker) - it may be something with the mysql root user’s password possibly :thinking:

Just to be sure if that’s the case, let’s test and see if you’re able to login to that “devkinsta_db” database container (in your Docker) with the “root” user and its password manually by doing the following:

  1. On that Docker Desktop, click on the “devkinsta_db” container

  2. Then, click on the “Inspect” tab, and locate for the MYSQL_ROOT_PASSWORD , and copy the password shown there (e.g.: in your text editor or something).

  3. Then, click on the “Terminal” tab, and there, type:
    mysql -u root -p

  4. When you’re prompted to Enter the password, you can paste the password you copied before (from step 2 above) - and see you are able to login with it.

  5. If you’re able to login with that mysql root user/password, you will be able to perform mysql command line ( such as: create database bricoleursdedouceurs; for example, to create this new database in that “devkinsta_db” database container named as “bricoleursdedouceurs” ). As shown in the following screenshot I took on my Docker Desktop (I’m using Windows 11 pro though)


    (as shown above, I was able to login with the root password to that db container and was able to execute that db creation manually - and that means DevKinsta should do the same just fine).

Please let us know again the results from your end :slight_smile:

Regards,
Agus

Thanks. I tried what you asked and the result is this :

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111)

As a reminder, all website runned by devkinsta can’t connect to the database.

Hi @Mathieu, hoping that this will give a more detailed error, can you please do the following:

  1. Open the devkinsta_db Terminal in Docker
  2. Run the command mysqladmin -p -h 127.0.0.1 ping
  3. Enter the MYSQL_ROOT_PASSWORD you see in the Inspect tab of the same container

Regards,
Alessandro

This is the result :

mysqladmin: connect to server at '127.0.0.1' failed
error: 'Can't connect to MySQL server on '127.0.0.1' (115)'
Check that mysqld is running and that the socket: '/run/mysqld/mysqld.sock' exists! 

Okay cool, if you ran the previous command in the devkinsta_db container, let’s check if the file exists, run the following command:

ls -la /run/mysqld/mysqld.sock

And the result is :

srwxrwxrwx 1 mysql mysql 0 Jul 20 13:55 /run/mysqld/mysqld.sock

Tried that before, I had the feeling that mysqld was not running

Let’s try to delete that file with rm /run/mysqld/mysqld.sock and then restart the devkinsta_db container

I deleted it and restarted the container/
I tried again :

# mysqladmin -p -h 127.0.0.1 ping
Enter password: 
mysqladmin: connect to server at '127.0.0.1' failed
error: 'Can't connect to MySQL server on '127.0.0.1' (115)'
Check that mysqld is running and that the socket: '/run/mysqld/mysqld.sock' exists!

No result for now :confused:

Does ls -la /run/mysqld/mysqld.sock show the new file with the current date? :thinking:

No :

ls: cannot access '/run/mysqld/mysqld.sock': No such file or directory

I know that this doesn’t sound like it is, but I believe that’s progress :smile:
Please run service mariadb start and send us a screenshot

Ah ah don’t worry. I follow what the doctor is saying ! :slight_smile:

# service mariadb start
 * /etc/init.d/mariadb: ERROR: The partition with  is too full!

And :

# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          59G   57G     0 100% /
tmpfs            64M     0   64M   0% /dev
shm              64M     0   64M   0% /dev/shm
/dev/vda1        59G   57G     0 100% /etc/hosts
tmpfs           3.9G     0  3.9G   0% /sys/firmware

Can you please access the Docker settings page, move into the Resources tab and try to increase the disk space?

I am unsure if this step will require a Docker restart

To be certain that I had enough space I also made a docker system prune to delete old stuff.
And I added more space.
And it’s working :slight_smile:
Thanks a lot !
For the solution (that you found), let me resume it here for people who will come next :
Do a :

docker system prune

And access the Docker settings page and add more disk space in the Resources tab. It will restart automatically.

Thanks again for your help !

You are very welcome @Mathieu , glad we were able to resolve this :+1:

Regards,
Alessandro

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.