Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Docker install process does not work #15916

Open
amityweb opened this issue May 1, 2024 · 2 comments
Open

Bug: Docker install process does not work #15916

amityweb opened this issue May 1, 2024 · 2 comments

Comments

@amityweb
Copy link

amityweb commented May 1, 2024

What are you trying to achieve?

Install Saleor using the documentation here https://docs.saleor.io/docs/3.x/setup/docker-compose

The first hurdle is that "docker compose build" throws a version error and stops. Removing the version line then it just does nothing. Absolutely nothing.

Verbose output just says:
DEBU[0000] Enabled Docker Desktop integration (experimental) @ unix:///Users/me/Library/Containers/com.docker.docker/Data/docker-cli.sock

So instead of building from the files from Github, within Docker I search for Saleor in the repos there and find the mirumee/saleor one and it does download and builds the image OK. I do have to specify a port when I run it, else there is no port assigned and localhost does not work. When I assign a custom port it works.

But when i run it, the webpage and logs show the following error in that it cannot connect to port 5432 (I think postgres)

OperationalError at /
could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
Request Method:	GET
Request URL:	http://localhost:8080/
Django Version:	3.2.7
Exception Type:	OperationalError
Exception Value:	
could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
Exception Location:	/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py, line 122, in connect
Python Executable:	/usr/local/bin/python
Python Version:	3.9.7
Python Path:	
['/app',
 '/app',
 '/usr/local/bin',
 '/usr/local/lib/python39.zip',
 '/usr/local/lib/python3.9',
 '/usr/local/lib/python3.9/lib-dynload',
 '/usr/local/lib/python3.9/site-packages']
Server time:	Wed, 01 May 2024 01:50:16 +0000

The logs show this:

