Can't sync with windows client and crazy logs

Hello everybody, i have a small or big problem and hope you can help me. My informations:

Nextcloud version (eg, 10.0.2): 11.0.2 (stable channel)
Operating system and version (eg, Ubuntu 16.04): not sure, it is a webhosting
Apache or nginx version (eg, Apache 2.4.25): not sure, it is a webhosting but it is an apache
PHP version (eg, 5.6): 5.6
Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? (If so, please outline steps):
don’t know how, it appears when i try to sync/login

The issue you are facing:
Hello, I have following problem:
My windows client (v.2.2.4) and android client (v.1.4.1) can’t sync with my nextcloud instance and i get many errors at my logging. The first issue at logging means that my user is using the wrong password. I set the password again to the used password so that it has to be right but at my windows client (version 2.2.4) always comes the error no connection to XXXXX operation canceled… But parallel i see over the webgui that the login was not successful from this client (same ip…)
Also i get other errors at my logs since the last few days.

The output of your Nextcloud log in Admin > Logging:

Warning core Login failed: ‘username’ (Remote IP: ‘X’) 2017-04-09T13:02:16+0200
Error internet_connection_check GuzzleHttp\Exception\RequestException: cURL error 18: transfer closed with 24006 bytes remaining to read 2017-04-09T12:55:51+0200
Error PHP imagecreatefromstring(): Empty string or invalid image at /home/www/nextcloud/cloud/lib/private/legacy/image.php#597 2017-04-09T12:51:44+0200
Error PHP fclose() expects parameter 1 to be resource, boolean given at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#218 2017-04-09T12:51:44+0200
Error PHP fread() expects parameter 1 to be resource, boolean given at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#217 2017-04-09T12:51:44+0200
Error PHP fopen(/home/www//nextcloud/data/username/files/home/www/nextcloud/cloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#216 2017-04-09T12:51:44+0200
Error PHP filesize(): stat failed for /home/www//nextcloud/data/username/files/home/www/nextcloud/cloud/core/img/filetypes/audio.svg at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#211 2017-04-09T12:51:44+0200
Error PHP imagecreatefromstring(): Empty string or invalid image at /home/www/nextcloud/cloud/lib/private/legacy/image.php#597 2017-04-09T12:43:49+0200
Error PHP fclose() expects parameter 1 to be resource, boolean given at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#218 2017-04-09T12:43:49+0200
Error PHP fread() expects parameter 1 to be resource, boolean given at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#217 2017-04-09T12:43:49+0200
Error PHP fopen(/home/www//nextcloud/data/username/files/home/www/nextcloud/cloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#216 2017-04-09T12:43:49+0200
Error PHP filesize(): stat failed for /home/www//nextcloud/data/username/files/home/www/nextcloud/cloud/core/img/filetypes/audio.svg at /home/www/nextcloud/cloud/lib/private/Files/Storage/Local.php#211 2017-04-09T12:43:49+0200
Error index ImagickException: not authorized /tmp/magick-5742Q-CC4Q2hmEEB' @ error/constitute.c/ReadImage/412 2017-04-09T12:41:58+0200 Error index ImagickException: not authorized/tmp/magick-5742hfvp7sXONrUw’ @ error/constitute.c/ReadImage/412 2017-04-09T12:41:57+0200
Error index ImagickException: not authorized /tmp/magick-74933QLG_C5HU3FN' @ error/constitute.c/ReadImage/412 2017-04-09T12:41:53+0200 Error index ImagickException: not authorized/tmp/magick-74933yf8lSjLvIaG’ @ error/constitute.c/ReadImage/412 2017-04-09T12:41:50+0200
Error index ImagickException: not authorized /tmp/magick-74190Zx30KOknnM1' @ error/constitute.c/ReadImage/412 2017-04-09T12:41:46+0200 Error index ImagickException: not authorized/tmp/magick-7389EkUk1Qe38ltJ’ @ error/constitute.c/ReadImage/412 2017-04-09T12:41:08+0200
Error index ImagickException: not authorized `/tmp/magick-7397n_q0AXSasN3k’ @ error/constitute.c/ReadImage/412

The output of your Apache/nginx/system log in /var/log/____:
[Sun Apr 09 05:55:14 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/owncloud
[Sun Apr 09 05:55:14 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/nextcloud
[Sun Apr 09 05:55:14 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/oc
[Sun Apr 09 05:55:14 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/oc-shib
[Sun Apr 09 05:55:17 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/nextcloud
[Sun Apr 09 05:55:17 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/owncloud
[Sun Apr 09 05:55:18 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/oc
[Sun Apr 09 05:55:18 2017] [error] [client x] File does not exist: /home/www/nextcloud/cloud/oc-shib

Has someone an idea what i’m doing wrong and how i could change it? Would be really nice :)!
Thank you a lot and have a nice day ;)!

You have a few errors with the temp-folder. On the default temp folder of your system, you don’t have enough permissions because this is shared with other users. You can setup up a temp folder in your own webspace and set an option in your config/config.php:

/**
 * Override where Nextcloud stores temporary files. Useful in situations where
 * the system temporary directory is on a limited space ramdisk or is otherwise
 * restricted, or if external storages which do not support streaming are in
 * use.
 *
 * The Web server user must have write access to this directory.
 */
'tempdirectory' => '/tmp/nextcloudtemp',

Another thing rather quickly to check, do your webhost fullfill all requirements. Put a test.php in your document root with <?php phpinfo(); ?>. It should show you which php version is used and which modules are installed. PHP should be 5.6 or later, for the modules, check this list here:
https://docs.nextcloud.com/server/11/admin_manual/installation/source_installation.html#prerequisites

1 Like

Hi, I have the same problem and the same log-entries. For me this is a new problem, might be introduced by 10.0.2 or 10.0.3.

I tried the proposed solution by changing “tempdirectory”, but this option seem to be ignored: I get the same errors and my new temp directory stays empty.
I tried different directories, e.g. I created /home/www/nextcloud/tmp/ and also /home/next_temp, so I think the webserver should have write access to at least one of those.

Any ideas?

I could solve my Problem wkth disabling brute force protection… I had houndrets of entries in the brute Force attemp Table…