Не работает Sail Laravel
На Ubuntu 24.04 LTS при запуске sail
в приложении Laravel
на адресе и порте, который выводится в консоли, находится заглушка апатча. Если убить процесс апатча и еще раз запустить sail, то выплюнет ошибку доступа (насколько я это понимаю) к файлам. Причем ошибка даже не ларавел, а симфони
Пробовал в уже существующем проекте и создавал новый. Ситуация аналогична
Логи консоли, если apache2 не убить (появляется заглушка апача):
nv@inv:~/Рабочий стол/Новая папка (2)$ ./vendor/bin/sail up [+]
Running 3/2 ✔ Network 2_sail Created
0.1s ✔ Container 2-mysql-1 Created 0.0s ✔ Container 2-laravel.test-1 Created 0.0s Attaching to laravel.test-1, mysql-1 mysql-1 | [Entrypoint] MySQL Docker Image 8.0.32-1.2.11-server mysql-1 |
[Entrypoint] Starting MySQL 8.0.32-1.2.11-server Gracefully
stopping... (press Ctrl+C again to force) Error response from daemon:
driver failed programming external connectivity on endpoint
2-laravel.test-1
(8c8e8d3ec2ecaa3ecb2922dc021b594e1d56619cac7c5f2ad6f24ce7fc4a3367):
failed to bind port 0.0.0.0:80/tcp: Error starting userland proxy:
listen tcp4 0.0.0.0:80: bind: address already in use
Если убить (тогда появляется ошибка симфони):
inv@inv:~/Рабочий стол/Новая папка (2)$ ./vendor/bin/sail up [+]
Running 3/2 ✔ Network 2_sail Created
0.0s ✔ Container 2-mysql-1 Created 0.0s ✔ Container 2-laravel.test-1 Created 0.0s Attaching to laravel.test-1, mysql-1 mysql-1 | [Entrypoint] MySQL Docker Image 8.0.32-1.2.11-server mysql-1 |
[Entrypoint] Starting MySQL 8.0.32-1.2.11-server mysql-1 |
2024-07-07T00:54:20.423411Z 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.
mysql-1 | 2024-07-07T00:54:20.424345Z 0 [System] [MY-010116]
[Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
mysql-1 | 2024-07-07T00:54:20.429415Z 1 [System] [MY-013576]
[InnoDB] InnoDB initialization has started. laravel.test-1 |
2024-07-07 00:54:20,480 INFO Set uid to user 0 succeeded
laravel.test-1 | 2024-07-07 00:54:20,481 INFO supervisord started
with pid 1 mysql-1 | 2024-07-07T00:54:20.552812Z 1 [System]
[MY-013577] [InnoDB] InnoDB initialization has ended. mysql-1
| 2024-07-07T00:54:20.732522Z 0 [Warning] [MY-010068] [Server] CA
certificate ca.pem is self signed. mysql-1 |
2024-07-07T00:54:20.732543Z 0 [System] [MY-013602] [Server] Channel
mysql_main configured to support TLS. Encrypted connections are now
supported for this channel. mysql-1 |
2024-07-07T00:54:20.750583Z 0 [System] [MY-011323] [Server] X Plugin
ready for connections. Bind-address: '::' port: 33060, socket:
/var/run/mysqld/mysqlx.sock mysql-1 |
2024-07-07T00:54:20.750635Z 0 [System] [MY-010931] [Server]
/usr/sbin/mysqld: ready for connections. Version: '8.0.32' socket:
'/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL.
laravel.test-1 | 2024-07-07 00:54:21,483 INFO spawned: 'php' with pid
16 laravel.test-1 | laravel.test-1 | INFO Server running on
[http://0.0.0.0:80]. laravel.test-1 | laravel.test-1 | Press
Ctrl+C to stop the server laravel.test-1 | laravel.test-1 |
2024-07-07 00:54:23,123 INFO success: php entered RUNNING state,
process has stayed up for > than 1 seconds (startsecs)
При этом в обоих случаях миграции работают, значит бд пашет, но при команде php artisan cache:clear - ошибка
inv@inv:~/Рабочий стол/Новая папка (2)$ php artisan cache:clear
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for
mysql failed: Temporary failure in name resolution (Connection: mysql,
SQL: delete from `cache`)
at
vendor/laravel/framework/src/Illuminate/Database/Connection.php:813
809▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
810▕ );
811▕ }
812▕ ➜ 813▕ throw new QueryException(
814▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
815▕ );
816▕ }
817▕ }
+32 vendor frames
33 artisan:13
Illuminate\Foundation\Application::handleCommand()