s3gw-tech / s3gw

Container able to run on a Kubernetes cluster, providing S3-compatible endpoints to applications.
https://s3gw.tech
Apache License 2.0
125 stars 20 forks source link

UI: 500 on login / Name does not resolve in backend #823

Closed irq0 closed 9 months ago

irq0 commented 9 months ago
Screenshot 2023-11-21 at 14 16 49

UI Backend

│   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__                                                                              │
│     await route.handle(scope, receive, send)                                                                                                                              │
│   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle                                                                                │
│     await self.app(scope, receive, send)                                                                                                                                  │
│   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app                                                                                    │
│     response = await func(request)                                                                                                                                        │
│                ^^^^^^^^^^^^^^^^^^^                                                                                                                                        │
│   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app                                                                                     │
│     raw_response = await run_endpoint_function(                                                                                                                           │
│                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                           │
│   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 190, in run_endpoint_function                                                                   │
│     return await dependant.call(**values)                                                                                                                                 │
│            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                 │
│   File "/srv/backend/api/auth.py", line 43, in authenticate                                                                                                               │
│     await admin_ops_users.get_user_info(                                                                                                                                  │
│   File "/srv/backend/admin_ops/users.py", line 53, in get_user_info                                                                                                       │
│     res = await do_request(                                                                                                                                               │
│           ^^^^^^^^^^^^^^^^^                                                                                                                                               │
│   File "/srv/backend/admin_ops/__init__.py", line 93, in do_request                                                                                                       │
│     return await send_request(req)                                                                                                                                        │
│            ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                        │
│   File "/srv/backend/admin_ops/__init__.py", line 66, in send_request                                                                                                     │
│     res: httpx.Response = await client.send(req)                                                                                                                          │
│                           ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                          │
│   File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send                                                                                     │
│     response = await self._send_handling_auth(                                                                                                                            │
│                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                            │
│   File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth                                                                      │
│     response = await self._send_handling_redirects(                                                                                                                       │
│                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                       │
│   File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects                                                                 │
│     response = await self._send_single_request(request)                                                                                                                   │
│                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                   │
│   File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request                                                                     │
│     response = await transport.handle_async_request(request)                                                                                                              │
│                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                              │
│   File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 352, in handle_async_request                                                          │
│     with map_httpcore_exceptions():                                                                                                                                       │
│   File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__                                                                                                   │
│     self.gen.throw(typ, value, traceback)                                                                                                                                 │
│   File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions                                                        │
│     raise mapped_exc(message) from exc                                                                                                                                    │
│ httpx.ConnectError: [Errno -2] Name does not resolve                                                                                                                      │
│

Setup: s3gw 0.23 rc2 via helm on longhorn in a k3s cluster. Connection through ssh tunnel through traefik ingres via https

Expected behavior:

Useful error message or a ui backend that fails to start on a precondition.

Probably due to incorrect backend url: │ INFO: 2023-11-21 14:24:29 -- config -- Servicing s3gw at https://s3gw-s3gw-s3gw.be.kubetest.foo

Would be good to check this on startup

jecluis commented 9 months ago

@irq0 mind confirming whether you are running this though the helm chart, and which versions you set for the tags? If you did not adjust the ui's section imageTag to v0.23.0-rc, mind doing so, and test again?

irq0 commented 9 months ago

Right, this was with v0.22. Can reproduce on │ Image: quay.io/s3gw/s3gw-ui:v0.23.0-rc3 │

votdev commented 9 months ago

The PR will partly fix the issue by displaying meaningful error messages that can be used to identify the root problem.

The follow up issue can be used to implement additional ideas.