我使用polardb-pg latest版本时,使用如下命令进行初始化:
docker run -it --rm --env POLARDB_PORT=5432 --env POLARDB_USER=postgres --env POLARDB_PASSWORD=123 -v G:/localDB/polardb:/var/polardb bb9216921591 echo 'done'
报错如下:
2024-10-16 14:22:17.985 CST [73] [73] FATAL: data directory "/var/polardb/primary_datadir" has invalid permissions
2024-10-16 14:22:17.985 CST [73] [73] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
2024-10-16 14:22:17.985 CST [73] [73] BACKTRACE:
/home/postgres/tmp_basedir_polardb_pg_1100_bld/bin/postgres(+0x41a43e) [0x55f22065a43e]
/home/postgres/tmp_basedir_polardb_pg_1100_bld/bin/postgres(AuxiliaryProcessMain+0x34f) [0x55f22077fbff]
/home/postgres/tmp_basedir_polardb_pg_1100_bld/bin/postgres(main+0x1a7) [0x55f220688667]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7feae0125d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7feae0125e40]
/home/postgres/tmp_basedir_polardb_pg_1100_bld/bin/postgres(_start+0x25) [0x55f2206986d5]
child process exited with exit code 1
initdb: removing contents of data directory "/var/polardb/primary_datadir"
use localfs mode
pg_twophase in local data dir does not exist
2024-10-16 06:22:18.283 GMT [91] [91] LOG: skipping missing configuration file "/var/polardb/primary_datadir/polar_dma.conf"
2024-10-16 06:22:18.284 GMT [91] [91] LOG: skipping missing configuration file "/var/polardb/primary_datadir/postgresql.auto.conf"
pg_ctl: directory "/var/polardb/primary_datadir" is not a database cluster directory
psql: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
我认为是权限问题,但是我另一台电脑似乎是正常的,想问问这种是什么问题?
docker run -it --rm \
--env POLARDB_PORT=5432 \
--env POLARDB_USER=polar \
--env POLARDB_PASSWORD=XXXXXXX \
-v ./:/var/polardb \
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15 \
echo 'done'
我是直接拷贝指令初始化,但是报错...
pg_ctl: directory "/var/polardb/primary_datadir" does not exis
我换了另外的指令依旧如此...
不添加挂路径可以正常启动,容器里面也有
/var/polardb/primary_datadir
有点懵了,我是有什么没搞对的吗?
但是我把挂载路径改成
-v ./:/var
对了,这...
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
PolarDB 分布式版 (PolarDB for Xscale,简称“PolarDB-X”) 是阿里云自主设计研发的高性能云原生分布式数据库产品,为用户提供高吞吐、大存储、低延时、易扩展和超高可用的云时代数据库服务。