-
Hello, A https connection through port 443 to a Nextcloud incidence on a Turnkey linux server (based on Debian Buster) is not recognised as an active connection. It works well with ssh. A https connectiont port 12321 is recognised spontaniously as I see from thhe output of "autosuspend -l". I installed autosuspend throuht the debian repository. I put the following into autosuspend.conf [check.ActiveConnection] The server should go to suspend if there is no client connected to Nextcloud. But apparently autosuspend does not recognise the https connection although the connection is marked as "ESTABLISED" at port 443 with "lsof -i -P -n" (see outpout below). I am not an experienced linux user, more or less an "advanced" newbe. I would really appreciate any help to bring autosuspend running to the suspend the server if there is no client Nextcloud client connected. Thanks
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
autosuspend does periodic checks. HTTP connections, apart from some keep-alive magic or websockets, exist only per request. So if not by coincidence both the autosuspend check and the HTTP request occur at the exact same time, such non-permanent connections will probably not be recognized. The only way this could work is if nextcloud uses web sockets or something else that keeps the connection alive. Is that the case? Is that connection always in this state? If so, to debug this further, some log output from autosuspend while it executes the checks would be helpful here. There's some info on debugging in the documentation. |
Beta Was this translation helpful? Give feedback.
-
It appears to be that timing issue. The https Nextcloud client connection is not visible in the autosuspend -l output. I cannot answer whether Nexcloud uses websockets or something like that. Is there any other way to identify with autosuspend if a connection to a apache2 webserver is active? I have no idea which processes could be involved to test it by the process check of autosuspend. |
Beta Was this translation helpful? Give feedback.
-
With some code snippet frsm the web I created the solution by the bash script below for us as an external command. It works fine now. For a non programmer it has the advantage that I do not need to go into expression creation and testing. This is quite complicated for non programmers and the bash synthax is not really self expantory. I do not now if the command used in the bash scripts are valid for every linux distribution. Least for Debian Buster it works.
|
Beta Was this translation helpful? Give feedback.
With some code snippet frsm the web I created the solution by the bash script below for us as an external command. It works fine now. For a non programmer it has the advantage that I do not need to go into expression creation and testing. This is quite complicated for non programmers and the bash synthax is not really self expantory. I do not now if the command used in the bash scripts are valid for every linux distribution. Least for Debian Buster it works.
I think it is great to put the feature with the expression as a standard for the activity check. This will really increase flexibiltiy of autosespend.