GAS85/nextcloud_scripts

Scan not fuction properly

Closed this issue · 2 comments

Scan is not succeeding am running nextcloud 20.somthing
php7.4
nginx
ubuntu server lts 20

Its starts scanning one of the smb mounts but just stops after a exception? This was the only log that had data inside?
Does this tell you anything at all? thx in advance.

Starting scan for user 1 out of 1 (backuplocal)
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
Exception during scan: Unknown error () for Nextcloud /SMBfolder/Projects//200082.2kW
#0 /usr/share/nginx/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php(35): Icewind\SMB\Exception\Exception::unknown()
#1 /usr/share/nginx/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php(88): Icewind\SMB\Exception\Exception::fromMap()
#2 /usr/share/nginx/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php(441): Icewind\SMB\Wrapped\Parser->checkForError()
#3 /usr/share/nginx/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php(152): Icewind\SMB\Wrapped\Share->parseOutput()
#4 /usr/share/nginx/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(238): Icewind\SMB\Wrapped\Share->dir()
#5 /usr/share/nginx/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(610): OCA\Files_External\Lib\Storage\SMB->getFolderContents()
#6 [internal function]: OCA\Files_External\Lib\Storage\SMB->getDirectoryContent()
#7 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(408): iterator_to_array()
#8 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(388): OC\Files\Cache\Scanner->handleChildren()
#9 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#10 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#11 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#12 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#13 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#14 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#15 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#16 /usr/share/nginx/nextcloud/lib/private/Files/Cache/Scanner.php(340): OC\Files\Cache\Scanner->scanChildren()
#17 /usr/share/nginx/nextcloud/lib/private/Files/Utils/Scanner.php(260): OC\Files\Cache\Scanner->scan()
#18 /usr/share/nginx/nextcloud/apps/files/lib/Command/Scan.php(152): OC\Files\Utils\Scanner->scan()
#19 /usr/share/nginx/nextcloud/apps/files/lib/Command/Scan.php(208): OCA\Files\Command\Scan->scanFiles()
#20 /usr/share/nginx/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php(258): OCA\Files\Command\Scan->execute()
#21 /usr/share/nginx/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#22 /usr/share/nginx/nextcloud/apps/mail/vendor/symfony/console/Application.php(920): OC\Core\Command\Base->run()
#23 /usr/share/nginx/nextcloud/apps/mail/vendor/symfony/console/Application.php(266): Symfony\Component\Console\Application->doRunCommand()
#24 /usr/share/nginx/nextcloud/apps/mail/vendor/symfony/console/Application.php(142): Symfony\Component\Console\Application->doRun()
#25 /usr/share/nginx/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#26 /usr/share/nginx/nextcloud/console.php(100): OC\Console\Application->run()
#27 /usr/share/nginx/nextcloud/occ(11): require_once('/usr/share/ngin...')
#28 {main}
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 11766 | 55012 | 00:06:05 |
+---------+-------+--------------+
Starting scan for user 1 out of 1 (backuplocal)
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
Path not found: /backuplocal/files/foldername
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0 | 0 | 00:00:00 |
+---------+-------+--------------+
Starting scan for user 1 out of 1 (username)
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
Protocol negotiation failed: NT_STATUS_CONNECTION_RESET
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 2111 | 7350 | 00:00:34 |
+---------+-------+--------------+

am running command as /usr/local/bin# sudo -u www-data ./nextcloud-file-sync.sh since i wanna run in directly this time. When it works in place it in crontab.

GAS85 commented

This script only simplifies occ way of working with multiple external shares, not more. I see you have similar ticket in a right place nextcloud/server#20628.
Besides that authentication fails I have no ideas.
Do U have mod_security in your ngnix/apache2? Could be that its blocking staff also.