On Android, I get a 404 and fail2ban blocks my ip

Hi,

When I use the Nextcloud Android application, I get such a line in my /var/log/httpd/access_log file :
<My IP Address> - xuo [30/Jul/2025:14:15:29 +0200] “GET /index.php/core/preview?fileId=161183&x=512&y=512&a=1&mode=cover&forceIcon=0 HTTP/1.1” 404 2 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.31.1”

When fail2ban reads this file, it blocks my current ip address.
If I disable fail2ban, then everything works well. To me, it means that I don’t have any NC configuration issue.

My question : why does this 404 error occurs (as it does not seem to prevent me to use (in a normal way) my nextcloud app) ?

Note :
NC is self-hosted
The 2FA is enabled.
My issue is similar to this one : Client connection return 404

Regards.

Xuo.

Please check nextcloud.log, whether there is a detailed entry with the same timestamp as in Apache log.

For me it seems, that a file mentioned in the Nextcloud database does not exist in the user folder. - Can be corrected with occ files:scan

Hi,

In the file nextcloud.log, I have these 2 lines (with the same day, not the same time) :

{“reqId”:“aIpAVnp0R2bXzkzU_RpAJQAAAAA”,“level”:2,“time”:“2025-07-30T15:55:02+00:00”,“remoteAddr”:“192.168.0.254”,“user”:“–”,“app”:“PHP”,“method”:“POST”,“url”:“/index.php/apps/documentserver_community/converter?shardKey=check_719683483”,“message”:“array_flip(): Can only flip string and integer values, entry skipped at /usr/share/nextcloud-31.0.6/apps/documentserver_community/lib/JSONResponse.php#49”,“userAgent”:“Nextcloud Server Crawler”,“version”:“31.0.6.2”,“data”:{“app”:“PHP”}}
{“reqId”:“aIpAV0gqbulIwa8eIKIwtgAAAAc”,“level”:2,“time”:“2025-07-30T15:55:03+00:00”,“remoteAddr”:“192.168.0.254”,“user”:“–”,“app”:“PHP”,“method”:“POST”,“url”:“/index.php/apps/documentserver_community/converter?shardKey=check_627451062”,“message”:“array_flip(): Can only flip string and integer values, entry skipped at /usr/share/nextcloud-31.0.6/apps/documentserver_community/lib/JSONResponse.php#49”,“userAgent”:“Nextcloud Server Crawler”,“version”:“31.0.6.2”,“data”:{“app”:“PHP”}}

The output of occ files:scan

# php occ files:scan --all
Starting scan for user 1 out of 6 (user1)
Path not found: /user1
Starting scan for user 2 out of 6 (xuo)
Path not found: /xuo
Starting scan for user 3 out of 6 (user2)
Path not found: /user2
Starting scan for user 4 out of 6 (user3)
Path not found: /user3
Starting scan for user 5 out of 6 (user4)
Path not found: /user4
Starting scan for user 6 out of 6 (user5)
Path not found: /user5
±--------±------±----±--------±--------±-------±-------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
±--------±------±----±--------±--------±-------±-------------+
| 1473 | 3232 | 0 | 269 | 2 | 6 | 00:00:25 |
±--------±------±----±--------±--------±-------±-------------+

The “Path not found” errors are weird as all users are able to work properly. I didn’t find how to remove these errors.

Note :
In the file config.php :
‘datadirectory’ => ‘/export2/nextcloudData’,

# ls -als data
0 lrwxrwxrwx 1 root root 22 juil. 31 15:18 data → /export2/nextcloudData

Regards.

Xuo.

This topic was automatically closed after 90 days. New replies are no longer allowed.