LLM model is not available #20865

Closed
opened 2026-02-21 20:09:28 -05:00 by yindo · 1 comment
Owner

Originally created by @userGuo-o on GitHub (Dec 8, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

2.0.0-beta2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Every once in a while, this issue arises: the model plugin in LLM becomes unusable, and then recovers after some time. Upon inspection, there are no errors reported by nginx or the API service, but the plugin service reports such an error

Image

2025/12/08 10:21:49 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: exit status 1, output: Resolved 81 packages in 41ms
Building pycairo==1.29.0
× Failed to build pycairo==1.29.0
├─▶ The build backend returned an error
╰─▶ Call to mesonpy.build_wheel failed (exit status: 1)

  [stdout]
  + meson setup
  /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src
  /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg
  -Dbuildtype=release -Db_ndebug=if-release
  -Db_vscrt=md -Dwheel=true -Dtests=false
  --native-file=/root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg/meson-python-native-file.ini
  The Meson build system
  Version: 1.9.2
  Source dir:
  /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src
  Build dir:
  /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg
  Build type: native build
  Project name: pycairo
  Project version: 1.29.0
  C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu
  13.3.0-6ubuntu2~24.04) 13.3.0")
  C linker for the host machine: cc ld.bfd 2.42
  Host machine cpu family: x86_64
  Host machine cpu: x86_64
  Program python3 found: YES
  (/root/.cache/uv/builds-v0/.tmpECQe0k/bin/python)
  Compiler for C supports arguments -Wall: YES
  Compiler for C supports arguments -Warray-bounds: YES
  Compiler for C supports arguments -Wcast-align: YES
  Compiler for C supports arguments -Wconversion: YES
  Compiler for C supports arguments -Wextra: YES
  Compiler for C supports arguments -Wformat=2: YES
  Compiler for C supports arguments -Wformat-nonliteral: YES
  Compiler for C supports arguments -Wformat-security: YES
  Compiler for C supports arguments -Wimplicit-function-declaration: YES
  Compiler for C supports arguments -Winit-self: YES
  Compiler for C supports arguments -Wmissing-format-attribute: YES
  Compiler for C supports arguments -Wmissing-noreturn: YES
  Compiler for C supports arguments -Wnested-externs: YES
  Compiler for C supports arguments -Wold-style-definition: YES
  Compiler for C supports arguments -Wpacked: YES
  Compiler for C supports arguments -Wpointer-arith: YES
  Compiler for C supports arguments -Wreturn-type: YES
  Compiler for C supports arguments -Wshadow: YES
  Compiler for C supports arguments -Wsign-compare: YES
  Compiler for C supports arguments -Wstrict-aliasing: YES
  Compiler for C supports arguments -Wundef: YES
  Compiler for C supports arguments -Wunused-but-set-variable: YES
  Compiler for C supports arguments -Wswitch-default: YES
  Compiler for C supports arguments -Wno-missing-field-initializers: YES
  Compiler for C supports arguments -Wno-unused-parameter: YES
  Compiler for C supports arguments -fno-strict-aliasing: YES
  Compiler for C supports arguments -fvisibility=hidden: YES
  Did not find pkg-config by name 'pkg-config'
  Found pkg-config: NO
  Did not find CMake 'cmake'
  Found CMake: NO
  Run-time dependency cairo found: NO

  ../cairo/meson.build:31:12: ERROR: Dependency lookup for cairo with
  method 'pkgconfig' failed: Pkg-config for machine host machine not
  found. Giving up.

  A full log can be found at
  /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg/meson-logs/meson-log.txt

  hint: This usually indicates a problem with the package or the build
  environment.

help: pycairo (v1.29.0) was included because xhtml2pdf (v0.2.17) depends
on svglib (v1.6.0) which depends on rlpycairo (v0.4.0) which
depends on pycairo

✔️ Expected Behavior

Every once in a while, this issue arises: the model plugin in LLM becomes unusable, and then recovers after some time. Upon inspection, there are no errors reported by nginx or the API service, but the plugin service reports such an error

Actual Behavior

No response

