Not connected to server... Try refreshing the page. This will disappear once the connection is re-established
psmith3 opened this issue · 6 comments
I am pulling my hair out trying to figure out what is going on with this issue that started I believe right after I tried to install the latest Tesla node server. I removed that node server, after seeing it flood my Polyglot logs with MQTT error messages. I am now seeing the message in my browser that it is not connected to server. I am running Polyglot and Mongo in Docker on a Synology NAS. My Polyglot server has been working for weeks now successfully until yesterday when I was tinkering. In desperation, I have completely rebuilt the setup twice and deleted the install directory when I did. It still appears in the GUI that it is not connected to the ISY, but when I look in the log, Polyglot is talking to my ISY. I am setting override parameters in the .env file below to provide the login info for my ISY. Seems other people are seeing this issue from time to time, but I don't see a common denominator. I have tried with and without SSL and previously had it all working with https off. I did also have to uncheck the use SSL in each configuration in the node servers on the ISY. At the moment, I have no node servers installed and none left over in the ISY.
Since I am using Docker, are there any files that gat cached on the host machine that I need to delete? I think the answer is no.
Anyone have any idea what is going on here? Attached is my log from Polyglot.
12/9/2019, 2:38:35 PM - debug: Created PID file: /root/.polyglot/polyglot.pid
12/9/2019, 2:38:45 PM - info: Starting Polyglot....
12/9/2019, 2:38:45 PM - info: Settings: Polyglot Version 2.2.3
12/9/2019, 2:38:45 PM - info: Settings: Retrieved config from database
12/9/2019, 2:38:45 PM - info: Settings: Retrieved config overrides from .env and updated database
12/9/2019, 2:38:45 PM - debug: TLS: Found Keys and Certificate data in database. Exporting to /root/.polyglot/ssl/
12/9/2019, 2:38:45 PM - debug: Checking for DB Maintenence needs...
12/9/2019, 2:38:45 PM - debug: DB Version Found: 2 no maintenence necessary.
12/9/2019, 2:38:45 PM - info: Aedes MQTT Broker Service: Started on port 1883
12/9/2019, 2:38:48 PM - info: MQTT Client Service: Started
12/9/2019, 2:38:48 PM - info: HTTPS Interface Service: Started - Address: 172.30.17.172 Port: 3000
12/9/2019, 2:38:48 PM - info: MQTTS: polyglot authenticated successfully.
12/9/2019, 2:38:48 PM - info: MQTTS: Client Connected: polyglot
12/9/2019, 2:38:48 PM - debug: MongoDB: 0 NodeServer(s) retrieved from database
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/connections/# QoS 0
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/# QoS 0
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/settings QoS 0
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/nodeservers QoS 0
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/log QoS 0
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/ns/# QoS 0
12/9/2019, 2:38:48 PM - debug: MQTTC: Subscribed to udi/polyglot/profile/# QoS 0
12/9/2019, 2:38:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/config/
12/9/2019, 2:38:48 PM - info: ISY: Got Version 5.0.16A
12/9/2019, 2:38:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
12/9/2019, 2:43:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
12/9/2019, 2:48:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
12/9/2019, 2:53:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
12/9/2019, 2:58:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
12/9/2019, 3:03:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
12/9/2019, 3:08:48 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
Also attached is my .env file contents.
BIND_IP='172.30.17.172'
HOST_IP='172.30.17.172'
HOST_PORT='3000'
ISY_USERNAME='user'
ISY_PASSWORD='pass'
ISY_HOST='172.30.17.247'
ISY_PORT='80'
ISY_HTTPS=false
MQTT_HOST='127.0.0.1'
MQTT_PORT='1883'
MONGO_URI='mongodb://localhost:27017/'
NODE_ENV='development'
USE_BETA=true
When I've had this problem, I have to force reload the page in the browser (typically shift-reload). Just trying to reload the page doesn't work as the browser has most of the content cached.
So a different issue than what I've seen. It sounds like a firewall issue, but that doesn't make sense as you had it working before.
@jimboca , I know you had helped a few folks through this before. I just completely deleted my docker containers and started from scratch and still get the same issue. Could it be a permissions issue or something with Phython3? Below is my latest log and I see the server talking to my ISY, but still get the message saying not connected to server. When it says "server", is it referring to the ISY or the Polyglot server? I think Polyglot...
12/10/2019, 5:37:35 PM - debug: Created PID file: /root/.polyglot/polyglot.pid
12/10/2019, 5:37:37 PM - info: Starting Polyglot....
12/10/2019, 5:37:37 PM - info: Settings: Polyglot Version 2.2.3
12/10/2019, 5:37:37 PM - info: Settings: Retrieved config from database
12/10/2019, 5:37:37 PM - info: Settings: Retrieved config overrides from .env and updated database
12/10/2019, 5:37:37 PM - debug: TLS: Found Keys and Certificate data in database. Exporting to /root/.polyglot/ssl/
12/10/2019, 5:37:37 PM - error: Custom SSL Key file could not be read and doesn't exist in the database. Falling back to self-signed.
12/10/2019, 5:37:38 PM - debug: Checking for DB Maintenence needs...
12/10/2019, 5:37:38 PM - debug: DB Version Found: 2 no maintenence necessary.
12/10/2019, 5:37:38 PM - info: Aedes MQTT Broker Service: Started on port 1883
12/10/2019, 5:37:38 PM - info: MQTT Client Service: Started
12/10/2019, 5:37:38 PM - info: HTTPS Interface Service: Started - Address: :: Port: 3000
12/10/2019, 5:37:38 PM - debug: MongoDB: 0 NodeServer(s) retrieved from database
12/10/2019, 5:37:38 PM - info: MQTTS: polyglot authenticated successfully.
12/10/2019, 5:37:38 PM - info: MQTTS: Client Connected: polyglot
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/connections/# QoS 0
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/# QoS 0
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/settings QoS 0
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/nodeservers QoS 0
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/frontend/log QoS 0
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/ns/# QoS 0
12/10/2019, 5:37:38 PM - debug: MQTTC: Subscribed to udi/polyglot/profile/# QoS 0
12/10/2019, 5:37:38 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/config/
12/10/2019, 5:37:38 PM - info: ISY: Got Version 5.0.16A
12/10/2019, 5:37:38 PM - debug: ISY: 200 - http://172.30.17.247:80/rest/profiles/ns/0/connection/
I solved my issues and built a specific repository to run Polyglot-v2 in Docker on a Synology NAS. https://github.com/psmith3/polyglot-v2