Docker server crashes frequently and IDEA can't connect to it

My docker always crashes, resulting in my IDEA not being able to connect to the docker.

The error message is:

Looks like my machine was missing the file docker.sock. Checked. The file isn’t included in the /var/run/.

I checked error logs but without any idea about how to fix the issue. Does anyone know how to solve this?

Logs are:

-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2022-08-11T19:06:54+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2022-08-12T16:02:18+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2022-09-03T00:44:37+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2022-09-12T23:15:21+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
com.docker.dev-envs.stderr: time=“2022-09-12T23:15:21+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2022-10-01T00:19:40+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-01-16T17:37:28+08:00” level=fatal msg=“http: Server closed”
com.docker.dev-envs.stderr: time=“2023-01-16T17:37:28+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-02-03T10:45:26+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-02-09T19:11:30+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-04-06T17:37:05+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-04-20T11:05:14+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
com.docker.dev-envs.stderr: time=“2023-04-20T11:05:14+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-04-21T17:13:26+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-04-22T21:18:44+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-05-22T18:04:55+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-06-07T22:10:25+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-07-26T20:58:00+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-07-28T19:12:20+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-08-10T21:36:09+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-08-29T13:12:25+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-09-03T23:57:15+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-09-11T00:10:14+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-09-13T01:29:07+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
com.docker.dev-envs.stderr: time=“2023-09-13T01:29:07+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-09-14T18:17:41+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-10-12T13:01:48+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-10-13T11:39:28+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-11-09T21:58:55+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-11-18T21:03:53+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-11T15:54:41+08:00” level=fatal msg=“http: Server closed”
com.docker.dev-envs.stderr: time=“2023-12-11T15:54:41+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-15T21:14:12+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-16T13:52:03+08:00” level=fatal msg=“http: Server closed”
com.docker.dev-envs.stderr: time=“2023-12-16T13:52:03+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-16T17:06:40+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-22T20:05:00+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-24T00:27:15+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-27T15:18:21+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-27T15:19:12+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-27T16:44:44+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
com.docker.dev-envs.stderr: time=“2023-12-27T16:44:44+08:00” level=fatal msg=“http: Server closed”
-------------------------------------------------------------------------------->8
com.docker.dev-envs.stderr: time=“2023-12-27T16:49:18+08:00” level=fatal msg=“http: Server closed”
com.docker.dev-envs.stderr: time=“2023-12-27T16:49:18+08:00” level=fatal msg=“Signal (terminated) received, stopping\n”
-------------------------------------------------------------------------------->8
[2023-12-27T08:49:52.962991000Z] time=“2023-12-27T16:49:52+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2023-12-27T08:49:52.963027000Z] time=“2023-12-27T16:49:52+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2023-12-27T08:49:52.963554000Z] time=“2023-12-27T16:49:52+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-03T03:33:32.232718000Z] time=“2024-01-03T11:33:32+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-03T03:33:32.232848000Z] time=“2024-01-03T11:33:32+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-03T03:33:32.234846000Z] time=“2024-01-03T11:33:32+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-04T03:30:32.088495000Z] time=“2024-01-04T11:30:32+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-04T03:30:32.088550000Z] time=“2024-01-04T11:30:32+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-04T03:30:32.089879000Z] time=“2024-01-04T11:30:32+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-04T04:46:52.774156000Z] time=“2024-01-04T12:46:52+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-04T04:46:52.774196000Z] time=“2024-01-04T12:46:52+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-04T04:46:52.774484000Z] time=“2024-01-04T12:46:52+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-04T05:01:19.273820000Z] time=“2024-01-04T13:01:19+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-04T05:01:19.273860000Z] time=“2024-01-04T13:01:19+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-04T05:01:19.274682000Z] time=“2024-01-04T13:01:19+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-04T05:14:15.334481000Z] time=“2024-01-04T13:14:15+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-04T05:14:15.334520000Z] time=“2024-01-04T13:14:15+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-04T05:14:15.334980000Z] time=“2024-01-04T13:14:15+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-04T05:25:22.342802000Z] time=“2024-01-04T13:25:22+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-04T05:25:22.342851000Z] time=“2024-01-04T13:25:22+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-04T05:25:22.345168000Z] time=“2024-01-04T13:25:22+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-05T15:21:14.219865000Z] time=“2024-01-05T23:21:14+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-05T15:21:14.219921000Z] time=“2024-01-05T23:21:14+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-05T15:21:14.221342000Z] time=“2024-01-05T23:21:14+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
[2024-01-05T15:23:28.244915000Z] time=“2024-01-05T23:23:28+08:00” level=info msg=“Received signal (terminated)”
[2024-01-05T15:23:28.245774000Z] time=“2024-01-05T23:23:28+08:00” level=info msg=“Context canceled, exiting”
-------------------------------------------------------------------------------->8
[2024-01-05T23:25:21.701150000Z] time=“2024-01-06T07:25:21+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-05T23:25:21.701184000Z] time=“2024-01-06T07:25:21+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-05T23:25:21.702162000Z] time=“2024-01-06T07:25:21+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
[2024-01-09T09:05:07.809181000Z] time=“2024-01-09T17:05:07+08:00” level=info msg=“Received signal (terminated)”
[2024-01-09T09:05:07.809255000Z] time=“2024-01-09T17:05:07+08:00” level=info msg=“Context canceled, exiting”
-------------------------------------------------------------------------------->8
[2024-01-09T09:06:25.298900000Z] time=“2024-01-09T17:06:25+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-09T09:06:25.298940000Z] time=“2024-01-09T17:06:25+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-09T09:06:25.299683000Z] time=“2024-01-09T17:06:25+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-10T11:27:43.682502000Z] time=“2024-01-10T19:27:43+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-10T11:27:43.682532000Z] time=“2024-01-10T19:27:43+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-10T11:27:43.682768000Z] time=“2024-01-10T19:27:43+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-10T11:38:52.515378000Z] time=“2024-01-10T19:38:52+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-10T11:38:52.515485000Z] time=“2024-01-10T19:38:52+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-10T11:38:52.515650000Z] time=“2024-01-10T19:38:52+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”
-------------------------------------------------------------------------------->8
[2024-01-10T14:17:25.342635000Z] time=“2024-01-10T22:17:25+08:00” level=info msg=“DOCKER_HOST=unix:///Users/raywu/.docker/run/docker.sock”
[2024-01-10T14:17:25.342670000Z] time=“2024-01-10T22:17:25+08:00” level=info msg=“setting PATH=/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/raywu/.docker/bin:/usr/local/bin:/usr/local/sbin”
[2024-01-10T14:17:25.342874000Z] time=“2024-01-10T22:17:25+08:00” level=info msg=“Starting server (socket=docker-dev-env-api.sock, storeDir=/Users/raywu/.docker/devenvironments)”