Repository: nginx-proxy/acme-companion

Issue #616:  Error: could not get a nginx-proxy container ID
Created: 2020-02-07T01:46:43Z
I regularly see the following log output and new or re-deployed services are not reachable anymore.
Can fix this by restarting the letsencrypt-companion.
What do we need to figure out whats going on?
version: "2"

services:
  nginx-proxy:
    container_name: nginx-proxy
    image: nginx
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./nginx/htpasswd:/etc/nginx/htpasswd
      - ./nginx/conf.d:/etc/nginx/conf.d
      - ./nginx/vhost.d:/etc/nginx/vhost.d
      - ./nginx/html:/usr/share/nginx/html
      - ./nginx/certs:/etc/nginx/certs:ro
      - ./proxy.conf:/etc/nginx/conf.d/my_proxy.conf:ro
    networks:
      - proxy-tier
    restart: always

  nginx-gen:
    image: jwilder/docker-gen
    container_name: nginx-proxy-gen
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
    volumes_from:
      - nginx-proxy
    command: -notify-sighup nginx-proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen"
    restart: always

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: nginx-proxy-letsencrypt
    volumes_from:
      - nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./nginx/certs:/etc/nginx/certs:rw
    restart: always

networks:
  proxy-tier:
    external:
      name: nginx-proxy
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/05 23:58:43 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 00:58:43 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 01:58:43 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 02:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 03:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 04:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 05:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 06:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 07:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 08:58:44 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 09:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 10:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 11:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 12:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 13:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 14:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 15:58:45 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 16:58:46 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 17:58:46 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 18:58:46 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 19:58:46 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 20:58:46 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 21:58:46 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 22:58:47 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/06 23:58:47 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/07 00:58:47 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | 2020/02/07 01:09:12 Received event die for container 250c1c559494
nginx-proxy-letsencrypt | 2020/02/07 01:09:16 Received event start for container aaa4df1774eb
nginx-proxy-letsencrypt | 2020/02/07 01:09:31 Debounce minTimer fired
nginx-proxy-letsencrypt | 2020/02/07 01:09:32 Generated '/app/letsencrypt_service_data' from 9 containers
nginx-proxy-letsencrypt | 2020/02/07 01:09:32 Running '/app/signal_le_service'
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/07 01:09:32 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | 2020/02/07 01:11:32 Received event die for container aaa4df1774eb
nginx-proxy-letsencrypt | 2020/02/07 01:11:33 Received event stop for container aaa4df1774eb
nginx-proxy-letsencrypt | 2020/02/07 01:11:34 Received event start for container 9cb1786c446a
nginx-proxy-letsencrypt | 2020/02/07 01:11:49 Debounce minTimer fired
nginx-proxy-letsencrypt | 2020/02/07 01:11:49 Generated '/app/letsencrypt_service_data' from 9 containers
nginx-proxy-letsencrypt | 2020/02/07 01:11:49 Running '/app/signal_le_service'
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/07 01:11:49 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | 2020/02/07 01:18:36 Received event die for container 9cb1786c446a
nginx-proxy-letsencrypt | 2020/02/07 01:18:36 Received event die for container 16425f06132d
nginx-proxy-letsencrypt | 2020/02/07 01:18:36 Received event stop for container 9cb1786c446a
nginx-proxy-letsencrypt | 2020/02/07 01:18:36 Received event stop for container 16425f06132d
nginx-proxy-letsencrypt | 2020/02/07 01:18:37 Received event die for container 550b73d18d73
nginx-proxy-letsencrypt | 2020/02/07 01:18:37 Received event stop for container 550b73d18d73
nginx-proxy-letsencrypt | 2020/02/07 01:18:43 Received event start for container fa67831f74ba
nginx-proxy-letsencrypt | 2020/02/07 01:18:43 Received event start for container 529669d44dab
nginx-proxy-letsencrypt | 2020/02/07 01:18:44 Received event start for container 26fb7849eff9
nginx-proxy-letsencrypt | 2020/02/07 01:18:59 Debounce minTimer fired
nginx-proxy-letsencrypt | 2020/02/07 01:18:59 Generated '/app/letsencrypt_service_data' from 9 containers
nginx-proxy-letsencrypt | 2020/02/07 01:18:59 Running '/app/signal_le_service'
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/07 01:19:00 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | 2020/02/07 01:38:12 Received event die for container fa67831f74ba
nginx-proxy-letsencrypt | 2020/02/07 01:38:14 Received event stop for container fa67831f74ba
nginx-proxy-letsencrypt | 2020/02/07 01:38:15 Received event start for container f582f4e6d5b7
nginx-proxy-letsencrypt | 2020/02/07 01:38:30 Debounce minTimer fired
nginx-proxy-letsencrypt | 2020/02/07 01:38:30 Generated '/app/letsencrypt_service_data' from 9 containers
nginx-proxy-letsencrypt | 2020/02/07 01:38:30 Running '/app/signal_le_service'
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/07 01:38:30 Error: could not get a nginx-proxy container ID.