2024-05-01 02:50:16 ERROR django.request Internal Server Error: /favicon.ico [PID:9:ThreadPoolExecutor-8_0]
2024-05-01 02:50:16 Traceback (most recent call last):
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16     self.connect()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
2024-05-01 02:50:16     self.connection = self.get_new_connection(conn_params)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
2024-05-01 02:50:16     connection = Database.connect(**conn_params)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
2024-05-01 02:50:16     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-05-01 02:50:16 psycopg2.OperationalError: could not connect to server: Connection refused
2024-05-01 02:50:16     Is the server running on host "localhost" (::1) and accepting
2024-05-01 02:50:16     TCP/IP connections on port 5432?
2024-05-01 02:50:16 could not connect to server: Connection refused
2024-05-01 02:50:16     Is the server running on host "localhost" (127.0.0.1) and accepting
2024-05-01 02:50:16     TCP/IP connections on port 5432?
2024-05-01 02:50:16 
2024-05-01 02:50:16 
2024-05-01 02:50:16 The above exception was the direct cause of the following exception:
2024-05-01 02:50:16 
2024-05-01 02:50:16 Traceback (most recent call last):
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 482, in thread_handler
2024-05-01 02:50:16     raise exc_info[1]
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
2024-05-01 02:50:16     response = await get_response(request)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 263, in _get_response_async
2024-05-01 02:50:16     response = await sync_to_async(response.render, thread_sensitive=True)()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 444, in __call__
2024-05-01 02:50:16     ret = await asyncio.wait_for(future, timeout=None)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
2024-05-01 02:50:16     return await fut
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
2024-05-01 02:50:16     result = self.fn(*self.args, **self.kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/template/response.py", line 105, in render
2024-05-01 02:50:16     self.content = self.rendered_content
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/template/response.py", line 83, in rendered_content
2024-05-01 02:50:16     return template.render(context, self._request)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
2024-05-01 02:50:16     return self.template.render(context)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 168, in render
2024-05-01 02:50:16     with context.bind_template(self):
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__
2024-05-01 02:50:16     return next(self.gen)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/debug_toolbar/panels/templates/panel.py", line 46, in _request_context_bind_template
2024-05-01 02:50:16     context = processor(self.request)
2024-05-01 02:50:16   File "/app/saleor/site/context_processors.py", line 13, in site
2024-05-01 02:50:16     site = get_current_site(request)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/contrib/sites/shortcuts.py", line 13, in get_current_site
2024-05-01 02:50:16     return Site.objects.get_current(request)
2024-05-01 02:50:16   File "/app/saleor/site/patch_sites.py", line 25, in new_get_current
2024-05-01 02:50:16     site = self.prefetch_related("settings").filter(pk=site_id)[0]
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 317, in __getitem__
2024-05-01 02:50:16     qs._fetch_all()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
2024-05-01 02:50:16     self._result_cache = list(self._iterable_class(self))
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
2024-05-01 02:50:16     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1173, in execute_sql
2024-05-01 02:50:16     cursor = self.connection.cursor()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 259, in cursor
2024-05-01 02:50:16     return self._cursor()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 235, in _cursor
2024-05-01 02:50:16     self.ensure_connection()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16     self.connect()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
2024-05-01 02:50:16     raise dj_exc_value.with_traceback(traceback) from exc_value
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16     self.connect()
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
2024-05-01 02:50:16     self.connection = self.get_new_connection(conn_params)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16     return func(*args, **kwargs)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
2024-05-01 02:50:16     connection = Database.connect(**conn_params)
2024-05-01 02:50:16   File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
2024-05-01 02:50:16     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-05-01 02:50:16 django.db.utils.OperationalError: could not connect to server: Connection refused
2024-05-01 02:50:16     Is the server running on host "localhost" (::1) and accepting
2024-05-01 02:50:16     TCP/IP connections on port 5432?
2024-05-01 02:50:16 could not connect to server: Connection refused
2024-05-01 02:50:16     Is the server running on host "localhost" (127.0.0.1) and accepting
2024-05-01 02:50:16     TCP/IP connections on port 5432?

Steps to reproduce the problem

The steps as per the steps here https://docs.saleor.io/docs/3.x/setup/docker-compose

What did you expect to happen?

Install Saleor and get a working Saleor install at the localhost:8000 or whatever port used

Logs

OperationalError at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 3.2.7
Exception Type: OperationalError
Exception Value:
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Exception Location: /usr/local/lib/python3.9/site-packages/psycopg2/init.py, line 122, in connect
Python Executable: /usr/local/bin/python
Python Version: 3.9.7
Python Path:
['/app',
'/app',
'/usr/local/bin',
'/usr/local/lib/python39.zip',
'/usr/local/lib/python3.9',
'/usr/local/lib/python3.9/lib-dynload',
'/usr/local/lib/python3.9/site-packages']
Server time: Wed, 01 May 2024 01:50:16 +0000

2024-05-01 02:50:16 ERROR django.request Internal Server Error: /favicon.ico [PID:9:ThreadPoolExecutor-8_0]
2024-05-01 02:50:16 Traceback (most recent call last):
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16 self.connect()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
2024-05-01 02:50:16 self.connection = self.get_new_connection(conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
2024-05-01 02:50:16 connection = Database.connect(**conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
2024-05-01 02:50:16 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-05-01 02:50:16 psycopg2.OperationalError: could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (::1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
2024-05-01 02:50:16 could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (127.0.0.1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
2024-05-01 02:50:16
2024-05-01 02:50:16
2024-05-01 02:50:16 The above exception was the direct cause of the following exception:
2024-05-01 02:50:16
2024-05-01 02:50:16 Traceback (most recent call last):
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 482, in thread_handler
2024-05-01 02:50:16 raise exc_info[1]
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
2024-05-01 02:50:16 response = await get_response(request)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 263, in _get_response_async
2024-05-01 02:50:16 response = await sync_to_async(response.render, thread_sensitive=True)()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 444, in call
2024-05-01 02:50:16 ret = await asyncio.wait_for(future, timeout=None)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
2024-05-01 02:50:16 return await fut
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
2024-05-01 02:50:16 result = self.fn(*self.args, **self.kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/response.py", line 105, in render
2024-05-01 02:50:16 self.content = self.rendered_content
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/response.py", line 83, in rendered_content
2024-05-01 02:50:16 return template.render(context, self._request)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
2024-05-01 02:50:16 return self.template.render(context)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 168, in render
2024-05-01 02:50:16 with context.bind_template(self):
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/contextlib.py", line 119, in enter
2024-05-01 02:50:16 return next(self.gen)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/debug_toolbar/panels/templates/panel.py", line 46, in _request_context_bind_template
2024-05-01 02:50:16 context = processor(self.request)
2024-05-01 02:50:16 File "/app/saleor/site/context_processors.py", line 13, in site
2024-05-01 02:50:16 site = get_current_site(request)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/contrib/sites/shortcuts.py", line 13, in get_current_site
2024-05-01 02:50:16 return Site.objects.get_current(request)
2024-05-01 02:50:16 File "/app/saleor/site/patch_sites.py", line 25, in new_get_current
2024-05-01 02:50:16 site = self.prefetch_related("settings").filter(pk=site_id)[0]
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 317, in getitem
2024-05-01 02:50:16 qs._fetch_all()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
2024-05-01 02:50:16 self._result_cache = list(self._iterable_class(self))
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in iter
2024-05-01 02:50:16 results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1173, in execute_sql
2024-05-01 02:50:16 cursor = self.connection.cursor()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 259, in cursor
2024-05-01 02:50:16 return self._cursor()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 235, in _cursor
2024-05-01 02:50:16 self.ensure_connection()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16 self.connect()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in exit
2024-05-01 02:50:16 raise dj_exc_value.with_traceback(traceback) from exc_value
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
2024-05-01 02:50:16 self.connect()
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py", line 200, in connect
2024-05-01 02:50:16 self.connection = self.get_new_connection(conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
2024-05-01 02:50:16 return func(*args, **kwargs)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
2024-05-01 02:50:16 connection = Database.connect(**conn_params)
2024-05-01 02:50:16 File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
2024-05-01 02:50:16 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-05-01 02:50:16 django.db.utils.OperationalError: could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (::1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?
2024-05-01 02:50:16 could not connect to server: Connection refused
2024-05-01 02:50:16 Is the server running on host "localhost" (127.0.0.1) and accepting
2024-05-01 02:50:16 TCP/IP connections on port 5432?

Environment

  • Docker Desktop 4.29.0 (145265)
  • ghcr.io/saleor/saleor:3.19.29
  • Mac Sanoma 14.4.1
@amityweb
Copy link
Author

amityweb commented May 5, 2024

Following on from this...

I think its working for me OK when I use Saleor Platform, and I expected something visible to happen when I typed "docker compose build" but nothing did. But if I proceed with the instructions it seems work then. I guess the issue above was I was only using Saleor Core but expected the database to be setup inside also? Maybe its not.

Although its working, during the build there are more errors now. Issues with the database tables?

worker-1     | 2024-05-05 12:03:50,095 INFO celery.beat beat: Starting... [PID:23:MainThread]
db-1         | 2024-05-05 12:03:50.922 UTC [60] ERROR:  relation "discount_promotion" does not exist at character 436
db-1         | 2024-05-05 12:03:50.922 UTC [60] STATEMENT:  SELECT "discount_promotion"."private_metadata", "discount_promotion"."metadata", "discount_promotion"."id", "discount_promotion"."name", "discount_promotion"."type", "discount_promotion"."description", "discount_promotion"."old_sale_id", "discount_promotion"."start_date", "discount_promotion"."end_date", "discount_promotion"."created_at", "discount_promotion"."updated_at", "discount_promotion"."last_notification_scheduled_at" FROM "discount_promotion" WHERE ((("discount_promotion"."last_notification_scheduled_at" IS NULL OR "discount_promotion"."last_notification_scheduled_at" < "discount_promotion"."start_date") AND "discount_promotion"."start_date" <= '2024-05-05T12:03:50.890496+00:00'::timestamptz) OR (("discount_promotion"."last_notification_scheduled_at" IS NULL OR "discount_promotion"."last_notification_scheduled_at" < "discount_promotion"."end_date") AND "discount_promotion"."end_date" <= '2024-05-05T12:03:50.892480+00:00'::timestamptz)) ORDER BY "discount_promotion"."name" ASC, "discount_promotion"."id" ASC
worker-1     | Process Beat:
worker-1     | Traceback (most recent call last):
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
worker-1     |     return self.cursor.execute(sql, params)
worker-1     | psycopg2.errors.UndefinedTable: relation "discount_promotion" does not exist
worker-1     | LINE 1: ..._promotion"."last_notification_scheduled_at" FROM "discount_...
worker-1     |                                                              ^
worker-1     | 
worker-1     | 
worker-1     | The above exception was the direct cause of the following exception:
worker-1     | 
worker-1     | Traceback (most recent call last):
worker-1     |   File "/usr/local/lib/python3.9/site-packages/billiard/process.py", line 323, in _bootstrap
worker-1     |     self.run()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 718, in run
worker-1     |     self.service.start(embedded_process=True)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 643, in start
worker-1     |     interval = self.scheduler.tick()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 339, in tick
worker-1     |     self.populate_heap()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 313, in populate_heap
worker-1     |     is_due, next_call_delay = entry.is_due()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/celery/beat.py", line 161, in is_due
worker-1     |     return self.schedule.is_due(self.last_run_at)
worker-1     |   File "/app/saleor/core/schedules.py", line 80, in is_due
worker-1     |     if len(staring_promotions | ending_promotions) > PROMOTION_TOGGLE_BATCH_SIZE:
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 262, in __len__
worker-1     |     self._fetch_all()
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
worker-1     |     self._result_cache = list(self._iterable_class(self))
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in __iter__
worker-1     |     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
worker-1     |     cursor.execute(sql, params)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
worker-1     |     return super().execute(sql, params)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
worker-1     |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
worker-1     |     return executor(sql, params, many, context)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
worker-1     |     return self.cursor.execute(sql, params)
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
worker-1     |     raise dj_exc_value.with_traceback(traceback) from exc_value
worker-1     |   File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
worker-1     |     return self.cursor.execute(sql, params)
worker-1     | django.db.utils.ProgrammingError: relation "discount_promotion" does not exist
worker-1     | LINE 1: ..._promotion"."last_notification_scheduled_at" FROM "discount_...
worker-1     |                                                              ^
worker-1     | 
worker-1     | 2024-05-05 12:03:52,025 WARNING py.warnings /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
worker-1     | whether broker connection retries are made during startup in Celery 6.0 and above.
worker-1     | If you wish to retain the existing behavior for retrying connections on startup,
worker-1     | you should set broker_connection_retry_on_startup to True.
worker-1     |   warnings.warn(
worker-1     |  [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:52,047 INFO celery.worker.consumer.connection Connected to redis://redis:6379/1 [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:52,048 WARNING py.warnings /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
worker-1     | whether broker connection retries are made during startup in Celery 6.0 and above.
worker-1     | If you wish to retain the existing behavior for retrying connections on startup,
worker-1     | you should set broker_connection_retry_on_startup to True.
worker-1     |   warnings.warn(
worker-1     |  [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:52,051 INFO celery.worker.consumer.mingle mingle: searching for neighbors [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:53,063 INFO celery.worker.consumer.mingle mingle: all alone [PID:1:MainThread]
worker-1     | 2024-05-05 12:03:53,096 INFO celery.apps.worker celery@a66f6388d5de ready. [PID:1:MainThread]

@amityweb
Copy link
Author

We've abandoned Saleor now. I'm a web developer and its crazy the amount of time I spent trying to fix issues, or figure out the correct documentation etc. I switched to something else in a couple of days and all works fine now so I can get onto actually building the website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant