Random very frequent "server is offline"

What is the problem?

I'm getting very frequent "Server is offline" really annoying modals, or the tabs change back to "Temperature", all this very frequently (usually after a few minutes).

What did you already try to solve it?

Updating octoprint/plugins (apt update/upgrade too) and it didn't help.

Complete Logs

Browser console says:

Firefox can’t establish a connection to the server at wss://octoprint.xxx/sockjs/523/msv14e1l/websocket. packed_libs.js:1206:23008
GETwss://octoprint.xxx/sockjs/229/4i5f0n5n/websocket
[HTTP/1.1 403 Forbidden 85711ms]

Firefox can’t establish a connection to the server at wss://octoprint.xxx/sockjs/229/4i5f0n5n/websocket. packed_libs.js:1206:23008
The connection to https://octoprint.xxx/sockjs/051/umsoeqwh/eventsource was interrupted while the page was loading. packed_libs.js:1206:29834
The connection to https://octoprint.xxx/sockjs/051/f1ml2idk/eventsource was interrupted while the page was loading. eventsource.js:18
The connection to https://octoprint.xxx/sockjs/523/af1rlo0n/eventsource was interrupted while the page was loading. packed_libs.js:1206:29834
Connected to the server packed_core.js:702:350
Triggering reconnect on all view models packed_core.js:707:67
Server (re)connect processed

All I have in .octoprint/logs/octoprint.log is lines like that:

2020-08-17 11:14:14,665 - tornado.access - WARNING - 403 GET /sockjs/008/g0isk1vx/websocket (192.168.10.1) 4.28ms

Additional information about your setup

Octoprint: 1.4.2
Octopi: 0.15.0, running on Raspberry Pi 3 Model B Plus Rev 1.3
Plugins (according to about/plugins licenses)
    Bed Visualizer
    Cost Estimation
    Filament Manager
    Firmware Updater
    Fullscreen Plugin
    OctoFlat Theme
    Octolapse
    Print History Plugin
    Printer Stats
    PrintTimeGenius Plugin
    Pushover
    TouchUI
    Webcam Tab

Nginx vhost acting as proxy:

upstream "octoprint" {
	server 192.168.10.182;
}

server {
	listen 443;
	listen [::]:443;

	access_log /var/log/nginx/octoprint.access.log;
	error_log /var/log/nginx/octoprint.error.log error;

	ssl on;
	ssl_certificate /srv/letsencrypt/certs/lan.xxx/fullchain.pem;
	ssl_certificate_key /srv/letsencrypt/certs/lan.xxx/privkey.pem;

	root /usr/var/www/html;

	index index.php index.html index.htm index.nginx-debian.html;

	server_name octoprint.xxx;

        location / {
	    proxy_http_version 1.1;
            client_max_body_size 50M;
            proxy_pass http://octoprint/;
	    proxy_set_header X-Real-IP $remote_addr;
	    proxy_set_header X-Forwarded-Proto $scheme;
	    proxy_set_header Host $http_host;
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        location /sockjs {
            proxy_pass http://octoprint;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
	    proxy_set_header X-Real-IP $remote_addr;
	    proxy_set_header X-Forwarded-Proto $scheme;
	    proxy_set_header Host $http_host;
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

}

Any ideas on what could causes that or to fix it ?

Hello @dashie!

Could you pleas share the complete octoprint.log?
Also I would recommend to setup a new SD card with OctoPi 0.17.0

Hello @Ewald_Ikemann, I will be able to setup a new SD card tomorrow, I don't have a spare one.

For the octoprint.log here is the full file:
octoprint.log (652.5 KB)

Thank you.

As for Firefox, you may disable the FF safety features for OctoPrint:
Click on the shield on the very left of the address bar.
grafik
Disable the safety features and you get this:
grafik

This may work

Unfortunately still having the modal/offline issue after deactivating the tracking protection thing.

Have you already tried safe mode?

The server heartbeat message appears frequently:

2020-08-17 11:37:35,688 - octoprint.server.heartbeat - INFO - Server heartbeat <3

You also may try another browser.

I haven't tried safe mode yet, I will when my print is done.

Tried with safari and got the "offline" modal less than two minutes after login, so not related to firefox.

ok in safe mode no issue, without the stats and history plugin I got only very few offline modals.

I'm setting up a 0.17.0 octopi right now and I will see.

1 Like

Ok so I have reinstalled with the newer 0.17.0 octopi.
Still without stats / history plugin.
Through my nginx reverse proxy I get issues with the websocket, which I don't get if I access from octopi.local directly.

Did you ever figure out a solution?