Plugin Exits Abnormally After Startup

by ADMIN 38 views

=====================================================

Introduction

This article documents a bug report for the Dify plugin, which exits abnormally after startup. The plugin in question is langgenius/openai, and the Dify version being used is 1.2.0. The deployment version of dify-plugin-daemon is 0.1.0, and both were deployed using source code.

Self Checks

Before submitting this report, we have performed the following self checks:

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify Version

The Dify version being used is 1.2.0.

Cloud or Self Hosted

The plugin is being run on a self-hosted instance.

Steps to Reproduce

The steps to reproduce the issue are as follows:

  1. Downloaded the langgenius/openai plugin from the marketplace.
  2. Installed it locally.
  3. According to the logs, the plugin installed and started normally, but immediately terminated with exit status code 255.

Logs

The logs for the plugin startup and termination are as follows:

2025/05/20 10:23:43 full_duplex.go:27:  [32m[INFO]new plugin logged in: langgenius/openai:0.0.22 [0m
2025/05/20 10:23:43 full_duplex.go:59:  [32m[INFO]init environment for plugin langgenius/openai:0.0.22 [0m
[GIN] 2025/05/20 - 10:23:43 | 200 |    2.416799ms |  100.125.153.78 | GET      "/plugin/fe6f288f-a9cc-4619-b64f-6d40e3582916/management/install/tasks?page=1&page_size=100"
[GIN] 2025/05/20 - 10:23:43 | 200 |    3.038815ms |  100.125.153.34 | GET      "/plugin/fe6f288f-a9cc-4619-b64f-6d40e3582916/management/install/tasks/e1689be4-dc35-4090-9d3c-a9951d5b4fbb"
2025/05/20 10:23:46 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Listing '.'...... [0m
2025/05/20 10:23:46 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - python3.12/site-packages/dify_plugin/__init__.py'... [0
2025/05/20 10:23:46 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/cli.py'...... [0m
2025/05/20 10:23:46 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - es/dify_plugin/interfaces/model/openai_compatible/__init__.py'... [0m
2025/05/20 10:23:46 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/interfaces/model/openai_compatible/common.py'...... [0m
2025/05/20 10:23:46 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - python3.12/site-packages/dpkt/rip.py'... [0m
2025/05/20 10:23:46 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/dpkt/rpc.py'...... [0m
2025/05/20 10:23:46 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - '... [0m
2025/05/20 10:23:47 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/gevent/pool.py'...... [0m
2025/05/20 10:23:47 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - tests/test__example_webproxy.py'... [0m
2025/05/20 10:23:47 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__example_wsgiserver.py'...... [0m
2025/05/20 10:23:47 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - dpool.py'... [0m
2025/05/20 10:23:47 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__threadpool_executor_patched.py'...... [0m
2025/05/20 10:23:47 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - g './.venv/lib/python3.12/site-packages/httpx/_transports'... [0m
2025/05/20 10:23:47 environment_python.go:300:  [32mINFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/httpx/_transports/__init__.py'...... [0m
2025/05/20 10:23:47 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - __.py'... [0m
2025/05/20 10:23:47 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/array_api/_array_object.py'...... [0m
2025/05/20 10:23:47 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - /lib/python3.12/site-packages/numpy/core/tests/test_errstate.py'... [0m
2025/05/20 10:23:48 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/core/tests/test_extint128.py'...... [0m
2025/05/20 10:23:48 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - ./.venv/lib/python3.12/site-packages/numpy/f2py/tests/src/size'... [0m
2025/05/20 10:23:49 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Listing './.venv/lib/python3.12/site-packages/numpy/f2py/tests/src/string'...... [0m
2025/05/20 10:23:49 environment_python.go:302:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - ng './.venv/lib/python3.12/site-packages/numpy/linalg/tests'... [0m
2025/05/20 10:23:49 environment_python.go:300:  [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/linalg/tests/__init__.py'...... [0m
2025/05/20 10<br/>
# Plugin Exits Abnormally After Startup
=====================================================

## Q&A

### Q: What is the issue with the plugin?

A: The plugin langgenius/openai is exiting abnormally after startup with an exit status code of 255.

### Q: What is the expected behavior?

A: The plugin should install and start normally without any issues.

### Q: What is the actual behavior?

A: The plugin installs and starts normally, but immediately terminates with an exit status code of 255.

### Q: What are the steps to reproduce the issue?

A: The steps to reproduce the issue are as follows:

1. Download the langgenius/openai plugin from the marketplace.
2. Install it locally.
3. The plugin will install and start normally, but immediately terminate with an exit status code of 255.

### Q: What are the logs for the plugin startup and termination?

A: The logs for the plugin startup and termination are as follows:

2025/05/20 10:23:43 full_duplex.go:27: [32m[INFO]new plugin logged in: langgenius/openai:0.0.22 [0m 2025/05/20 10:23:43 full_duplex.go:59: [32m[INFO]init environment for plugin langgenius/openai:0.0.22 [0m [GIN] 2025/05/20 - 10:23:43 | 200 | 2.416799ms | 100.125.153.78 | GET "/plugin/fe6f288f-a9cc-4619-b64f-6d40e3582916/management/install/tasks?page=1&page_size=100" [GIN] 2025/05/20 - 10:23:43 | 200 | 3.038815ms | 100.125.153.34 | GET "/plugin/fe6f288f-a9cc-4619-b64f-6d40e3582916/management/install/tasks/e1689be4-dc35-4090-9d3c-a9951d5b4fbb" 2025/05/20 10:23:46 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Listing '.'...... [0m 2025/05/20 10:23:46 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - python3.12/site-packages/dify_plugin/init.py'... [0m 2025/05/20 10:23:46 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/dify_plugin/cli.py'...... [0m 2025/05/20 10:23:46 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - es/dify_plugin/interfaces/model/openai_compatible/init.py'... [0m 2025/05/20 10:23:46 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python.12/site-packages/dify_plugin/interfaces/model/openai_compatible/common.py'...... [0m 2025/05/20 10:23:46 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - python3.12/site-packages/dpkt/rip.py'... [0m 2025/05/20 10:23:46 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/dpkt/rpc.py'...... [0m 2025/05/20 10:23:46 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - '... [0m 2025/05/20 10:23:47 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/gevent/pool.py'...... [0m 2025/05/20 10:23:47 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - tests/test__example_webproxy.py'... [0m 2025/05/20 10:23:47 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__example_wsgiserver.py'...... [0m 2025/05/20 10:23:47 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - dpool.py'... [0m 2025/05/20 10:23:47 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/gevent/tests/test__threadpool_executor_patched.py'...... [0m 2025/05/20 10:23:47 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - g './.venv/lib/python3.12/site-packages/httpx/_transports'... [0m 2025/05/20 10:23:47 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/httpx/_transports/init.py'...... [0m 2025/05/20 10:23:47 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - __.py'... [0m 2025/05/20 10:23:47 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/array_api/_array_object.py'...... [0m 2025/05/20 10:23:47 environment.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - /lib/python3.12/site-packages/numpy/core/tests/test_errstate.py'... [0m 2025/05/20 10:23:48 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/core/tests/test_extint128.py'...... [0m 2025/05/20 10:23:48 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - ./.venv/lib/python3.12/site-packages/numpy/f2py/tests/src/size'... [0m 2025/05/20 10:23:49 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Listing './.venv/lib/python3.12/site-packages/numpy/f2py/tests/src/string'...... [0m 2025/05/20 10:23:49 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - ng './.venv/lib/python3.12/site-packages/numpy/linalg/tests'... [0m 2025/05/20 10:23:49 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/linalg/tests/init.py'...... [0m 2025/05/20 10:23:49 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/numpy/tests/test_ctypeslib.py'...... [0m 2025/05/20 10:23:49 environment_python.go:300: [32m[INFO]pre-compiling langgenius/openai:0.0.22 - Compiling './.venv/lib/python3.12/site-packages/openai/cli/_api/files.py'...... [0m 2025/05/20 10:23:49 environment_python.go:302: [32m[INFO]pre-compiling langgenius/openai:0.0.22