Skip to content

RockPete/canos_bug_report

Repository files navigation

Nacos 3.2.2 PostgreSQL Bug Report

Nacos 3.2.2 在 PostgreSQL 模式下启动失败的 Bug 复现工程。

环境

  • Nacos: nacos/nacos-server:v3.2.2
  • PostgreSQL: postgres:16-alpine

Bugs

Bug 1: 缺少 PostgreSQL 数据表模板

Nacos 3.x 不会自动为外置 PostgreSQL 建表,须手动从官方源码导出 pg-schema.sql 并挂载到 Postgres 的 initdb.d

Bug 2: config_info_beta 表不存在

即使导入了 pg-schema.sql,应用启动后仍报 relation "config_info_beta" does not exist

Bug 3: 认证配置缺失导致 Nacos 启动失败

Empty identity, Please set `nacos.core.auth.server.identity.key`
and `nacos.core.auth.server.identity.value`

项目结构

.
├── docker-compose.yml                                                  # 一键启动环境
├── .env                                                                # 环境变量
├── nacos/
│   └── application.properties                                          # Nacos 自定义配置
├── nacos-pg-schema.sql                                                 # 从 Nacos 3.2.2 源码导出的 PG schema
├── 1-derby-schema.sql                                                  # 尝试1: Derby 衍生 schema
├── 2-derby-schema.sql                                                  # 尝试2: 修正后的 schema
├── 3-derby-schema.sql                                                  # 尝试3: 继续修正的 schema
└── error_msg.md                                                        # 详细错误日志与排查过程

复现步骤

# 1. 启动
docker compose up -d --build

# 2. 检查错误
docker compose logs nacos
docker compose logs postgres

# 3. 清理
docker compose down -v

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages