YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
149 stars 64 forks source link

Error in log: Please check jail has possibly a timezone issue #640

Open MCMic opened 11 months ago

MCMic commented 11 months ago

Describe the bug

I always get this kind of log lines from fail2ban:

    [nextcloud] Please check jail has possibly a timezone issue. Line with odd timestamp: {"reqId":"PEVID4Xyl8Lz9eormxrU","level":1,"time":"2023-12-06T16:45:02+00:00","remoteAddr":"","user":"--","app":"calendar","method":"","url":"--","message":"Found and deleted 0 outdated booking confirmations.","userAgent":"--","version":"27.1.2.1","data":{"app":"calendar"}}: 1 Time(s)
    [nextcloud] Simulate NOW in operation since found time has too large deviation None ~ 1701881102.55879 +/- 60: 1 Time(s)
*A clear and concise description of what the bug is.*

Context

Steps to reproduce

It happens in each log report I get by email.

Expected behavior

No timezone error in fail2ban logs

ximikos commented 11 months ago

I am using more Nextcloud clients, message appear only with iOS client:

2023-12-15 10:31:27,298 fail2ban.filter         [1893787]: WARNING [nextcloud] Simulate NOW in operation since found time has too large deviation None ~ 1702632687.2988358 +/- 60
2023-12-15 10:31:27,298 fail2ban.filter         [1893787]: WARNING [nextcloud] Please check jail has possibly a timezone issue. Line with odd timestamp: {"reqId":"Wqa1IxsgygkYuwSRRfj7","level":3,"time":"2023-12-15T09:31:27+00:00","remoteAddr":"2001:af0:8000:2f02:d860:db06:27a9:95b","user":"userABC","app":"no app in context","method":"PUT","url":"/nextcloud/remote.php/dav/uploads/userABC/D5212569-CE70-404E-919E-A07715ABA756/10","message":"Expected filesize of 100000000 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 63119360 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.3","version":"27.1.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 100000000 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 63119360 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":50,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":365,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 100000000 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 63119360 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":{},"CustomMessage":"Expected filesize of 100000000 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 63119360 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}
melroy89 commented 8 months ago

No, it also appears in Linux desktop clients:

2024-03-12 00:46:41,086 fail2ban.filter         [1333]: WARNING [nextcloud] Simulate NOW in operation since found time has too large deviation None ~ 1710200801.0867915 +/- 60
2024-03-12 00:46:41,086 fail2ban.filter         [1333]: WARNING [nextcloud] Please check jail has possibly a timezone issue. Line with odd timestamp: 192.168.1.1 - melroy [12/Mar/2024:00:46:41 +0100]  "PROPFIND /remote.php/dav/files/username/ HTTP/1.1" 207 263 "-" "Mozilla/5.0 (Linux) mirall/3.12.0 (build 20570) (Nextcloud, linuxmint-6.5.0-25-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)" "[my-domain](http://my-domain/)" 0.048
melroy89 commented 8 months ago

Anyhow, maybe we should report this to Nextcloud itself as well?