A typographical error - insteed of _ in creating global db service when doing "ee service enable db" on homebrew easyengine
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con las referencias a los nombres de contenedor en los logs de ee service enable db y ee site create, y después inspecciona las ubicaciones mencionadas en site-utils.php, class-ee-site.php y WordPress.php. Reproduce el flujo de Homebrew/macOS y compara el nombre creado por Docker Compose con el nombre utilizado por el comando del sitio; se considera completado cuando la activación de la base de datos y la creación de un sitio de WordPress terminan sin fallos al buscar el contenedor.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hello and thank you all who are working on Easyengine Im really grateful for your work you put in to it.
This is my first Issue-report so bear with me. I think the issue is related to a discussion in https://github.com/EasyEngine/easyengine/discussions/1659 Originally posted by venkateshwarans January 22, 2022.
The problem occurs with fresh installation on mac with homebrew installations of easyengine.
After a unproblematic installation I run the command "ee service enable db" and it creates the "services-global-db-1" docker container.
Log shows:
[27-02-2022 23:37:36] ee.DEBUG: argv: /opt/homebrew/bin/ee service enable db
[27-02-2022 23:37:36] ee.DEBUG: Running command: service enable
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: ip route show | cut -d ' ' -f1 | grep ^10
[27-02-2022 23:37:36] ee.DEBUG: STDERR: sh: ip: command not found
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: ip route show | cut -d ' ' -f1 | grep ^10
[27-02-2022 23:37:36] ee.DEBUG: STDERR: sh: ip: command not found
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: which docker
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 0
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-db_1
[27-02-2022 23:37:36] ee.DEBUG: STDOUT:
[27-02-2022 23:37:36] ee.DEBUG: STDERR: Error: No such object: services_global-db_1
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: which docker
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 0
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-db_1
[27-02-2022 23:37:36] ee.DEBUG: STDOUT:
[27-02-2022 23:37:36] ee.DEBUG: STDERR: Error: No such object: services_global-db_1
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: -----------------------
[27-02-2022 23:37:36] ee.DEBUG: COMMAND: docker-compose -f docker-compose.yml up -d global-db
[27-02-2022 23:37:36] ee.DEBUG: STDERR: Network ee-global-frontend-network Creating Network ee-global-frontend-network Created Network ee-global-backend-network Creating Network ee-global-backend-network Created Container services-global-db-1 Creating Container services-global-db-1 Created Container services-global-db-1 Starting Container services-global-db-1 Started
[27-02-2022 23:37:36] ee.DEBUG: RETURN CODE: 0
Running the command "ee service enable nginx-proxy creates the services_nginx-proxy_1 container all fine.
Running the command "ee site create testsite.test --type=wp" results in a error with no site created.
When I change the name (with docker rename function) of my container from "service-global-db-1" to "services_global-db_1" the command "ee site create testsite.test --type=wp" works fine without any problem 👍.
I think there is a typo somewhere in the EE code but I don't have the skills to find it (although I did try). That typo lead to a more cryptic uncaught error message in the terminal verbose about a fatal error involving symfony trying to rename a file that probably don't exist. That terminal information lead me on a wild google ghost hunt involving MacOS, writepermisson, chmod, docker, ee, /etc/hosts and a lot of trying and failing with a factoryreset of my mac as a result. Let me tell you it didn't end well 😳😂👍.
Anyway.
I have been able to reproduce the error and fixing it the same way every time (renaming the container to "services_global-db_1".
Im pretty sure its a typo somewhere in the EE code and if it isn't then Im really sorry.
I did notice that the docker-compose.yml doesn't contain a name for the global db but for the nginx-proxy. Maybe that has something to do with it?
This is the log for command "ee site create testsite.test --type=wp.
Log show all good for the first part with nginx-proxy the rest is a bit of a problem.
[27-02-2022 23:42:43] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-db_1
[27-02-2022 23:42:43] ee.DEBUG: STDOUT:
[27-02-2022 23:42:43] ee.DEBUG: STDERR: Error: No such object: services_global-db_1
[27-02-2022 23:42:43] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:42:43] ee.DEBUG: -----------------------
[27-02-2022 23:42:43] ee.DEBUG: COMMAND: which docker
[27-02-2022 23:42:43] ee.DEBUG: RETURN CODE: 0
[27-02-2022 23:42:43] ee.DEBUG: -----------------------
[27-02-2022 23:42:43] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-db_1
[27-02-2022 23:42:44] ee.DEBUG: STDOUT:
[27-02-2022 23:42:44] ee.DEBUG: STDERR: Error: No such object: services_global-db_1
[27-02-2022 23:42:44] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
[27-02-2022 23:42:44] ee.DEBUG: COMMAND: docker-compose -f docker-compose.yml up -d global-db
[27-02-2022 23:42:44] ee.DEBUG: STDERR: Container services-global-db-1 Running
[27-02-2022 23:42:44] ee.DEBUG: RETURN CODE: 0
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
[27-02-2022 23:42:44] ee.DEBUG: COMMAND: docker cp /var/folders/n_/4xgkzj2s6zsby7ws4ss85qh00000gn/T/db_exec services_global-db_1:/db_exec
[27-02-2022 23:42:44] ee.DEBUG: STDERR: Error: No such container:path: services_global-db_1:/
[27-02-2022 23:42:44] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
[27-02-2022 23:42:44] ee.DEBUG: COMMAND: docker exec services_global-db_1 sh db_exec
[27-02-2022 23:42:44] ee.DEBUG: STDERR: Error: No such container: services_global-db_1
[27-02-2022 23:42:44] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:42:44] ee.DEBUG: -----------------------
_This repeats for a about 11 seconds and about 400 rows 😊 and then continues with: _
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: COMMAND: docker cp /var/folders/n_/4xgkzj2s6zsby7ws4ss85qh00000gn/T/db_exec services_global-db_1:/db_exec
[27-02-2022 23:43:55] ee.DEBUG: STDERR: Error: No such container:path: services_global-db_1:/
[27-02-2022 23:43:55] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: COMMAND: docker exec services_global-db_1 sh db_exec
[27-02-2022 23:43:55] ee.DEBUG: STDERR: Error: No such container: services_global-db_1
[27-02-2022 23:43:55] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.INFO: ======================== site cleanup start ========================
[27-02-2022 23:43:55] ee.WARNING: Could not create user testsite.test-2JsxTn. Please check logs.
[27-02-2022 23:43:55] ee.WARNING: Initiating clean-up.
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: COMMAND: docker volume ls --filter="label=org.label-schema.vendor=EasyEngine" --filter="label=io.easyengine.site=testsite.test" -q
[27-02-2022 23:43:55] ee.DEBUG: RETURN CODE: 0
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: COMMAND: docker cp /var/folders/n_/4xgkzj2s6zsby7ws4ss85qh00000gn/T/db_exec services_global-db_1:/db_exec
[27-02-2022 23:43:55] ee.DEBUG: STDERR: Error: No such container:path: services_global-db_1:/
[27-02-2022 23:43:55] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: COMMAND: docker exec services_global-db_1 sh db_exec
[27-02-2022 23:43:55] ee.DEBUG: STDERR: Error: No such container: services_global-db_1
[27-02-2022 23:43:55] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: -----------------------
[27-02-2022 23:43:55] ee.DEBUG: COMMAND: docker cp /var/folders/n_/4xgkzj2s6zsby7ws4ss85qh00000gn/T/db_exec services_global-db_1:/db_exec
[27-02-2022 23:43:56] ee.DEBUG: STDERR: Error: No such container:path: services_global-db_1:/
[27-02-2022 23:43:56] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:43:56] ee.DEBUG: -----------------------
[27-02-2022 23:43:56] ee.DEBUG: -----------------------
[27-02-2022 23:43:56] ee.DEBUG: COMMAND: docker exec services_global-db_1 sh db_exec
[27-02-2022 23:43:56] ee.DEBUG: STDERR: Error: No such container: services_global-db_1
[27-02-2022 23:43:56] ee.DEBUG: RETURN CODE: 1
[27-02-2022 23:43:56] ee.DEBUG: -----------------------
[27-02-2022 23:43:56] ee.WARNING: An Error occurred. Initiating clean-up.
[27-02-2022 23:43:56] site-command.ERROR: Type: 1
[27-02-2022 23:43:56] site-command.ERROR: Message: Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/private/var/folders/n_/4xgkzj2s6zsby7ws4ss85qh00000gn/T/hosts0Hj1iv" to "/etc/hosts". in phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/symfony/filesystem/Filesystem.php:290
Stack trace:
#0 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/symfony/filesystem/Filesystem.php(692): Symfony\Component\Filesystem\Filesystem->rename('/private/var/fo...', '/etc/hosts', true)
1 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/easyengine/site-command/src/helper/site-utils.php(759): Symfony\Component\Filesystem\Filesystem->dumpFile('/etc/hosts', '##\n# Host Datab...')
2 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/easyengine/site-command/src/helper/class-ee-site.php(274): EE\Site\Utils\remove_etc_hosts_entry('testsite.test')
3 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/easyengine/site-type-wp/src/WordPress.php(1606): EE\Site\Type\EE_Site_Command->delete_site(0, 'testsite.test', '/Users/releez/e...', Array)
4 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/easyengine/site-type-wp/src/WordPress.php(408): EE\Site\Type\WordPress->catch_clean(Object(Exception))
5 [internal function]: EE\Site\Type\WordPress->create(Array, Array)
6 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Dispatcher/CommandFactory.php(96): call_user_func(Array, Array, Array)
7 [internal function]: EE\Dispatcher\CommandFactory::EE\Dispatcher{closure}(Array, Array)
8 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Dispatcher/Subcommand.php(272): call_user_func(Object(Closure), Array, Array)
9 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Runner.php(334): EE\Dispatcher\Subcommand->invoke(Array, Array, Array)
10 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/class-ee.php(1184): EE\Runner->run_command(Array, Array)
11 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/easyengine/site-command/src/Site_Command.php(154): EE::run_command(Array, Array)
12 [internal function]: Site_Command->__invoke(Array, Array)
13 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Dispatcher/CommandFactory.php(96): call_user_func(Array, Array, Array)
14 [internal function]: EE\Dispatcher\CommandFactory::EE\Dispatcher{closure}(Array, Array)
15 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Dispatcher/Subcommand.php(272): call_user_func(Object(Closure), Array, Array)
16 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Runner.php(334): EE\Dispatcher\Subcommand->invoke(Array, Array, Array)
17 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Runner.php(357): EE\Runner->run_command(Array, Array)
18 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Runner.php(783): EE\Runner->_run_command_and_exit()
19 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/EE/Bootstrap/LaunchRunner.php(23): EE\Runner->start()
20 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/bootstrap.php(74): EE\Bootstrap\LaunchRunner->process(Object(EE\Bootstrap\BootstrapState))
21 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/init-ee.php(27): EE\bootstrap()
22 phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/php/boot-phar.php(8): include('phar:///opt/hom...')
23 /opt/homebrew/Cellar/easyengine/4.5.3/bin/ee(5): include('phar:///opt/hom...')
24 {main} thrown
[27-02-2022 23:43:56] site-command.ERROR: File: phar:///opt/homebrew/Cellar/easyengine/4.5.3/bin/ee/vendor/symfony/filesystem/Filesystem.php
[27-02-2022 23:43:56] site-command.ERROR: Line: 290
[27-02-2022 23:43:56] ee.WARNING: Exiting gracefully after rolling back. This may take some time.
System Information
- ee cli info
OS | Darwin 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 arm64
Shell | /bin/zsh
PHP binary | /opt/homebrew/Cellar/php/8.1.3/bin/php
PHP version | 8.1.3
php.ini used | /opt/homebrew/etc/php/8.1/php.ini
EE root dir | phar://ee.phar
EE vendor dir | phar://ee.phar/vendor
EE phar path | /Users/myuser
EE packages dir |
EE global config | /Users/releez/easyengine/config/config.yml
EE project config |
EE version | 4.5.3
-
sw_vers;
ProductName: macOS
ProductVersion: 12.2.1
BuildVersion: 21D62 -
docker version:
Client:
Cloud integration: v1.0.22
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:46:56 2021
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server:
Docker Desktop 4.5.0 (74594)
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:43:07 2021
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0 -
Docker Compose version 2.2.3
- Lenguaje dominante
- PHP
- Estrellas
- 2.2k
- Forks
- 423
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de EasyEngine/easyengine
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
EasyEngine/easyengine#1427 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
EasyEngine/easyengine#1893 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
EasyEngine/easyengine#1888 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
How to enable page cache?Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
EasyEngine/easyengine#1875 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
EasyEngine/easyengine#1810 · 2 comentarios · 4 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de EasyEngine/easyengine
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
awslabs/aidlc-workflows#1879 ·
Los mantenedores suelen responder en 1 día
-
bug customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
MagnaCapax/PMSS#1011 ·
Los mantenedores suelen responder en 5 días
-
Talk Review
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
socallinuxexpo/scale-drupal#351 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
code4romania/cpc#47 ·
Los mantenedores suelen responder en 1 día
-
Bug Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día