ApsaraDB / PolarDB-for-PostgreSQL

A cloud-native database based on PostgreSQL developed by Alibaba Cloud.

Home Page:https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question]您好,我在docker部署遇到了一些问题

wuqingxiang opened this issue · comments

我根据你们提供的docker部署方式进行,但是部署之后polardb服务却没有起来,日志报错如下:

pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2023-11-28 15:42:40.897 CST [10] WARNING:  polardb skip readControlfile
2023-11-28 15:42:40.897 CST [10] LOG:  recovery.conf not exist, polardb in readwrite mode
2023-11-28 15:42:40.898 CST [10] LOG:  polar_vfs loaded in postmaster 10
2023-11-28 15:42:40.901 CST [10] WARNING:  could not access file "polar_resource_group": No such file or directory
2023-11-28 15:42:40.906 CST [10] LOG:  Auto detecting polar_stat_sql.linux_hz parameter...
2023-11-28 15:42:40.906 CST [10] LOG:  polar_stat_sql.linux_hz is set to 1000000
2023-11-28 15:42:40.914 CST [10] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-11-28 15:42:40.915 CST [10] LOG:  listening on IPv6 address "::", port 5432
2023-11-28 15:42:40.931 CST [10] LOG:  listening on Unix socket "./.s.PGSQL.5432"
2023-11-28 15:42:40.939 CST [10] LOG:  clog buffer max slot size is 256, and it will be set to 256
2023-11-28 15:42:40.939 CST [10] LOG:  commit timestamp buffer max slot size is 128, and it will set to 16
2023-11-28 15:42:40.939 CST [10] LOG:  The total log index memory table size is 402525528
2023-11-28 15:42:40.939 CST [10] LOG:  The total log index memory table size is 133987128
2023-11-28 15:42:40.939 CST [10] LOG:  The total log index memory table size is 66993864
2023-11-28 15:42:40.948 CST [10] LOG:  init vfs_mount_state done
2023-11-28 15:42:40.948 CST [10] LOG:  Database will be in readwrite mode
2023-11-28 15:42:40.948 CST [10] LOG:  pfs in localfs mode
2023-11-28 15:42:40.948 CST [10] LOG:  PolarIOStatArray share memory total size is 697320
2023-11-28 15:42:40.950 CST [10] LOG:  PolarGlobalIOReadStats share memory size is 176
2023-11-28 15:42:40.950 CST [10] LOG:  polar_vfs init done
2023-11-28 15:42:40.950 CST [10] LOG:  polar_lwlocks_stat_array share memory total size is 757760
2023-11-28 15:42:40.951 CST [10] LOG:  polar_locks_stat_array share memory total size is 473600
2023-11-28 15:42:40.952 CST [10] LOG:  polar_network_stat_array share memory total size is 14304
2023-11-28 15:42:40.958 CST [10] LOG:  polardb delay load controlfile
2023-11-28 15:42:40.970 CST [10] LOG:  clog buffer max slot size is 256, and it will be set to 256
2023-11-28 15:42:40.971 CST [10] LOG:  commit timestamp buffer max slot size is 128, and it will set to 16
2023-11-28 15:42:40.973 CST [10] LOG:  The total log index memory table size is 402525528
2023-11-28 15:42:40.973 CST [10] LOG:  vfs open dir /home/postgres/tmp_master_dir_polardb_pg_1100_bld/polar_rel_size_cache, num open dir 1
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move pg_logindex to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move pg_logindex to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move pg_logindex to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move pg_logindex to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] LOG:  Force to clean trash dir because move the same dir pg_logindex to the trash dir too much times
2023-11-28 15:42:41.286 CST [10] LOG:  vfs open dir polar_cache_trash, num open dir 1
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move pg_logindex to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] LOG:  The total log index memory table size is 133987128
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move polar_fullpage to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move polar_fullpage to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move polar_fullpage to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move polar_fullpage to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.286 CST [10] LOG:  Force to clean trash dir because move the same dir polar_fullpage to the trash dir too much times
2023-11-28 15:42:41.286 CST [10] LOG:  vfs open dir polar_cache_trash, num open dir 1
2023-11-28 15:42:41.286 CST [10] WARNING:  Failed to move polar_fullpage to local trash dir polar_cache_trash, errno=18
2023-11-28 15:42:41.304 CST [10] LOG:  The total log index memory table size is 66993864
2023-11-28 15:42:41.312 CST [10] LOG:  vfs open dir pg_notify, num open dir 1
2023-11-28 15:42:41.312 CST [10] LOG:  removing file "pg_notify/0000"
2023-11-28 15:42:41.312 CST [10] LOG:  vfs_unlink pg_notify/0000
2023-11-28 15:42:41.320 CST [10] LOG:  forked new process, pid is 11, true pid is 11
2023-11-28 15:42:41.320 CST [10] LOG:  redirecting log output to logging collector process
2023-11-28 15:42:41.320 CST [10] HINT:  Future log output will appear in directory "pg_log".
.. done
server started

您好,请问这个问题是什么导致的,该怎么处理?

Hi @wuqingxiang ~ Thanks for opening this issue! 🎉

Please make sure you have provided enough information for subsequent discussion.

We will get back to you as soon as possible. ❤️

@wuqingxiang Seems that the server is running. Are you sure the service is not running? You can use docker exec -it ${container_name} bash and then ps -ef to see if there is any process of PostgreSQL.

@mrdrivingduck 实际上这个容器没有运行,是不是因为其他端口被占用的问题?
[root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9142c028c20d polardb/polardb_pg_local_instance:single "/bin/sh -c '~/tmp_b…" 43 hours ago Restarting (0) 44 seconds ago polardb e824086494eb nginx "/docker-entrypoint.…" 44 hours ago Up 44 hours 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:8090->8090/tcp, :::8090->8090/tcp, 0.0.0.0:8094->8094/tcp, :::8094->8094/tcp nginx 6f553fbb0279 rabbitmq:management "docker-entrypoint.s…" 47 hours ago Up 47 hours 0.0.0.0:4369->4369/tcp, :::4369->4369/tcp, 0.0.0.0:5671-5672->5671-5672/tcp, :::5671-5672->5671-5672/tcp, 0.0.0.0:15671-15672->15671-15672/tcp, :::15671-15672->15671-15672/tcp, 0.0.0.0:25672->25672/tcp, :::25672->25672/tcp, 15691-15692/tcp rabbitmq ddb871ef4e12 redis:latest "docker-entrypoint.s…" 2 months ago Up 2 months 0.0.0.0:6376->6376/tcp, :::6376->6376/tcp, 0.0.0.0:16376->16376/tcp, :::16376->16376/tcp, 6379/tcp redis-6376 9307179be460 redis:latest "docker-entrypoint.s…" 2 months ago Up 7 days 0.0.0.0:6377->6377/tcp, :::6377->6377/tcp, 0.0.0.0:16377->16377/tcp, :::16377->16377/tcp, 6379/tcp redis-6377 2f1d24aa1f2e redis:latest "docker-entrypoint.s…" 2 months ago Up 5 days 0.0.0.0:6378->6378/tcp, :::6378->6378/tcp, 0.0.0.0:16378->16378/tcp, :::16378->16378/tcp, 6379/tcp redis-6378 742c866c9809 redis:latest "docker-entrypoint.s…" 2 months ago Up 7 days 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp, 0.0.0.0:16379->16379/tcp, :::16379->16379/tcp redis-6379

@wuqingxiang Please use polardb/polardb_pg_local_instance or polardb/polardb_pg_local_instance:latest, instead of polardb/polardb_pg_local_instance:single.

@mrdrivingduck 谢谢,启动起来了

@wuqingxiang Good to know. Close as solved.

/close