deepflow icon indicating copy to clipboard operation
deepflow copied to clipboard

[BUG] deepflow-ctl 上传wasm插件报错

Open chluknight opened this issue 1 year ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

DeepFlow Component

Server

What you expected to happen

deepflow-ctl 执行deepflow-ctl create plugin命令报错invaid byte sequence for encoding UTF8: 0x9c (SQLSTATE 22021) 1c59de39edfdb26001cd1f54884a17d

How to reproduce

我把deepflow-server使用的MySQL数据库改造成了PostgreSQL 在使用PostgreSQL作为元数据引擎的环境上执行deepflow-ctl create pluing报错 1c59de39edfdb26001cd1f54884a17d

但是在本地使用原生MySQL数据库的环境中上传wasm插件是正常的 20b7139a797f2020ab2a66f41c57f3e

请问deepflow-ctl在执行deepflow-ctl create pluign命令时是会转成MySQL格式的SQL语句吗?调用的是deepflow-server的哪个接口?

这个问题可以麻烦给个解决思路吗?谢谢!

DeepFlow version

v6.4.9

DeepFlow agent list

No response

Kubernetes CNI

No response

Operation-System/Kernel version

No response

Anything else

No response

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

chluknight avatar Sep 13 '24 09:09 chluknight

deepflow-server 目前是没支持 PostgreSQL 的,适当改造即可,下面是一些资料:

  • 请求的 server 接口:https://github.com/deepflowio/deepflow/blob/main/server/controller/http/router/plugin.go#L43
  • gorm PostgreSQL 文档:https://gorm.io/docs/connecting_to_the_database.html#PostgreSQL
  • gorm PostgreSQL UTF8 issue:https://github.com/go-gorm/gorm/issues/5418
  • deepflow-server 数据库初始化https://github.com/deepflowio/deepflow/blob/main/server/controller/db/mysql/common/gorm.go#L77

roryye avatar Sep 13 '24 10:09 roryye