XRAY: Failed to get db migration parameters: Failed to check if mongo migration is needed .(检查mongo迁移是否需要

劳伦斯冯
2023-01-22 11:06

当启动Xray时,如果数据库配置错误,您可能会看到以下错误。2021-09-29T09:22:27.358Z [jfxr] [ERROR] [45697710ba70780c] [migrate:46] [main] Failed to get db migration parameters: Failed to check if mongo migration is needed . (Failed to get db migration parameters
——at /go/src/www.si-fil.com/xray/internal/migration/db/migrate.go:70 (GetMigrationDbs)——
原因:failed to get postgres db migration version
——at /go/src/www.si-fil.com/xray/internal/migration/db/migrate.go:103 (IsMongoMigrationNeeded)——
原因:未找到驱动程序“postgresql”。

解决方案

上述错误通常是由于在system.yaml中发现的数据库URL配置错误造成的。一个常见的问题是在URL中使用名称PostgreSQL而不是Postgres。它通常看起来应该如下所示。共享
数据库:
类型:postgresql
司机:org.postgresql.Driver
url: postgres: / / < database_host >: <: port > / x光吗?sslmode =禁用
用户名:x光
密码:x光