Can't stop and start openremote successfully

As the attached image show, I can’t stop and start openremote succesfully. It is necessary to use “docker-compose down” before start OR. The second “docker ps” shows than “proxy” container do not start. The same occurs if I restart the VPS o user the “restart” docker-compose parameter. The only way I can stop and start OR is using “docker-compose down” as a stop.

I attached the .yml I am using.

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

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

try it and let me know and run
docker-compose -p openremote up

Hello apurba, Thanks for your answer.

On the proxy section all the environment are now as remarks

#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’

Now I can execute docker-compose restart and reboot the VPS without errors. Now the problem is a blank screen when I try to browse my OR ip 157.230.184.56. And in the docker proxy logs appears this the next text every time I try to refresh the page

19/Apr/2023:04:38:03 +0000 http 127.0.0.1:57622 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:38:06 +0000 http 127.0.0.1:57624 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:38:10 +0000 http 127.0.0.1:57632 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:37:41 +0000 https~ 177.93.3.221:11279 manager 0/0/0/2/2 “GET /manager/ HTTP/1.1” 200 2/2/0/0/0 0/0
19/Apr/2023:04:38:13 +0000 http 127.0.0.1:58390 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:38:10 +0000 https~ 177.93.3.221:11279 manager 0/0/0/12/3634 “GET /manager/bundle.2c3bc39b50a8ded51b16.js HTTP/1.1” 200 2/2/0/0/0 0/0
19/Apr/2023:04:38:14 +0000 https~ 177.93.3.221:11279 manager 0/0/0/2/2 “GET /manager_config.json HTTP/1.1” 200 2/2/1/1/0 0/0
19/Apr/2023:04:37:40 +0000 https~ 177.93.3.221:58788 manager 0/0/0/3/3 “GET /manager/images/favicon.ico HTTP/1.1” 200 2/2/0/0/0 0/0
19/Apr/2023:04:38:14 +0000 https~ 177.93.3.221:11279 manager 0/0/0/3/3 “GET /api/master/info HTTP/1.1” 200 2/2/0/0/0 0/0
177.93.3.221:58806 [19/Apr/2023:04:38:15.120] https/1: SSL handshake failure
19/Apr/2023:04:38:14 +0000 https~ 177.93.3.221:11279 manager 0/0/0/5/5 “GET /shared/locales/en/or.json HTTP/1.1” 200 2/2/0/0/0 0/0
19/Apr/2023:04:38:15 +0000 https~ 177.93.3.221:11279 manager 0/0/0/5/5 “GET /api/master/info HTTP/1.1” 200 2/2/0/0/0 0/0
19/Apr/2023:04:38:15 +0000 https~ 177.93.3.221:11279 manager 0/0/0/2/2 “POST /api/master/console/register HTTP/1.1” 403 2/2/0/0/0 0/0
19/Apr/2023:04:38:16 +0000 http 127.0.0.1:58398 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:38:19 +0000 http 127.0.0.1:58406 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:38:22 +0000 http 127.0.0.1:58420 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0
19/Apr/2023:04:38:25 +0000 http 127.0.0.1:50782 0/-1/-1/-1/0 “GET / HTTP/1.1” 302 3/1/0/0/0 0/0

Now my docker-compose 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

${OR_HOSTNAME:-localhost} replace with your ip in below section

manager
keycloal
proxy

as KC_HOSTNAME: **.dgtwin.in
DOMAINNAME: **.dgtwin.in
OR_HOSTNAME: **.dgtwin.in

And let me know

Hello apurba.

According your answer, I add the next to my .yml file.

proxy, environment section :
DOMAINNAME: 157.230.184.56

keycloak, environment section :
KC_HOSTNAME: 157.230.184.56

manager, environment setion :
OR_HOSTNAME: 157.230.184.56

After “docker-compose -p openremote up -d” I received the following error.

[ERROR][2023-04-19 20:09:20] Cannot start proxy until config file errors are resolved in ‘/etc/haproxy/haproxy.cfg’
[INFO][2023-04-19 20:09:34] DOMAINNAMES: 157.230.184.56
[INFO][2023-04-19 20:09:34] HAPROXY_CONFIG: /etc/haproxy/haproxy.cfg
[INFO][2023-04-19 20:09:34] HAPROXY_CMD: haproxy -W -db -f /etc/haproxy/haproxy.cfg
[INFO][2023-04-19 20:09:34] HAPROXY_USER_PARAMS:
[INFO][2023-04-19 20:09:34] PROXY_LOGLEVEL: info
[INFO][2023-04-19 20:09:34] LUA_PATH:
[INFO][2023-04-19 20:09:34] CERT_DIR: /deployment/certs
[INFO][2023-04-19 20:09:34] LE_DIR: /deployment/letsencrypt
[INFO][2023-04-19 20:09:34] Checking HAProxy configuration: /etc/haproxy/haproxy.cfg
[NOTICE] (18) : haproxy version is 2.7.0-437fd28
[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.
[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.
[ALERT] (18) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] (18) : config : Fatal errors found in configuration.
[ERROR][2023-04-19 20:09:34] Cannot start proxy until config file errors are resolved in ‘/etc/haproxy/haproxy.cfg’

So, I decided to try removing “DOMAINNAME: 157.230.184.56” from environment section. And after “docker-compose stop” and “docker-compose -p openremote up -d” OR begun to work. However, if the VPS is rebooted OR do not start correctly, It is necessary to use ‘docker-compose stop’ and ‘docker-compose -p openremote up -d’ again. Nevertheless, I resolved the reboot problem running a service at VPS startup.

My next step is to try running OR using a domain name instead of an IP address. And after that add letsencrypt certificate.

Best regards.

proxy environment:
LE_EMAIL: ${OR_EMAIL_ADMIN:-}
DOMAINNAME: ip/domain(it should be comment-out)
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}

manager volumes:

  • manager-data:/storage

changes 2 things afterthat let me know with log details

Hello Apurba

I truly appreciate your support.

Actually, the behavior is this: After a reboot, the website test.smartthings.site does not respond in any browser (I have tested more than one browser).

However, after running “docker-compose stop” followed by “docker-compose start”, test.smartthings.site works correctly.

In addition to the .yml file, I will attach the four Docker logs that were generated after the reboot and the four Docker logs that were generated after running “docker-compose start”. Additionally, I will include the Openremote log for each case.

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:
TZ: America/Costa_Rica
# DOMAINNAME: ${OR_HOSTNAME:-localhost}
# DOMAINNAME: 157.230.184.56 # nuevo
# DOMAINNAME: test.smartthings.site # nuevo
LE_EMAIL: ${OR_EMAIL_ADMIN:-}
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
environment:
TZ: America/Costa_Rica

keycloak:
restart: always
image: openremote/keycloak:${KEYCLOAK_VERSION:-latest}
depends_on:
postgresql:
condition: service_healthy
volumes:
- ./deployment:/deployment
environment:
TZ: America/Costa_Rica
KEYCLOAK_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
#KC_HOSTNAME: ${OR_HOSTNAME:-localhost} comentado por sugerencia de apurba 19/04/2023
KC_HOSTNAME: test.smartthings.site
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:
  TZ: America/Costa_Rica
  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}   comentado por sugerencia de apurba 19/04/2023
  OR_HOSTNAME: test.smartthings.site

  OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
  OR_SSL_PORT: ${OR_SSL_PORT:--1}
  OR_DEV_MODE: ${OR_DEV_MODE:-false}
  DOMAINNAME: test.smartthings.site

  # 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

docker_logs_after_docker-compose_start.log (41.7 KB)
docker_logs_after_reboot.log (44.3 KB)
openremote_log_after_docker-compose_start.log (31.0 KB)
openremote_log_after_reboot.log (11.5 KB)

Kind regards.

Hi,
test.smartthings.site – this is your domain
157.230.184.56 ------ static ip

You have to add A record means add your statc ip with your domain , pls refer screenshot below

so that it will be redirected to your domain .

Below part need to change in your yml file ( proxy)
proxy environment:
LE_EMAIL: ${OR_EMAIL_ADMIN:-}
DOMAINNAME: ip/domain(it should be comment-out)
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}

Use one thing either ip or Domain , dont mix them

You can connect me direct through koleyapurba007@gmail.com

Thanks