Duplicate issue #623: Error: could not get a nginx-proxy container ID
Created: 2020-02-21T12:41:29Z
Constantly getting this at one of my customer's servers resulting in an exired certificate.
Restarting companion will bring everything to a working state again and renewing the cert.
What is wrong with my configuration?
nginx-proxy-letsencrypt | 2020/02/21 05:51:01 Generated '/app/letsencrypt_service_data' from 5 containers
nginx-proxy-letsencrypt | 2020/02/21 05:51:01 Running '/app/signal_le_service'
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 05:51:01 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 06:51:01 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 07:51:01 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 08:51:01 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 09:51:02 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 10:51:02 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s
nginx-proxy-letsencrypt | 2020/02/21 11:38:35 Received event start for container 5763b410174d
nginx-proxy-letsencrypt | 2020/02/21 11:38:42 Received event die for container f1d0ddb40917
nginx-proxy-letsencrypt | 2020/02/21 11:38:44 Received event stop for container f1d0ddb40917
nginx-proxy-letsencrypt | 2020/02/21 11:38:48 Received event start for container 455b1b67a1ea
nginx-proxy-letsencrypt | 2020/02/21 11:39:03 Debounce minTimer fired
nginx-proxy-letsencrypt | 2020/02/21 11:39:03 Generated '/app/letsencrypt_service_data' from 6 containers
nginx-proxy-letsencrypt | 2020/02/21 11:39:03 Running '/app/signal_le_service'
nginx-proxy-letsencrypt | jq: error (at <stdin>:1): Cannot iterate over null (null)
nginx-proxy-letsencrypt | 2020/02/21 11:39:03 Error: could not get a nginx-proxy container ID.
nginx-proxy-letsencrypt | Sleep for 3600s

version: "2"

services:
  nginx-proxy: 
    image: nginx
    container_name: nginx-proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./nginx/htpasswd:/etc/nginx/htpasswd
      - ./nginx/conf.d:/etc/nginx/conf.d
      - ./nginx/vhost.d:/etc/nginx/vhost.d
      - ./nginx/html:/usr/share/nginx/html
      - ./nginx/certs:/etc/nginx/certs:ro
    networks:
      - proxy-tier
    restart: always

  nginx-gen:
    image: jwilder/docker-gen
    container_name: nginx-proxy-gen
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./nginx/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
    volumes_from:
      - nginx-proxy
    command: -notify-sighup nginx-proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen"
    restart: always

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: nginx-proxy-letsencrypt
    volumes_from:
      - nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./nginx/certs:/etc/nginx/certs:rw
    restart: always

networks:
  proxy-tier:
    external:
      name: nginx-proxy

Closing comment (2021-06-23T16:12:34Z): maybe related to #616