Skip to content

Unstable connections to containers #740

Description

@alxsad

Description

After update colima to v0.5.5 I have some troubles with my services started by docker-compose. For example I try to connect to postgres in a container. With etcd container the same.

psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.

This behaviour has no any pattern. At least one try from 10 works correctly. After downgrading colima to 0.5.4 everything is ok.

Version

Colima Version: 0.5.5
Lima Version: 0.16.0
Qemu Version: 8.0.2

Operating System

  • macOS Intel <= 12 (Monterrey)
  • macOS Intel >= 13 (Ventura)
  • macOS M1 <= 12 (Monterrey)
  • macOS M1 >= 13 (Ventura)
  • Linux

Output of colima status

INFO[0000] colima [profile=finteqhub] is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/alxsad/.colima/finteqhub/docker.sock

Reproduction Steps

1. colima start --profile finteqhub --cpu 8 --memory 10 --disk 200 --vm-type=vz --vz-rosetta --runtime docker --mount-type=virtiofs
2. docker-compose up -d
3. psql -h localhost -U postgres -c 'select 1'

Expected behaviour

postgres should work stable without any issues

Additional context

version: '3.9'

services:
  postgres:
    image: postgres:14.8
    restart: on-failure
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: example
      PGDATA: /var/lib/postgresql/data/pgdata
    user: root
    ports:
      - '0.0.0.0:5432:5432'

volumes:
  pgdata:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions