使用docker-compose运行时PostgresSql以信号11终止 [英] PostgresSql terminates with signal 11 when run with docker-compose

查看:48
本文介绍了使用docker-compose运行时PostgresSql以信号11终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用docker-compose运行一个简单的postgres,这比我想象的更具挑战性.我正在 Raspberry Pi 4 Model B Rev 1.1 docker-compose 1.27.4 上运行它.使用以下输出调用 docker-compose up 后失败:

I'm trying to run a simple postgres with docker-compose, which is more challenging than I thought. I'm running it on a Raspberry Pi 4 Model B Rev 1.1 with docker-compose at 1.27.4. It fails after calling docker-compose up with the following output:

mydb_1  | Success. You can now start the database server using:
mydb_1  |
mydb_1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
mydb_1  |
mydb_1  | waiting for server to start....[36] LOG:  starting PostgreSQL 13.1 on arm-unknown-linux-musleabihf, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 32-bit
mydb_1  | [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
mydb_1  | ......[36] LOG:  startup process (PID 37) was terminated by signal 11: Segmentation fault
mydb_1  | [36] LOG:  aborting startup due to startup process failure
mydb_1  | [36] LOG:  database system is shut down
mydb_1  | pg_ctl: could not start server
mydb_1  | Examine the log output.
mydb_1  |  stopped waiting

docker-compose.yaml

docker-compose.yaml

version: '3'
services:
  mydb:
    image: postgres:13.1-alpine
    environment:
      - POSTGRES_USER=synapse
      - POSTGRES_PASSWORD=test
    volumes:
      - synapse-db:/var/lib/postgresql/data
volumes:
 synapse-db:

为什么会发生这种情况?

Any ideas why this might happen?

推荐答案

我在使用最新图像时遇到了同样的问题(我尝试从9到13全部尝试).看来问题出在最新版本,所以我用3个月大的 9.4.23-alpine 替换了几天前提交的 9-alpine 版本.问题消失了.因此,请尝试在此处 https之前选择任何版本.://hub.docker.com/r/arm32v7/postgres/tags?page = 1& ordering = last_updated

I had the same issue with the latest images (I tried all from 9 to 13). Looks like the problem is the latest build, so I replaced 9-alpine version which was commited a couple of days ago with 9.4.23-alpine which is 3 months old and the problem disappeared. So try to pick any version older than a week here https://hub.docker.com/r/arm32v7/postgres/tags?page=1&ordering=last_updated

这篇关于使用docker-compose运行时PostgresSql以信号11终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