I’m struggeling with this issue for a long time now without any solution.
My nextcloud server is running as docker container, with nginx-proxy and proxy-companion for letsencrypt certificates.
Unfortunately the server keeps logging out all users regularly unconditionally.
Looking to the server logs, the only thing I find is that everything’s working find but suddenly it starts logging this error:
"Exception": "Sabre\\DAV\\Exception\\NotAuthenticated",
"Message": "No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured"
This happens on all clients, no matter if it’s the windows client, Android or iOS client. So I am sure it’s no client issue.
I recorded a session on my laptop with fiddler. This shows to me that from the one second to the other 401 errors are returned - I cannot determine why.
As you can see in the screenshot, there are many PROPFINDs answered with 207 and suddenly it turns to 401:
Looking to the request headers it’s visible that absolutely nothing regarding authorization etc. changed from the last working request to the denied request. There is a Basic auth header present which doesn’t change from the last working to the denied request.
This is the respective log entry of the given first 401 report:
{
"reqId": "lMsaIitk0Qcqp1C475xt",
"level": 0,
"time": "2021-01-25T19:31:33+00:00",
"remoteAddr": "91.42.20.11",
"user": "--",
"app": "webdav",
"method": "PROPFIND",
"url": "/remote.php/dav/files/peez/",
"message": {
"Exception": "Sabre\\DAV\\Exception\\NotAuthenticated",
"Message": "No public access to this resource., Username or password was incorrect, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, Username or password was incorrect",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "beforeMethod",
"class": "Sabre\\DAV\\Auth\\Plugin",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 458,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"beforeMethod:PROPFIND",
[
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 251,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 319,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 332,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 167,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php",
"Line": 161,
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Windows) mirall/3.1.1stable-Win64 (build 20201222) (Nextcloud)",
"version": "20.0.4.0"
}
After a re-login, it’s working for some time but then - after a unpredictable time - the users are thrown out again.
Do you have any idea what could be happening here?