Failed to start when using mysql #215

Open
opened 2026-02-16 00:20:31 -05:00 by yindo · 1 comment
Owner

Originally created by @lakako on GitHub (Dec 4, 2025).

Self Checks

To make sure we get to you in time, please check the following :)

  • 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."

Versions

  1. dify-plugin-daemon Version: 0.4.1-local
  2. dify-api Version: 1.10.1

Describe the bug
install on k8s using BorisPolonsky/dify-helm

2025/12/04 07:44:43 pool.go:32: [INFO]init routine pool, size: 10000

2025/12/04 07:44:43  Error 1061 (42000): Duplicate key name 'uni_plugin_declarations_plugin_unique_identifier'
[19.290ms] [rows:0] ALTER TABLE `plugin_declarations` ADD CONSTRAINT `uni_plugin_declarations_plugin_unique_identifier` UNIQUE (`plugin_unique_identifier`)
2025/12/04 07:44:43 init.go:104: [PANIC]failed to auto migrate: Error 1061 (42000): Duplicate key name 'uni_plugin_declarations_plugin_unique_identifier'
panic: [PANIC]failed to auto migrate: Error 1061 (42000): Duplicate key name 'uni_plugin_declarations_plugin_unique_identifier'

goroutine 1 [running]:
github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x268e7b3, 0x5}, {0x26c21d3?, 0x21c0a38?}, 0x1, {0xc0006b9b90, 0x1, 0x1})
        /app/internal/utils/log/log.go:40 +0x305
github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...)
        /app/internal/utils/log/log.go:66
github.com/langgenius/dify-plugin-daemon/internal/db.Init(0x2710?)
        /app/internal/db/init.go:104 +0x46b
github.com/langgenius/dify-plugin-daemon/internal/server.(*App).Run(0xc000011488, 0xc0007bd808)
        /app/internal/server/server.go:94 +0xd2
main.main()
        /app/cmd/server/main.go:28 +0x125

To Reproduce
install on k8s using BorisPolonsky/dify-helm

Expected behavior
start plugin daemon

Screenshots

Additional context

Originally created by @lakako on GitHub (Dec 4, 2025). **Self Checks** To make sure we get to you in time, please check the following :) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon Version: 0.4.1-local 2. dify-api Version: 1.10.1 **Describe the bug** install on k8s using BorisPolonsky/dify-helm ``` 2025/12/04 07:44:43 pool.go:32: [INFO]init routine pool, size: 10000 2025/12/04 07:44:43 Error 1061 (42000): Duplicate key name 'uni_plugin_declarations_plugin_unique_identifier' [19.290ms] [rows:0] ALTER TABLE `plugin_declarations` ADD CONSTRAINT `uni_plugin_declarations_plugin_unique_identifier` UNIQUE (`plugin_unique_identifier`) 2025/12/04 07:44:43 init.go:104: [PANIC]failed to auto migrate: Error 1061 (42000): Duplicate key name 'uni_plugin_declarations_plugin_unique_identifier' panic: [PANIC]failed to auto migrate: Error 1061 (42000): Duplicate key name 'uni_plugin_declarations_plugin_unique_identifier' goroutine 1 [running]: github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x268e7b3, 0x5}, {0x26c21d3?, 0x21c0a38?}, 0x1, {0xc0006b9b90, 0x1, 0x1}) /app/internal/utils/log/log.go:40 +0x305 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...) /app/internal/utils/log/log.go:66 github.com/langgenius/dify-plugin-daemon/internal/db.Init(0x2710?) /app/internal/db/init.go:104 +0x46b github.com/langgenius/dify-plugin-daemon/internal/server.(*App).Run(0xc000011488, 0xc0007bd808) /app/internal/server/server.go:94 +0xd2 main.main() /app/cmd/server/main.go:28 +0x125 ``` **To Reproduce** install on k8s using BorisPolonsky/dify-helm **Expected behavior** start plugin daemon **Screenshots** **Additional context**
Author
Owner

@Yeuoly commented on GitHub (Dec 12, 2025):

It seems that the migration progress has failed, would you mind provide your current table schema of plugin_declarations? A duplicated unique constrains is going to be created repeatedly.

As the definition of PluginDeclaration has not been modified since 1 year ago, I think it's a upstream issue.

@Yeuoly commented on GitHub (Dec 12, 2025): It seems that the migration progress has failed, would you mind provide your current table schema of `plugin_declarations`? A duplicated unique constrains is going to be created repeatedly. As the definition of `PluginDeclaration` has not been modified since 1 year ago, I think it's a upstream issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#215