Originally created by @userGuo-o on GitHub (Dec 8, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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 submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 2.0.0-beta2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Every once in a while, this issue arises: the model plugin in LLM becomes unusable, and then recovers after some time. Upon inspection, there are no errors reported by nginx or the API service, but the plugin service reports such an error <img width="2293" height="448" alt="Image" src="https://github.com/user-attachments/assets/06260893-490f-4217-b4ed-2584a99f47f1" /> 2025/12/08 10:21:49 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: exit status 1, output: Resolved 81 packages in 41ms Building pycairo==1.29.0 × Failed to build `pycairo==1.29.0` ├─▶ The build backend returned an error ╰─▶ Call to `mesonpy.build_wheel` failed (exit status: 1) [stdout] + meson setup /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dtests=false --native-file=/root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg/meson-python-native-file.ini The Meson build system Version: 1.9.2 Source dir: /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src Build dir: /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg Build type: native build Project name: pycairo Project version: 1.29.0 C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0") C linker for the host machine: cc ld.bfd 2.42 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python3 found: YES (/root/.cache/uv/builds-v0/.tmpECQe0k/bin/python) Compiler for C supports arguments -Wall: YES Compiler for C supports arguments -Warray-bounds: YES Compiler for C supports arguments -Wcast-align: YES Compiler for C supports arguments -Wconversion: YES Compiler for C supports arguments -Wextra: YES Compiler for C supports arguments -Wformat=2: YES Compiler for C supports arguments -Wformat-nonliteral: YES Compiler for C supports arguments -Wformat-security: YES Compiler for C supports arguments -Wimplicit-function-declaration: YES Compiler for C supports arguments -Winit-self: YES Compiler for C supports arguments -Wmissing-format-attribute: YES Compiler for C supports arguments -Wmissing-noreturn: YES Compiler for C supports arguments -Wnested-externs: YES Compiler for C supports arguments -Wold-style-definition: YES Compiler for C supports arguments -Wpacked: YES Compiler for C supports arguments -Wpointer-arith: YES Compiler for C supports arguments -Wreturn-type: YES Compiler for C supports arguments -Wshadow: YES Compiler for C supports arguments -Wsign-compare: YES Compiler for C supports arguments -Wstrict-aliasing: YES Compiler for C supports arguments -Wundef: YES Compiler for C supports arguments -Wunused-but-set-variable: YES Compiler for C supports arguments -Wswitch-default: YES Compiler for C supports arguments -Wno-missing-field-initializers: YES Compiler for C supports arguments -Wno-unused-parameter: YES Compiler for C supports arguments -fno-strict-aliasing: YES Compiler for C supports arguments -fvisibility=hidden: YES Did not find pkg-config by name 'pkg-config' Found pkg-config: NO Did not find CMake 'cmake' Found CMake: NO Run-time dependency cairo found: NO ../cairo/meson.build:31:12: ERROR: Dependency lookup for cairo with method 'pkgconfig' failed: Pkg-config for machine host machine not found. Giving up. A full log can be found at /root/.cache/uv/sdists-v9/pypi/pycairo/1.29.0/jrf7XtkwzxkE2xsN8YzeI/src/.mesonpy-556jeotg/meson-logs/meson-log.txt hint: This usually indicates a problem with the package or the build environment. help: `pycairo` (v1.29.0) was included because `xhtml2pdf` (v0.2.17) depends on `svglib` (v1.6.0) which depends on `rlpycairo` (v0.4.0) which depends on `pycairo` ### ✔️ Expected Behavior Every once in a while, this issue arises: the model plugin in LLM becomes unusable, and then recovers after some time. Upon inspection, there are no errors reported by nginx or the API service, but the plugin service reports such an error ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:09:28 -05:00
yindo closed this issue 2026-02-21 20:09:28 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 8, 2025):

The root cause of your intermittent LLM model plugin failures is missing system dependencies in the plugin daemon Docker image—specifically, pkg-config, cmake, and the Cairo development libraries required for building pycairo. The default Dify plugin daemon image does not include these, which leads to build errors during plugin initialization and makes the model temporarily unavailable until the environment recovers or is rebuilt.

To fix this, update your plugin daemon Dockerfile to install the required packages before installing Python dependencies:

RUN apt-get update && apt-get install -y --no-install-recommends \
    pkg-config \
    cmake \
    libcairo2-dev \
    libpango1.0-dev \
    libpng-dev \
    libglib2.0-dev

After making this change, rebuild your Docker image and redeploy the plugin daemon container. This should resolve the pycairo build failures and stabilize model availability reference.

For network-related dependency installation issues, set up a local PyPI mirror and configure the PIP_MIRROR_URL environment variable in your docker-compose.yaml or .env file. You can also increase PYTHON_ENV_INIT_TIMEOUT and UV_HTTP_TIMEOUT to avoid timeouts during installation reference.

