【Internel Server Error】after v0.3.34updated to v0.4.1 #864

Closed
opened 2026-02-21 17:28:45 -05:00 by yindo · 4 comments
Owner

Originally created by @sisuad on GitHub (Jan 3, 2024).

Originally assigned to: @takatost, @crazywoola on GitHub.

Self Checks

Dify version

0.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1.docker-compose down (version0.3.34,it had succecfully run about a week with chatglm3-6b and xinference)and
docker rmi related images

2.git pull the newest version from github links

3.docker-compose up to run the newest version(v.0.4.1,it can be seen on the setting page)

4.when I add xinference LLM ,embedding, rerank models all failed

5.web ui shows Internel Server Error

6 I chekedc the errors comes from http://192.168.21.131/console/api/workspaces/current/model-providers/xinference/models and http://192.168.21.131/console/api/workspaces/current/models/model-types/llm

Request URL: http://192.168.21.131/console/api/workspaces/current/model-providers/xinference/models Request Method: GET Status Code: 500 INTERNAL SERVER ERROR Remote Address: 192.168.21.131:80 Referrer Policy: strict-origin-when-cross-origin

Accept: */* Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMWZmNTJhYzMtYjk4NS00ODQzLWFiYmUtMTI1NzM1ZDRhMjBhIiwiZXhwIjoxNzA2MjM3NDY3LCJpc3MiOiJTRUxGX0hPU1RFRCIsInN1YiI6IkNvbnNvbGUgQVBJIFBhc3Nwb3J0In0.XbT7e8RKNOKk_Zr8kbb1tGeWFRVDuYzg3jNTjKGdyhg Connection: keep-alive Content-Type: application/json Cookie: locale=zh-Hans; session=eyJfZnJlc2giOmZhbHNlLCJ3b3Jrc3BhY2VfaWQiOiJhMDBmNTIzMi0xNDIyLTQ2ZDEtOWY3ZC0zNDgxNTY5Nzg0NTIifQ.ZY0VMw.k6IF4DWG2mDqBwe0UDN_JHr2mCs Host: 192.168.21.131 Referer: http://192.168.21.131/app/31a2e4a0-353a-4109-a0d6-3040d3a24ce7/overview User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
QQ图片20240103222503
QQ图片20240103222533

✔️ Expected Behavior

can''t add xinference models

Actual Behavior

No response

Originally created by @sisuad on GitHub (Jan 3, 2024). Originally assigned to: @takatost, @crazywoola on GitHub. ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Dify version 0.4.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1.docker-compose down (version0.3.34,it had succecfully run about a week with chatglm3-6b and xinference)and `docker rmi` related images 2.git pull the newest version from github links 3.docker-compose up to run the newest version(v.0.4.1,it can be seen on the setting page) 4.when I add xinference LLM ,embedding, rerank models all failed 5.web ui shows `Internel Server Error` 6 I chekedc the errors comes from `http://192.168.21.131/console/api/workspaces/current/model-providers/xinference/models` and `http://192.168.21.131/console/api/workspaces/current/models/model-types/llm` `Request URL: http://192.168.21.131/console/api/workspaces/current/model-providers/xinference/models Request Method: GET Status Code: 500 INTERNAL SERVER ERROR Remote Address: 192.168.21.131:80 Referrer Policy: strict-origin-when-cross-origin` `Accept: */* Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMWZmNTJhYzMtYjk4NS00ODQzLWFiYmUtMTI1NzM1ZDRhMjBhIiwiZXhwIjoxNzA2MjM3NDY3LCJpc3MiOiJTRUxGX0hPU1RFRCIsInN1YiI6IkNvbnNvbGUgQVBJIFBhc3Nwb3J0In0.XbT7e8RKNOKk_Zr8kbb1tGeWFRVDuYzg3jNTjKGdyhg Connection: keep-alive Content-Type: application/json Cookie: locale=zh-Hans; session=eyJfZnJlc2giOmZhbHNlLCJ3b3Jrc3BhY2VfaWQiOiJhMDBmNTIzMi0xNDIyLTQ2ZDEtOWY3ZC0zNDgxNTY5Nzg0NTIifQ.ZY0VMw.k6IF4DWG2mDqBwe0UDN_JHr2mCs Host: 192.168.21.131 Referer: http://192.168.21.131/app/31a2e4a0-353a-4109-a0d6-3040d3a24ce7/overview User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 ` ![QQ图片20240103222503](https://github.com/langgenius/dify/assets/4243155/240cea4c-e046-49fb-bc65-a2b56e2e38cc) ![QQ图片20240103222533](https://github.com/langgenius/dify/assets/4243155/2bd0e5a2-dd95-4088-adbf-e5dde7eecb0b) ### ✔️ Expected Behavior can''t add xinference models ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 17:28:45 -05:00
yindo closed this issue 2026-02-21 17:28:45 -05:00
Author
Owner

@crazywoola commented on GitHub (Jan 3, 2024):

I think the logs of the docker containers would be helpful to resolve this issue.

@crazywoola commented on GitHub (Jan 3, 2024): I think the logs of the docker containers would be helpful to resolve this issue.
Author
Owner

@andylzming commented on GitHub (Jan 3, 2024):

On the model supplier page, re-saving the added models can resolve the issue.

@andylzming commented on GitHub (Jan 3, 2024): On the model supplier page, re-saving the added models can resolve the issue.
Author
Owner

@sisuad commented on GitHub (Jan 3, 2024):

I think the logs of the docker containers would be helpful to resolve this issue.

nginx_1 | 192.168.20.120 - - [04/Jan/2024:02:31:42 +0000] "GET /console/api/workspaces/current/default-model?model_type=speech2text HTTP/1.1" 200 620 "http://192.168.21.131/app/31a2e4a0-353a-4109-a0d6-3040d3a24ce7/configuration" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
api_1 | ERROR:app:Exception on /console/api/workspaces/current/models/model-types/llm [GET]
api_1 | Traceback (most recent call last):
api_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
api_1 | rv = self.dispatch_request()
api_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
api_1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
api_1 | File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper
api_1 | resp = resource(*args, **kwargs)
api_1 | File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 109, in view
api_1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs)
api_1 | File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
api_1 | resp = meth(*args, **kwargs)
api_1 | File "/app/api/controllers/console/setup.py", line 79, in decorated
api_1 | return view(*args, **kwargs)
api_1 | File "/app/api/libs/login.py", line 94, in decorated_view
api_1 | return current_app.ensure_sync(func)(*args, **kwargs)
api_1 | File "/app/api/controllers/console/wraps.py", line 20, in decorated
api_1 | return view(*args, **kwargs)
api_1 | File "/app/api/controllers/console/workspace/models.py", line 250, in get
api_1 | models = model_provider_service.get_models_by_model_type(
api_1 | File "/app/api/services/model_provider_service.py", line 273, in get_models_by_model_type
api_1 | models = provider_configurations.get_models(
api_1 | File "/app/api/core/entities/provider_configuration.py", line 618, in get_models
api_1 | all_models.extend(provider_configuration.get_provider_models(model_type, only_active))
api_1 | File "/app/api/core/entities/provider_configuration.py", line 461, in get_provider_models
api_1 | provider_models = self._get_custom_provider_models(
api_1 | File "/app/api/core/entities/provider_configuration.py", line 549, in _get_custom_provider_models
api_1 | .get_customizable_model_schema_from_credentials(
api_1 | File "/app/api/core/model_runtime/model_providers/__base/ai_model.py", line 249, in get_customizable_model_schema_from_credentials
api_1 | return self._get_customizable_model_schema(model, credentials)
api_1 | File "/app/api/core/model_runtime/model_providers/__base/ai_model.py", line 255, in _get_customizable_model_schema
api_1 | schema = self.get_customizable_model_schema(model, credentials)
api_1 | File "/app/api/core/model_runtime/model_providers/xinference/llm/llm.py", line 259, in get_customizable_model_schema
api_1 | extra_args = XinferenceHelper.get_xinference_extra_parameter(
api_1 | File "/app/api/core/model_runtime/model_providers/xinference/llm/xinference_helper.py", line 30, in get_xinference_extra_parameter
api_1 | 'value': XinferenceHelper._get_xinference_extra_parameter(server_url, model_uid)
api_1 | File "/app/api/core/model_runtime/model_providers/xinference/llm/xinference_helper.py", line 63, in _get_xinference_extra_parameter
api_1 | raise RuntimeError(f'get xinference model extra parameter failed, status code: {response.status_code}, response: {response.text}')
api_1 | RuntimeError: get xinference model extra parameter failed, status code: 400, response: {"detail":"[address=0.0.0.0:60371, pid=724] Model not found in the model list, uid: chatglm3-6b"}

@sisuad commented on GitHub (Jan 3, 2024): > I think the logs of the docker containers would be helpful to resolve this issue. nginx_1 | 192.168.20.120 - - [04/Jan/2024:02:31:42 +0000] "GET /console/api/workspaces/current/default-model?model_type=speech2text HTTP/1.1" 200 620 "http://192.168.21.131/app/31a2e4a0-353a-4109-a0d6-3040d3a24ce7/configuration" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-" api_1 | ERROR:app:Exception on /console/api/workspaces/current/models/model-types/llm [GET] api_1 | Traceback (most recent call last): api_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request api_1 | rv = self.dispatch_request() api_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request api_1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) api_1 | File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper api_1 | resp = resource(*args, **kwargs) api_1 | File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 109, in view api_1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) api_1 | File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request api_1 | resp = meth(*args, **kwargs) api_1 | File "/app/api/controllers/console/setup.py", line 79, in decorated api_1 | return view(*args, **kwargs) api_1 | File "/app/api/libs/login.py", line 94, in decorated_view api_1 | return current_app.ensure_sync(func)(*args, **kwargs) api_1 | File "/app/api/controllers/console/wraps.py", line 20, in decorated api_1 | return view(*args, **kwargs) api_1 | File "/app/api/controllers/console/workspace/models.py", line 250, in get api_1 | models = model_provider_service.get_models_by_model_type( api_1 | File "/app/api/services/model_provider_service.py", line 273, in get_models_by_model_type api_1 | models = provider_configurations.get_models( api_1 | File "/app/api/core/entities/provider_configuration.py", line 618, in get_models api_1 | all_models.extend(provider_configuration.get_provider_models(model_type, only_active)) api_1 | File "/app/api/core/entities/provider_configuration.py", line 461, in get_provider_models api_1 | provider_models = self._get_custom_provider_models( api_1 | File "/app/api/core/entities/provider_configuration.py", line 549, in _get_custom_provider_models api_1 | .get_customizable_model_schema_from_credentials( api_1 | File "/app/api/core/model_runtime/model_providers/__base/ai_model.py", line 249, in get_customizable_model_schema_from_credentials api_1 | return self._get_customizable_model_schema(model, credentials) api_1 | File "/app/api/core/model_runtime/model_providers/__base/ai_model.py", line 255, in _get_customizable_model_schema api_1 | schema = self.get_customizable_model_schema(model, credentials) api_1 | File "/app/api/core/model_runtime/model_providers/xinference/llm/llm.py", line 259, in get_customizable_model_schema api_1 | extra_args = XinferenceHelper.get_xinference_extra_parameter( api_1 | File "/app/api/core/model_runtime/model_providers/xinference/llm/xinference_helper.py", line 30, in get_xinference_extra_parameter api_1 | 'value': XinferenceHelper._get_xinference_extra_parameter(server_url, model_uid) api_1 | File "/app/api/core/model_runtime/model_providers/xinference/llm/xinference_helper.py", line 63, in _get_xinference_extra_parameter api_1 | raise RuntimeError(f'get xinference model extra parameter failed, status code: {response.status_code}, response: {response.text}') api_1 | RuntimeError: get xinference model extra parameter failed, status code: 400, response: {"detail":"[address=0.0.0.0:60371, pid=724] Model not found in the model list, uid: chatglm3-6b"}
Author
Owner

@sisuad commented on GitHub (Jan 3, 2024):

On the model supplier page, re-saving the added models can resolve the issue.

That's exactly what I thought too, but I can't remove the unbounded suppliers in the created chatboxes

I cannot add new models with XInference; it always fails to save.

already updated to version 0.4.2, but the problems remain.

@sisuad commented on GitHub (Jan 3, 2024): > On the model supplier page, re-saving the added models can resolve the issue. That's exactly what I thought too, but I can't remove the unbounded suppliers in the created chatboxes I cannot add new models with XInference; it always fails to save. already updated to version 0.4.2, but the problems remain.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#864