rtCamp / Frappe-Manager

A CLI tool based on Docker Compose to easily manage Frappe based projects.
MIT License
87 stars 19 forks source link

❌ Error Occured devl.lh : Supervisorctl is not running in frappe service #191

Closed sudhegan closed 1 month ago

sudhegan commented 1 month ago

This issue tracker is only for issues related to Frappe-Manager. Please use https://github.com/rtcamp/frappe-manager/discussions for support questions.

Describe the bug A clear and concise description of what the bug is. cannot start site To Reproduce Steps to reproduce the behavior:

  1. Run command 'fm start {sitename}'
  2. See error ❌ Error Occured devl.lh : Supervisorctl is not running in frappe service Expected behavior A clear and concise description of what you expected to happen.

System information (please complete the following information):

Attach log Please attach logs from ~/frappe/logs/fm.log for faster resolution. fm.log

Additional context Add any other context about the problem here.

Xieyt commented 1 month ago

Seems like supervisord in the frappe container is not able to start. Will need more logs to debug it further @sudhegan Please share frappe container logs using this command docker compose -f ~/frappe/sites/devl.lh/docker-compose.yml logs frappe

sudhegan commented 1 month ago

here is the log output

devllh-frappe  | usermod: no changes
devllh-frappe  | UID and GID updated successfully.
devllh-frappe  | wait-for-it: waiting 120 seconds for global-db:3306
devllh-frappe  | wait-for-it: global-db:3306 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-cache:6379
devllh-frappe  | wait-for-it: devllh-redis-cache:6379 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-queue:6379
devllh-frappe  | wait-for-it: devllh-redis-queue:6379 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-socketio:6379
devllh-frappe  | wait-for-it: devllh-redis-socketio:6379 is available after 0 seconds
devllh-frappe  | Environment: dev
devllh-frappe  | Configuring frappe dev server
devllh-frappe  | Traceback (most recent call last):
devllh-frappe  |   File "<frozen runpy>", line 189, in _run_module_as_main
devllh-frappe  |   File "<frozen runpy>", line 112, in _get_module_details
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/__init__.py", line 1442, in <module>
devllh-frappe  |     @whitelist(methods=["POST", "PUT"])
devllh-frappe  |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/__init__.py", line 862, in innerfn
devllh-frappe  |     from frappe.utils.typing_validations import validate_argument_types
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/utils/typing_validations.py", line 7, in <module>
devllh-frappe  |     from pydantic import ConfigDict
devllh-frappe  | ImportError: cannot import name 'ConfigDict' from 'pydantic' (/workspace/frappe-bench/env/lib/python3.11/site-packages/pydantic/__init__.py)
devllh-frappe  | Setting up user
devllh-frappe  | usermod: no changes
devllh-frappe  | UID and GID updated successfully.
devllh-frappe  | wait-for-it: waiting 120 seconds for global-db:3306
devllh-frappe  | wait-for-it: global-db:3306 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-cache:6379
devllh-frappe  | wait-for-it: devllh-redis-cache:6379 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-queue:6379
devllh-frappe  | wait-for-it: devllh-redis-queue:6379 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-socketio:6379
devllh-frappe  | wait-for-it: devllh-redis-socketio:6379 is available after 0 seconds
devllh-frappe  | Environment: dev
devllh-frappe  | Configuring frappe dev server
devllh-frappe  | Traceback (most recent call last):
devllh-frappe  |   File "<frozen runpy>", line 189, in _run_module_as_main
devllh-frappe  |   File "<frozen runpy>", line 112, in _get_module_details
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/__init__.py", line 1442, in <module>
devllh-frappe  |     @whitelist(methods=["POST", "PUT"])
devllh-frappe  |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/__init__.py", line 862, in innerfn
devllh-frappe  |     from frappe.utils.typing_validations import validate_argument_types
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/utils/typing_validations.py", line 7, in <module>
devllh-frappe  |     from pydantic import ConfigDict
devllh-frappe  | ImportError: cannot import name 'ConfigDict' from 'pydantic' (/workspace/frappe-bench/env/lib/python3.11/site-packages/pydantic/__init__.py)
devllh-frappe  | Setting up user
devllh-frappe  | usermod: no changes
devllh-frappe  | UID and GID updated successfully.
devllh-frappe  | wait-for-it: waiting 120 seconds for global-db:3306
devllh-frappe  | wait-for-it: global-db:3306 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-cache:6379
devllh-frappe  | wait-for-it: devllh-redis-cache:6379 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-queue:6379
devllh-frappe  | wait-for-it: devllh-redis-queue:6379 is available after 0 seconds
devllh-frappe  | wait-for-it: waiting 120 seconds for devllh-redis-socketio:6379
devllh-frappe  | wait-for-it: devllh-redis-socketio:6379 is available after 0 seconds
devllh-frappe  | Environment: dev
devllh-frappe  | Configuring frappe dev server
devllh-frappe  | Traceback (most recent call last):
devllh-frappe  |   File "<frozen runpy>", line 189, in _run_module_as_main
devllh-frappe  |   File "<frozen runpy>", line 112, in _get_module_details
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/__init__.py", line 1442, in <module>
devllh-frappe  |     @whitelist(methods=["POST", "PUT"])
devllh-frappe  |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/__init__.py", line 862, in innerfn
devllh-frappe  |     from frappe.utils.typing_validations import validate_argument_types
devllh-frappe  |   File "/workspace/frappe-bench/apps/frappe/frappe/utils/typing_validations.py", line 7, in <module>
devllh-frappe  |     from pydantic import ConfigDict
devllh-frappe  | ImportError: cannot import name 'ConfigDict' from 'pydantic' (/workspace/frappe-bench/env/lib/python3.11/site-packages/pydantic/__init__.py)
Xieyt commented 1 month ago

Your frappe package is broken. There might be issue with required deps in frappe not available in env or frappe code is broken as shown in the above log.

Using the below command you can open your site shell, then use bench commands to fix the frappe issue. docker compose -f ~/frappe/sites/devl.lh/docker-compose.yml run --rm --user frappe --entrypoint zsh --workdir /workspace/frappe-bench frappe

sudhegan commented 1 month ago

thanks the above cmd opened a shell for the bench and after running bench setup requirements the problem solved it showed a warning ''ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. pygls 0.10.2 requires pydantic<1.9,>=1.7, but you have pydantic 2.7.3 which is incompatible.'' but the site started successfully is the warning important and reported to frappe?

Xieyt commented 1 month ago

The above warning occurs when two python packages depend on same library but their is version difference between two. Specifically, pygls 0.10.2 requires pydantic versions between 1.7 and 1.9, but you have pydantic 2.7.3 installed, which is outside this range. While your site has started successfully, such conflicts can potentially lead to runtime errors or unexpected behavior, so it's a good practice to address them.