If you make any changes to environment variables or configuration, remember to restart the plugin daemon container for them to take effect.

Let me know if you need a step-by-step guide for rebuilding the image or updating your Docker setup.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 8, 2025): <!-- Answer --> The root cause of your intermittent LLM model plugin failures is missing system dependencies in the plugin daemon Docker image—specifically, `pkg-config`, `cmake`, and the Cairo development libraries required for building `pycairo`. The default Dify plugin daemon image does not include these, which leads to build errors during plugin initialization and makes the model temporarily unavailable until the environment recovers or is rebuilt. To fix this, update your plugin daemon Dockerfile to install the required packages before installing Python dependencies: ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config \ cmake \ libcairo2-dev \ libpango1.0-dev \ libpng-dev \ libglib2.0-dev ``` After making this change, rebuild your Docker image and redeploy the plugin daemon container. This should resolve the pycairo build failures and stabilize model availability [reference](https://github.com/langgenius/dify/issues/28461). For network-related dependency installation issues, set up a local PyPI mirror and configure the `PIP_MIRROR_URL` environment variable in your `docker-compose.yaml` or `.env` file. You can also increase `PYTHON_ENV_INIT_TIMEOUT` and `UV_HTTP_TIMEOUT` to avoid timeouts during installation [reference](https://github.com/langgenius/dify/issues/25667). If you make any changes to environment variables or configuration, remember to restart the plugin daemon container for them to take effect. Let me know if you need a step-by-step guide for rebuilding the image or updating your Docker setup. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2ff58046-a002-42e7-8e42-64599c1b3567?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20root%20cause%20of%20your%20intermittent%20LLM%20model%20plugin%20failures%20is%20missing%20system%20dependencies%20in%20the%20plugin%20daemon%20Docker%20image%E2%80%94specifically%2C%20%60pkg-config%60%2C%20%60cmake%60%2C%20and%20the%20Cairo%20development%20libraries%20required%20for%20building%20%60pycairo%60.%20The%20default%20Dify%20plugin%20daemon%20image%20does%20not%20include%20these%2C%20which%20leads%20to%20build%20errors%20during%20plugin%20initialization%20and%20makes%20the%20model%20temporarily%20unavailable%20until%20the%20environment%20recovers%20or%20is%20rebuilt.%20%0A%0ATo%20fix%20this%2C%20update%20your%20plugin%20daemon%20Dockerfile%20to%20install%20the%20required%20packages%20before%20installing%20Python%20dependencies%3A%0A%0A%60%60%60dockerfile%0ARUN%20apt-get%20update%20%26%26%20apt-get%20install%20-y%20--no-install-recommends%20%5C%0A%20%20%20%20pkg-config%20%5C%0A%20%20%20%20cmake%20%5C%0A%20%20%20%20libcairo2-dev%20%5C%0A%20%20%20%20libpango1.0-dev%20%5C%0A%20%20%20%20libpng-dev%20%5C%0A%20%20%20%20libglib2.0-dev%0A%60%60%60%0A%0AAfter%20making%20this%20change%2C%20rebuild%20your%20Docker%20image%20and%20redeploy%20the%20plugin%20daemon%20container.%20This%20should%20resolve%20the%20pycairo%20build%20failures%20and%20stabilize%20model%20availability%20%5Breference%5D%28https%3A//github.com/langgenius/dify/issues/28461%29.%0A%0AFor%20network-related%20dependency%20installation%20issues%2C%20set%20up%20a%20local%20PyPI%20mirror%20and%20configure%20the%20%60PIP_MIRROR_URL%60%20environment%20variable%20in%20your%20%60docker-compose.yaml%60%20or%20%60.env%60%20file.%20You%20can%20also%20increase%20%60PYTHON_ENV_INIT_TIMEOUT%60%20and%20%60UV_HTTP_TIMEOUT%60%20to%20avoid%20timeouts%20during%20installation%20%5Breference%5D%28https%3A//github.com/langgenius/dify/issues/25667%29.%0A%0AIf%20you%20make%20any%20changes%20to%20environment%20variables%20or%20configuration%2C%20remember%20to%20restart%20the%20plugin%20daemon%20container%20for%20them%20to%20take%20effect.%0A%0ALet%20me%20know%20if%20you%20need%20a%20step-by-step%20guide%20for%20rebuilding%20the%20image%20or%20updating%20your%20Docker%20setup.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29287)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20865