使用postgres服务的构建正在停滞

时间:2017-08-17 00:25:06

标签: postgresql docker yaml drone

我在一个月左右的时间内没有运行此特定版本,最近我从无人机版0.5更新为0.7.3。我遇到了一个问题,即使用postgres服务的构建永远不会完成。根据日志,它应该接受连接,但它永远不会超过启动服务的步骤。

将失速的示例

.drone.yml

pipeline:
  Run Something:
    image: busybox
    commands:
      - echo 'hello'

services:
  postgres:
    image: postgres
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=pgpass
    ports:
      - '15432:5432'

日志输出

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start


WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....LOG:  database system was shut down at 2017-08-17 00:06:37 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
 done
server started
ALTER ROLE


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
waiting for server to shut down....LOG:  shutting down
LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

LOG:  database system was shut down at 2017-08-17 00:06:38 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

注释

一切都停留在这里,构建永远不会完成。如果我删除端口和环境变量,我可以让它运行。我在一个不需要配置才能正常运行的沙箱中做到了...当然,在实践中,我确实需要调整端口和密码以使构建功能正常。

除了上个月左右的无人机版本之外,我没有改变任何东西。我很难过。

我尝试过的事情

  • 一次更改删除一个ENV var
  • 不同版本的postgres
  • 未定义端口映射
  • 使用detach: true而不是服务

感谢您的时间!

1 个答案:

答案 0 :(得分:0)

看了一会儿之后,我无法找到问题的根源。我决定启动一个尚未升级的全新无人机实例,并重新配置它。这似乎现在正在运作。我唯一的猜测是存在某种腐败。

至少使用docker旋转一个新实例进行测试非常简单。