You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

配置Basic-Auth后无法启动对接PostgreSQL的MLFlow服务器

MLFlow配置Basic-Auth对接PostgreSQL时出现Worker exited with code 3,服务器无法启动

配置Basic-Auth并对接PostgreSQL后,MLFlow服务器启动失败,报错Worker exited with code 3。移除Basic-Auth相关配置后服务器可正常运行,但无法实现密码保护。

认证配置文件内容

[mlflow]
default_permission = READ
database_uri = postgresql://un:pw@postgresdomain.com:5432/mlflowbackenddb
admin_username = customusername
admin_password = custompassword
authorization_function = mlflow.server.auth:authenticate_request_basic_auth

服务器启动命令

export MLFLOW_TRACKING_URI=postgresql://un:pw@postgresdomain.com:5432/mlflowbackenddb
export MLFLOW_AUTH_CONFIG_PATH=/home/ec2-user/custom_auth_config.ini
mlflow server \
   --backend-store-uri 'postgresql://un:pw@postgresdomain.com:5432/mlflowbackenddb' \
   --app-name basic-auth \
   --default-artifact-root s3://bucket-address \
   --artifacts-destination s3://bucket-address \
   --host 0.0.0.0 --serve-artifacts --port 8080 &

错误日志片段

2024/04/30 21:53:17 WARNING mlflow.server.auth: This feature is still experimental and may change in a future release without warning
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
2024/04/30 21:53:17 WARNING mlflow.server.auth: This feature is still experimental and may change in a future release without warning
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
2024/04/30 21:53:17 WARNING mlflow.server.auth: This feature is still experimental and may change in a future release without warning
2024/04/30 21:53:17 WARNING mlflow.server.auth: This feature is still experimental and may change in a future release without warning
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
[2024-04-30 21:53:17 +0000] [7806] [ERROR] Worker (pid:7807) exited with code 3
[2024-04-30 21:53:17 +0000] [7806] [ERROR] Worker (pid:7809) was sent SIGTERM!
[2024-04-30 21:53:17 +0000] [7806] [ERROR] Worker (pid:7808) was sent SIGTERM!
[2024-04-30 21:53:17 +0000] [7806] [ERROR] Worker (pid:7810) was sent SIGTERM!
[2024-04-30 21:53:17 +0000] [7806] [ERROR] Shutting down: Master
[2024-04-30 21:53:17 +0000] [7806] [ERROR] Reason: Worker failed to boot.

已尝试的排查步骤

  • 确认实例可正常连接PostgreSQL
  • 更换PostgreSQL版本(16→15)
  • 改用MySQL数据库
  • 参考官方文档及第三方PostgreSQL集成指南

内容的提问来源于stack exchange,提问作者cursed banana

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.25 01:11:10