rtCamp/Frappe-Manager

service "frappe" is not running in fm.log file

SujinIn opened this issue ยท 4 comments

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.
-> I failed create website.

To Reproduce
Steps to reproduce the behavior:

  1. Run command '...'
  2. See error

Here is error message.
my account name is zfradmin.
And I wrote my typing by Bold.

zfradmin@zfrerp:$ fm --version
0.12.0
zfradmin@zfrerp:
$ fm create erp --apps erpnext:version-15 --apps hrms:version-15
โœ… fm directory doesn't exists! Created at -> /home/zfradmin/frappe
โœ… ๐Ÿ” It seems like the first installation. Pulling images... ๐Ÿ–ผ๏ธ
โœ… Pulling image ghcr.io/rtcamp/frappe-manager-frappe:v0.12.0 : Done
โœ… Pulling image ghcr.io/rtcamp/frappe-manager-nginx:v0.10.0 : Done
โœ… Pulling image ghcr.io/rtcamp/frappe-manager-mailhog:v0.8.3 : Done
โœ… Pulling image adminer:latest : Done
โœ… Pulling image redis:alpine : Done
๐Ÿšง Creating services
โœ… Pulling services images: Done
โœ… Creating services: Done
โœ… Creating Compose directories: Done
โœ… Starting Docker Containers: Done
โฃป Creating Site
โฃŸ Creating Site
โŒ Failure in generating, supervisor.conf file.The docker command executed was docker compose -f /home/zfradmin/frappe/sites/erp.localhost/docker-compose.yml exec --user frappe --workdir /workspace/frappe-bench frappe bench setup supervisor --skip-redis --skip-supervisord --yes --user frappe.
It returned with code 1
The content of stdout can be found above the stacktrace (it wasn't captured).
The content of stderr is 'service "frappe" is not running'

โœ… Rolling back to previous workers configuration.
โœ… Workers compose not present. Generating...
โœ… Getting Workers info: Done
โœ… Starting Workers Containers: Done
โŒ There has been some error creating/starting the site.
Please check the logs at /home/zfradmin/frappe/logs/fm.log
๐Ÿค” Do you want to remove 'erp.localhost' [yes/no] (no): yes
Please select one of the available options
๐Ÿค” Do you want to remove 'erp.localhost' [yes/no] (no): yes
โš  Remove DB User: Failed
โš  Remove DB: Failed
โœ… Removing Containers: Done

Expected behavior
A clear and concise description of what you expected to happen.
-> So, I've checked the fm.log file.

System information (please complete the following information):

  • fm --version : 0.12.0

  • lsb_release -a : No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 22.04.3 LTS
    Release: 22.04
    Codename: jammy

  • docker version : 25.0.2

  • docker-compose version or docker compose version : v2.23.3

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.

I've instelled from fm v 0.10.0 it worked well. I have some problem from v 0.11.0 version. So I've uninstall frappe-manager and delete the Frappe folder.
And next install Frappe-manager v 0.12.0 again. but..I have this problem.
Thank you

As I can see in the logs and tried to recreate the issue

This issue arises when a user deletes the fm directory i.e ~/frappe, and then attempts to use fm, when fm gets invoked it recreated the ~/frappe directory and also services compose project and with new random db secret.

The problem is that when the services got recreated it didn't remove the existing Docker containers and volumes and then started the compose project ( old containers got started ).

These containers were initially configured with previous database credentials. However, since these credentials were regenerated upon deletion, they no longer match, leading to authentication failures with the database then the site fails to set up correctly.

@SujinIn For now you can follow these steps to fix the issue.
Warning: Since you will be removing ~/frappe all your data will be deleted.

  1. Go to dir ~/frappe/services, run command docker compose down -v.
  2. Then delete the dir ~/frappe.
  3. Create site fm create erp --apps erpnext:version-15 --apps hrms:version-15

This is fixed in #147. Will be rolled out in next release.

Ah...So the docker containers are alived.
Thank you very much. Now I can connect to 'erp.localhost' now!!!