Docker Community Forums

Share and learn in the Docker community.

Docker-compose resulted in The connection was reset (from firefox) or Empty reply from server (from curl)?

I tried this on Debian buster (10) & manjaro 20. my docker engine info:

❯ docker version
Client: Docker Engine - Community
 Version:           20.10.1
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        831ebea
 Built:             Tue Dec 15 04:34:48 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       f001486
  Built:            Tue Dec 15 04:32:45 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

when I am trying to run docker-compose up --build against the following .yml file:

version: '2'
services:
  db:
    image: postgres:13
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - POSTGRES_DB=postgres
    restart: always
    volumes:
        - ./postgresql:/var/lib/postgresql/data

  odoo14:
    image: odoo:14
    depends_on:
      - db
    ports:
      - "8069:8069"
    tty: true
    volumes:
      - ./addons:/mnt/extra-addons
      - ./etc:/etc/odoo
    restart: always

it works fine as I see from logs however when I try to access the service odoo14 from firefox I get an error The connection was reset & using curl I get an error Empty reply from server.

I checked other questions & they suggested to let the service odoo14 to bind to address 0.0.0.0 instead of localhost. so I added command: -- --http-interface=0.0.0.0 but with no success. even though it is mentioned in the documentation that 0.0.0.0 is the default interface.

when running the images using docker it is working fine. like using the following two commands:

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:13
docker run -p 8069:8069 --name odoo --link db:db -t odoo:14.0

I get redirected correctly in the browser. so what would be the problem of docker-compose?

Everything fine there. But from the host:

root@ubuntu:/home/muellermichel# curl -v http://localhost:7000

  • About to connect() to localhost port 7000 (#0)
  • Trying 127.0.0.1… connected

GET / HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: localhost:7000
Accept: /

  • Empty reply from server
  • Connection #0 to host localhost left intact
    curl: (52) Empty reply from server
  • Closing connection #0

I am sorry, I still don’t understand.