mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[GH-ISSUE #14613] 422: Open WebUI: Server Connection Error #17317
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hekas1 on GitHub (Jun 2, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14613
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.13
Ollama Version (if applicable)
No response
Operating System
Windows 10, WLS - Ubuntu 24.04.2 LTS
Browser (if applicable)
chrome, FireFox Mazilla, Opera
Confirmation
README.md.Expected Behavior
User question - How to Fix Error 422: Open WebUI: Server Connection Error
Model response - Error 422 typically indicates a "Unprocessable Entity" error, which means that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions. Here are some steps you can take to troubleshoot and fix this error when trying to open WebUI:
Actual Behavior
User question - How to Fix Error 422: Open WebUI: Server Connection Error?
Model response - 422: Open WebUI: Server Connection Error
Steps to Reproduce
When updating OpenWebUI to version v0.6.13, the endpoint of the model connection chat API stopped working and returned error 422: Open WebUI: Server Connection Error, Everything works on version 0.6.11. After the update, the work stopped, I rolled back to the previous version, everything works, I installed the current version in parallel on the neighboring port, 0.6.13, it sends the user's question, but in response it comes with error 422. Presumably, the server providing the API receives incorrect data in JSON format. But the problem is that two versions are installed, 11 works, 13 does not
Logs & Screenshots
log from Docker at the moment of sending the request:
2025-06-02 23:01:49 2025-06-02 19:01:49.740 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "POST /api/v1/chats/new HTTP/1.1" 200 - {}
2025-06-02 23:01:49 2025-06-02 19:01:49.751 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {}
2025-06-02 23:01:49 2025-06-02 19:01:49.771 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60958 - "GET /manifest.json HTTP/1.1" 200 - {}
2025-06-02 23:01:49 2025-06-02 19:01:49.816 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "POST /api/v1/chats/822280cf-c511-4c60-94f2-a652b86c8a67 HTTP/1.1" 200 - {}
2025-06-02 23:01:49 2025-06-02 19:01:49.822 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {}
2025-06-02 23:01:49 2025-06-02 19:01:49.873 | INFO | open_webui.routers.openai:get_all_models:391 - get_all_models() - {}
2025-06-02 23:01:50 2025-06-02 19:01:50.302 | ERROR | open_webui.routers.openai:generate_chat_completion:870 - 422, message='Unprocessable Entity', url='https:///v1/chat/completions' - {}
2025-06-02 23:01:50 Traceback (most recent call last):
2025-06-02 23:01:50
2025-06-02 23:01:50 File "", line 198, in _run_module_as_main
2025-06-02 23:01:50 File "", line 88, in _run_code
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 4, in
2025-06-02 23:01:50 uvicorn.main()
2025-06-02 23:01:50 │ └
2025-06-02 23:01:50 └ <module 'uvicorn' from '/usr/local/lib/python3.11/site-packages/uvicorn/init.py'>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1442, in call
2025-06-02 23:01:50 return self.main(args, **kwargs)
2025-06-02 23:01:50 │ │ │ └ {}
2025-06-02 23:01:50 │ │ └ ()
2025-06-02 23:01:50 │ └ <function Command.main at 0x7e25161aa7a0>
2025-06-02 23:01:50 └
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1363, in main
2025-06-02 23:01:50 rv = self.invoke(ctx)
2025-06-02 23:01:50 │ │ └ <click.core.Context object at 0x7e2516edc850>
2025-06-02 23:01:50 │ └ <function Command.invoke at 0x7e25161aa480>
2025-06-02 23:01:50 └
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
2025-06-02 23:01:50 return ctx.invoke(self.callback, **ctx.params)
2025-06-02 23:01:50 │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
2025-06-02 23:01:50 │ │ │ │ └ <click.core.Context object at 0x7e2516edc850>
2025-06-02 23:01:50 │ │ │ └ <function main at 0x7e2515f93a60>
2025-06-02 23:01:50 │ │ └
2025-06-02 23:01:50 │ └ <function Context.invoke at 0x7e25161a96c0>
2025-06-02 23:01:50 └ <click.core.Context object at 0x7e2516edc850>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/click/core.py", line 794, in invoke
2025-06-02 23:01:50 return callback(args, **kwargs)
2025-06-02 23:01:50 │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
2025-06-02 23:01:50 │ └ ()
2025-06-02 23:01:50 └ <function main at 0x7e2515f93a60>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
2025-06-02 23:01:50 run(
2025-06-02 23:01:50 └ <function run at 0x7e25161af9c0>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
2025-06-02 23:01:50 server.run()
2025-06-02 23:01:50 │ └ <function Server.run at 0x7e2516044e00>
2025-06-02 23:01:50 └ <uvicorn.server.Server object at 0x7e25161de2d0>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
2025-06-02 23:01:50 return asyncio.run(self.serve(sockets=sockets))
2025-06-02 23:01:50 │ │ │ │ └ None
2025-06-02 23:01:50 │ │ │ └ <function Server.serve at 0x7e2516044ea0>
2025-06-02 23:01:50 │ │ └ <uvicorn.server.Server object at 0x7e25161de2d0>
2025-06-02 23:01:50 │ └ <function run at 0x7e25165a5260>
2025-06-02 23:01:50 └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/init.py'>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
2025-06-02 23:01:50 return runner.run(main)
2025-06-02 23:01:50 │ │ └ <coroutine object Server.serve at 0x7e2515f3e2f0>
2025-06-02 23:01:50 │ └ <function Runner.run at 0x7e2516400e00>
2025-06-02 23:01:50 └ <asyncio.runners.Runner object at 0x7e2515f9ec50>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
2025-06-02 23:01:50 return self._loop.run_until_complete(task)
2025-06-02 23:01:50 │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai...
2025-06-02 23:01:50 │ │ └ <cyfunction Loop.run_until_complete at 0x7e2515f7f440>
2025-06-02 23:01:50 │ └ <uvloop.Loop running=True closed=False debug=False>
2025-06-02 23:01:50 └ <asyncio.runners.Runner object at 0x7e2515f9ec50>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
2025-06-02 23:01:50 await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 23:01:50 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x7e24be1796c0>
2025-06-02 23:01:50 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ └ <starlette_compress.CompressMiddleware object at 0x7e25152a6110>
2025-06-02 23:01:50 └ <open_webui.main.RedirectMiddleware object at 0x7e24bfd3e890>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette_compress/init.py", line 92, in call
2025-06-02 23:01:50 return await self._zstd(scope, receive, send)
2025-06-02 23:01:50 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x7e24be1796c0>
2025-06-02 23:01:50 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ └ <member '_zstd' of 'CompressMiddleware' objects>
2025-06-02 23:01:50 └ <starlette_compress.CompressMiddleware object at 0x7e25152a6110>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette_compress/_zstd_legacy.py", line 100, in call
2025-06-02 23:01:50 await self.app(scope, receive, wrapper)
2025-06-02 23:01:50 │ │ │ │ └ <function ZstdResponder.call..wrapper at 0x7e24be179c60>
2025-06-02 23:01:50 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ └ <member 'app' of 'ZstdResponder' objects>
2025-06-02 23:01:50 └ <starlette_compress._zstd_legacy.ZstdResponder object at 0x7e24c377ec00>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
2025-06-02 23:01:50 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-06-02 23:01:50 │ │ │ │ │ │ └ <function ZstdResponder.call..wrapper at 0x7e24be179c60>
2025-06-02 23:01:50 │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ │ │ └ <starlette.requests.Request object at 0x7e24be9dbb10>
2025-06-02 23:01:50 │ │ └ <fastapi.routing.APIRouter object at 0x7e24c2d325d0>
2025-06-02 23:01:50 │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7e24c05ffa90>
2025-06-02 23:01:50 └ <function wrap_app_handling_exceptions at 0x7e25132a1e40>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-06-02 23:01:50 await app(scope, receive, sender)
2025-06-02 23:01:50 │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7e24be17b600>
2025-06-02 23:01:50 │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 └ <fastapi.routing.APIRouter object at 0x7e24c2d325d0>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
2025-06-02 23:01:50 await self.middleware_stack(scope, receive, send)
2025-06-02 23:01:50 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7e24be17b600>
2025-06-02 23:01:50 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7e24c2d325d0>>
2025-06-02 23:01:50 └ <fastapi.routing.APIRouter object at 0x7e24c2d325d0>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
2025-06-02 23:01:50 await route.handle(scope, receive, send)
2025-06-02 23:01:50 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7e24be17b600>
2025-06-02 23:01:50 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ └ <function Route.handle at 0x7e25132a3420>
2025-06-02 23:01:50 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST'])
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
2025-06-02 23:01:50 await self.app(scope, receive, send)
2025-06-02 23:01:50 │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7e24be17b600>
2025-06-02 23:01:50 │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ └ <function request_response..app at 0x7e24bf13e0c0>
2025-06-02 23:01:50 └ APIRoute(path='/api/chat/completions', name='chat_completion', methods=['POST'])
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
2025-06-02 23:01:50 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-06-02 23:01:50 │ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7e24be17b600>
2025-06-02 23:01:50 │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 │ │ └ <starlette.requests.Request object at 0x7e24be9dac50>
2025-06-02 23:01:50 │ └ <function request_response..app..app at 0x7e24be17ba60>
2025-06-02 23:01:50 └ <function wrap_app_handling_exceptions at 0x7e25132a1e40>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-06-02 23:01:50 await app(scope, receive, sender)
2025-06-02 23:01:50 │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x7e24be17b380>
2025-06-02 23:01:50 │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x7e24be139f80>
2025-06-02 23:01:50 │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
2025-06-02 23:01:50 └ <function request_response..app..app at 0x7e24be17ba60>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
2025-06-02 23:01:50 response = await f(request)
2025-06-02 23:01:50 │ └ <starlette.requests.Request object at 0x7e24be9dac50>
2025-06-02 23:01:50 └ <function get_request_handler..app at 0x7e24bf13e020>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
2025-06-02 23:01:50 raw_response = await run_endpoint_function(
2025-06-02 23:01:50 └ <function run_endpoint_function at 0x7e25132c9260>
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
2025-06-02 23:01:50 return await dependant.call(values)
2025-06-02 23:01:50 │ │ └ {'user': UserModel(id='2e4d8da5-f0c4-4134-a339-019a0535d60f', name='Bob', email='bob@gmail.com', role='admin', profile...
2025-06-02 23:01:50 │ └ <function chat_completion at 0x7e24bf13c400>
2025-06-02 23:01:50 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
2025-06-02 23:01:50
2025-06-02 23:01:50 File "/app/backend/open_webui/main.py", line 1285, in chat_completion
2025-06-02 23:01:50 response = await chat_completion_handler(request, form_data, user)
2025-06-02 23:01:50 │ │ │ └ UserModel(id='2e4d8da5-f0c4-4134-a339-019a0535d60f', name='Bob', email='bob@gmail.com', role='admin', profile_image_ur...
2025-06-02 23:01:50 │ │ └ {'stream': True, 'model': name_modell', 'messages': [{'role': 'system', 'content': '### *************...
2025-06-02 23:01:50 │ └ <starlette.requests.Request object at 0x7e24be9dac50>
2025-06-02 23:01:50 └ <function generate_chat_completion at 0x7e24c3c88220>
2025-06-02 23:01:50
2025-06-02 23:01:50 File "/app/backend/open_webui/utils/chat.py", line 278, in generate_chat_completion
2025-06-02 23:01:50 return await generate_openai_chat_completion(
2025-06-02 23:01:50 └ <function generate_chat_completion at 0x7e24c3da5120>
2025-06-02 23:01:50
2025-06-02 23:01:50 > File "/app/backend/open_webui/routers/openai.py", line 867, in generate_chat_completion
2025-06-02 23:01:50 r.raise_for_status()
2025-06-02 23:01:50 │ └ <function ClientResponse.raise_for_status at 0x7e2513d45f80>
2025-06-02 23:01:50 └ <ClientResponse(https:///v1/chat/completions) [422 Unprocessable Entity]>
2025-06-02 23:01:50 <CIMultiDictProxy('Date': 'Mon, 02 Ju...
2025-06-02 23:01:50
2025-06-02 23:01:50 File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status
2025-06-02 23:01:50 raise ClientResponseError(
2025-06-02 23:01:50 └ <class 'aiohttp.client_exceptions.ClientResponseError'>
2025-06-02 23:01:50
2025-06-02 23:01:50 aiohttp.client_exceptions.ClientResponseError: 422, message='Unprocessable Entity', url='https://******/v1/chat/completions'
2025-06-02 23:01:50 2025-06-02 19:01:50.306 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "POST /api/chat/completions HTTP/1.1" 400 - {}
2025-06-02 23:01:50 2025-06-02 19:01:50.322 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {}
2025-06-02 23:01:51 2025-06-02 19:01:51.242 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60966 - "GET /_app/version.json HTTP/1.1" 200 - {}
2025-06-02 23:01:54 2025-06-02 19:01:54.958 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.17.0.1:60952 - "GET /_app/version.json HTTP/1.1" 200 - {}
Additional Information
No response