Skip to content

acme/autocert: missing certificate #102

Closed

Description

@khanton

I have set up with the following configuration:

version: '3'
services:
  reproxy:
    restart: always
    image: umputun/reproxy:master
    container_name: reproxy
    hostname: reproxy
    ports:
      - "80:8080"
      - "443:8443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - TZ=UTC
      - DOCKER_ENABLED=true
      - DOCKER_AUTO=true
      - DEBUG=false
      - MGMT=false
      - SSL_TYPE=auto
      - SSL_ACME_FQDN=khanton.ru

  boti:
    restart: always
    image: ghcr.io/khanton/boti:master
    hostname: khanton.ru
    container_name: khanton.ru
    ports:
      - "8080:8080"
    volumes:
      - ./db:/app/db
    environment:
      - DB_PATH=db
      - PORT=8080
      - HOST=0.0.0.0
      - TOKEN=XXX
      - SERVER=https://khanton.ru
    labels:
      reproxy.server: '*'
      reproxy.route: '^/(.*)'
      reproxy.dest: '/@1'

It worked! However, after re-creating the container, https broke.

 % curl -v -H "Content-Type: application/json" -d '{"msg": "Hello !"}' https://khanton.ru/api/v1/msg
*   Trying 95.217.13.45...
* TCP_NODELAY set
* Connected to khanton.ru (95.217.13.45) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* Operation timed out after 300078 milliseconds with 0 out of 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 300078 milliseconds with 0 out of 0 bytes received

reproxy log from container:

reproxy    | 2021/07/19 18:52:01.579 [WARN]  http: TLS handshake error from 185.197.33.7:55610: acme/autocert: missing certificate

Activity

  1. umputun commented on Jul 19, 2021

    @umputun
    Owner

    you should add persistent volume to keep your certificates. this is not related to reporxy but a part of the docker and docker compose

  2. umputun commented on Jul 19, 2021

    @umputun
    Owner

    just in case if it wasn't clear:

    1. add - ./var/ssl:/srv/var/ssl to volumes section
    2. add - SSL_ACME_LOCATION=/srv/var/ssl to environment section
  3. umputun commented on Jul 19, 2021

    @umputun
    Owner

    because this is not a bug report but rather a general question I'll move it to discussions

  4. Repository owner locked and limited conversation to collaborators on Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions