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.
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
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.
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.
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:-}