Connection refused when uploading file

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 26.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.2 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 8.2.5

The issue you are facing:
I can login and browse and download files. But when I try upload a file, I am facing a HTTP 500 with connection refused. I can change files without issues, like modifying .md files as long as I do it in the interface. I suspects this is caused by apache config somewhere.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Try upload a file - any file - at any destination folder.

The output of your Nextcloud log in Admin > Logging:

Nothing from the last 7 months.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

[Fri Apr 14 12:39:12.635116 2023] [core:notice] [pid 59548:tid 139978980183168] AH00094: Command line: '/usr/sbin/apache2'
[Fri Apr 14 18:06:11.076087 2023] [access_compat:error] [pid 59550:tid 139978673690176] [client 192.168.1.3:34558] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri Apr 14 18:06:46.579385 2023] [access_compat:error] [pid 59549:tid 139978740831808] [client 192.168.1.3:50696] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri Apr 14 18:09:55.153266 2023] [access_compat:error] [pid 59549:tid 139978640119360] [client 192.168.1.3:53874] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Nothing of interest.

Correction: Also issues when trying to download a file.

I have Require all granted in my apache config for NC as well.

Turns out it was Redis failing. Only visible in the php-fpm service journalctl. Silly me to NOT check Redis and quickly assume it is Apache denying access.

ok but what did you do then? I have the same error as you, and have just added memcache.locking to redis, as was suggested since upgrading to 27.0.

I setup APCu, then re-did my Redis.