nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.94k stars 4.02k forks source link

phpseclib SSH2.php Fatal ErrorException line 3821 #26714

Closed unamundan closed 3 years ago

unamundan commented 5 years ago

SYSTEM

PHP

DATABASE

ISSUE


root@cloud:~# sudo -u www-data php /var/www/nextcloud/occ files:scan --all
Starting scan for user 1 out of 3 [USERNAME1]
Starting scan for user 2 out of 3 [USERNAME2]
Starting scan for user 3 out of 3 [USERNAME3]
+---------+--------+--------------+
| Folders | Files  | Elapsed time |
+---------+--------+--------------+
| 32863   | 592042 | 03:03:48     |
+---------+--------+--------------+
PHP Fatal error:  Uncaught ErrorException: Connection closed prematurely in /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SSH2.php:3821
Stack trace:
#0 [internal function]: OCA\Files\Command\Scan->exceptionErrorHandler(1024, 'Connection clos...', '/var/www/nextcl...', 3821, Array)
nextcloud/3rdparty#1 /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SSH2.php(3821): user_error('Connection clos...')
nextcloud/3rdparty#2 /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SSH2.php(4039): phpseclib\Net\SSH2->_send_binary_packet('\x01\x00\x00\x00\v\x00\x00\x00\x00\x00\x00\x00\x00')
nextcloud/3rdparty#3 /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SFTP.php(3102): phpseclib\Net\SSH2->_disconnect(11)
nextcloud/3rdparty#4 /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SSH2.php(3146): phpseclib\Net\SFTP->_disconnect(11)
nextcloud/3rdparty#5 /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SSH2.php(3162): phpseclib\Net\SSH2->disconnect()
nextcloud/3rdparty#6 [internal function]: phpseclib\Net\SSH2->__destruct()
nextcloud/3rdparty#7 {main}
  thrown in /var/www/nextcloud/3rdparty/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 3821```
unamundan commented 5 years ago

Two unsuccessful attempts using the

sudo -u www-data php /var/www/nextcloud/occ files:scan --all

command via Terminal left external storage mounts only quasi-catalogued and, as a result, their contents unbrowsable. (Directories were missing even after successive browser refreshes and cache cleaning.)

Removing the mounts and adding them again — sans the above forced scan — seems to be working. Nextcloud is slowly-but-surely cataloguing. Total drive sizes are inaccurate as it progressively scans volumes one at a time. Those waiting to be scanned are reported inaccurately as size = 0. But all volumes, folders, and files mid-scan now seem browseable and accessible, unlike the inaccessible and unbrowseable condition the fatal files:scan --all error left them in previously.

szaimen commented 3 years ago

Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.