You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docker Compose Single Server Multi Bench Setup has issues
Context information (for bug reports)
Service names are the same when following the default instructions in Single Server Example
Multiple projects share a MariaDB service using the same network (mariadb-network) and have the same service names.
For eg: I have ProjectA and ProjectB and I am sharing mariadb-network with both of these projects. Service names are same in both projects, its like running 2 instance of containers which are a part of mariadb-network.
In my case, ProjectA's worker was pulling jobs from ProjectB's redis queue.
From the Docker Docs AI,
If you have two Docker Compose projects with the same service names but different networks, there should not be any conflict because the DNS resolution is network-scoped. This means that a service web in network1 is not the same as a service web in network2, even if they have the same service name. They can coexist without any issues because they are in different networks.
However, if the services are also attached to a shared network, the situation can be different. If a service tries to resolve a hostname, and the hostname is present in both the project-specific network and the shared network, Docker does not guarantee which one it will resolve to. This is because a network-wide alias can be shared by multiple containers, and even by multiple services. If it is, then exactly which container the name resolves to is not guaranteed [source].
You can fix this by giving each service a unique name or hostname, or by using separate MariaDB instances for each Docker Compose project.
Using separate MariaDB instances means you don't need to share the mariadb-network. However, the best solution is to give unique service names, hostnames, or aliases in each project.
Steps to reproduce the issue
Create mutiple benches by following the Single Server Docker Compose Docs
Observed result
RQ Jobs Failing
Expected result
Stacktrace / full error message if available
Docker Logs
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/worker.py", line 1449, in perform_job job.execute_failure_callback(self.death_penalty_class, *exc_info)
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/job.py", line 1429, in execute_failure_callback self.failure_callback(self, self.connection, *exc_info)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 565, in truncate_failed_registry conf frappe.conf if frappe.conf else appe.get_conf(site=job.kwargs.get("site"))
File "/home/frappe/frappe-bench/apps/frappe/frappe/_init_.py", line 399, in get_conf with init_site(site):
File "/home/frappe/frappe-bench/apps/frappe/frappe/_init_.py", line 409, in _enter_ init(self.site)
File "/home/frappe/frappe-bench/apps/frappe/frappe/_init_.py", line 239, in init local.conf = dict(get_site_config())
File "/home/frappe/frappe-bench/apps/frappe/frappe/_init__.py", line 337, in get_site_config
raise IncorrectSitePath(f"{local.site) does not exist")
frappe.exceptions.IncorrectSitePath: 404 Not Found: <sitename> does not exist
RQ Logs
The text was updated successfully, but these errors were encountered:
letajmal
changed the title
Issue with DNS Resolution in Docker Compose Single Server Multi Bench Setup
RQ Logs frappe.exceptions.IncorrectSitePath: 404 Not Found: <sitename> does not exis
Jul 20, 2024
letajmal
changed the title
RQ Logs frappe.exceptions.IncorrectSitePath: 404 Not Found: <sitename> does not exis
RQ Logs frappe.exceptions.IncorrectSitePath: 404 Not Found: <sitename> does not exist
Aug 2, 2024
Description of the issue
Docker Compose Single Server Multi Bench Setup has issues
Context information (for bug reports)
Service names are the same when following the default instructions in Single Server Example
Multiple projects share a MariaDB service using the same network (mariadb-network) and have the same service names.
For eg: I have ProjectA and ProjectB and I am sharing mariadb-network with both of these projects. Service names are same in both projects, its like running 2 instance of containers which are a part of mariadb-network.
In my case, ProjectA's worker was pulling jobs from ProjectB's redis queue.
From the Docker Docs AI,
You can fix this by giving each service a unique name or hostname, or by using separate MariaDB instances for each Docker Compose project.
Using separate MariaDB instances means you don't need to share the mariadb-network. However, the best solution is to give unique service names, hostnames, or aliases in each project.
Steps to reproduce the issue
Observed result
RQ Jobs Failing
Expected result
Stacktrace / full error message if available
Docker Logs
RQ Logs
The text was updated successfully, but these errors were encountered: