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
Comments
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?
|
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. |
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)
The logs show this:
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
The text was updated successfully, but these errors were encountered: