Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

A typographical error - insteed of _ in creating global db service when doing "ee service enable db" on homebrew easyengine

Đang mở
#1,671 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, docker-compose, php
Lĩnh vực
cli, devops

Hướng nghiên cứu

Bắt đầu với các tham chiếu tên container trong các log của ee service enable db và ee site create, sau đó kiểm tra các vị trí được đề cập trong site-utils.php, class-ee-site.php và WordPress.php. Tái hiện luồng Homebrew/macOS và so sánh tên được Docker Compose tạo với tên được lệnh site sử dụng; được xem là hoàn tất khi việc bật cơ sở dữ liệu và tạo một site WordPress hoàn thành mà không có lỗi tra cứu container.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
PHP
Star
2.2k
Fork
422
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của EasyEngine/easyengine

Tất cả issue của EasyEngine/easyengine

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.