Proxy container restart issues

Hello.

Always, the second time I try “docker-compose -p openremote up” I got the next error from proxy.

openremote-manager-1     | 2023-04-19 05:35:46.571  INFO    [main                          ] org.openremote.container.Container       : Starting service: org.openremote.manager.rules.geofence.ORConsoleGeofenceAssetAdapter
openremote-manager-1     | 2023-04-19 05:35:46.580  INFO    [main                          ] org.openremote.container.Container       : >>> Runtime container startup complete
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] DOMAINNAMES: 157.230.184.56
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] HAPROXY_CONFIG: /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] HAPROXY_CMD: haproxy -W -db -f /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] HAPROXY_USER_PARAMS:
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] PROXY_LOGLEVEL: info
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] LUA_PATH:
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] CERT_DIR: /deployment/certs
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] LE_DIR: /deployment/letsencrypt
openremote-proxy-1       | [INFO][2023-04-19 03:35:47] Checking HAProxy configuration: /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [NOTICE]   (17) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (17) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (17) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (17) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (17) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:35:47] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [NOTICE]   (20) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (20) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (20) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (20) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (20) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:35:49] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [NOTICE]   (23) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (23) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (23) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (23) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (23) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:35:51] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [INFO][2023-04-19 03:35:52] PROXY_LOGLEVEL: info
openremote-proxy-1       | [INFO][2023-04-19 03:35:52] LUA_PATH:
openremote-proxy-1       | [INFO][2023-04-19 03:35:52] CERT_DIR: /deployment/certs
openremote-proxy-1       | [INFO][2023-04-19 03:35:52] LE_DIR: /deployment/letsencrypt
openremote-proxy-1       | [INFO][2023-04-19 03:35:52] Checking HAProxy configuration: /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [NOTICE]   (20) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (20) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (20) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (20) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (20) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:35:53] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [NOTICE]   (18) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (18) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (18) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (18) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (18) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:35:55] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [NOTICE]   (18) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (18) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (18) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (18) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (18) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:35:57] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [NOTICE]   (20) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (20) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (20) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (20) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (20) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:36:02] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
openremote-proxy-1 exited with code 1
openremote-proxy-1       | [NOTICE]   (19) : haproxy version is 2.7.0-437fd28
openremote-proxy-1       | [ALERT]    (19) : config : parsing [/etc/haproxy/haproxy.cfg:67] : 'bind *:443' in section 'frontend' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (19) : config : parsing [/etc/haproxy/haproxy.cfg:81] : 'bind *:8883' in section 'listen' : unable to stat SSL certificate from file '/etc/haproxy/certs/00-cert' : No such file or directory.
openremote-proxy-1       | [ALERT]    (19) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
openremote-proxy-1       | [ALERT]    (19) : config : Fatal errors found in configuration.
openremote-proxy-1       | [ERROR][2023-04-19 03:36:09] Cannot start proxy until config file errors are resolved in '/etc/haproxy/haproxy.cfg'
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 4/4
 ⠿ Container openremote-proxy-1       Stopped                                                                                                                                                                                        0.1s
 ⠿ Container openremote-manager-1     Stopped                                                                                                                                                                                        2.2s
 ⠿ Container openremote-keycloak-1    Stopped                                                                                                                                                                                        0.8s
 ⠿ Container openremote-postgresql-1  Stopped                                                                                                                                                                                        0.6s
canceled
or@debian-s-2vcpu-4gb-amd-nyc1-01-or-V6:~/openremote$

My docker-compose.yml is

# OpenRemote v3
#
# Profile that runs the stack by default on https://localhost using a self-signed SSL certificate,
# but optionally on https://$OR_HOSTNAME with an auto generated SSL certificate from Letsencrypt.
#
# It is configured to use the AWS logging driver.
#
version: '2.4'

volumes:
  proxy-data:
  manager-data:
  postgresql-data:

services:

  proxy:
    image: openremote/proxy:${PROXY_VERSION:-latest}
    restart: always
    depends_on:
      manager:
        condition: service_healthy
    ports:
      - "80:80"
      - "${OR_SSL_PORT:-443}:443"
      - "8883:8883"
    volumes:
      - proxy-data:/deployment
    environment:
      LE_EMAIL: ${OR_EMAIL_ADMIN:-}
      DOMAINNAME: ${OR_HOSTNAME:-localhost}
      DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      # USE A CUSTOM PROXY CONFIG - COPY FROM https://raw.githubusercontent.com/openremote/proxy/main/haproxy.cfg
      #HAPROXY_CONFIG: '/data/proxy/haproxy.cfg'

  postgresql:
    restart: always
    image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
    volumes:
      - postgresql-data:/var/lib/postgresql/data
      - manager-data:/storage

  keycloak:
    restart: always
    image: openremote/keycloak:${KEYCLOAK_VERSION:-latest}
    depends_on:
      postgresql:
        condition: service_healthy
    volumes:
      - ./deployment:/deployment
    environment:
      KEYCLOAK_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
      KC_HOSTNAME: ${OR_HOSTNAME:-localhost}
      KC_HOSTNAME_PORT: ${OR_SSL_PORT:--1}


  manager:
#    privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST:
      OR_EMAIL_USER:
      OR_EMAIL_PASSWORD:
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM:
      OR_EMAIL_ADMIN:
      OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      OR_SSL_PORT: ${OR_SSL_PORT:--1}
      OR_DEV_MODE: ${OR_DEV_MODE:-false}

      # The following variables will configure the demo
      OR_FORECAST_SOLAR_API_KEY:
      OR_OPEN_WEATHER_API_APP_ID:
      OR_SETUP_IMPORT_DEMO_AGENT_KNX:
      OR_SETUP_IMPORT_DEMO_AGENT_VELBUS:
    volumes:
      - manager-data:/storage
      - ./deployment:/deployment

Hi,
what is inside the folder of deployment?

and run the below command and post here

docker-compose down
docker-compose pull
docker ps
docker-compose -p openremote up

Hello apurba.

Thanks for your help.

This is the deployment folder content

or@debian-s-2vcpu-4gb-V5:~/openremote/deployment$ l
total 47984
drwxr-xr-x 6 or or 4096 Apr 16 17:41 .
drwxr-xr-x 3 or or 4096 Apr 18 18:56 …
drwxr-xr-x 4 or or 4096 Mar 24 10:18 console
drwxr-xr-x 3 or or 4096 Mar 24 10:18 keycloak
drwxr-xr-x 4 or or 4096 Mar 24 10:18 manager
drwxr-xr-x 2 or or 4096 Mar 24 10:18 map
-rw-r–r-- 1 root root 9077501 Apr 18 20:59 openremote.log.0
-rw-r–r-- 1 root root 0 Apr 9 13:44 openremote.log.0.lck
-rw-r–r-- 1 root root 10000126 Apr 15 08:23 openremote.log.1
-rw-r–r-- 1 root root 10000152 Apr 14 23:27 openremote.log.2
-rw-r–r-- 1 root root 10000050 Apr 14 13:45 openremote.log.3
-rw-r–r-- 1 root root 10001632 Mar 24 14:04 openremote.log.4
or@debian-s-2vcpu-4gb-V5:~/openremote/deployment$

However, I think is better to follow the case Can't stop and start openremote succelfully - #2 by apurba

Best regards.

Hi,

Where does this /etc/haproxy/certs/00-cert come from? I guess this is your own selfsigned certificate but I don’t see it volume mapped into the proxy container in what you posted.