Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federated receive links keep trying to connect to remote cloud, although links were deleted #6029

Closed
SpontEIN opened this issue Aug 8, 2017 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing

Comments

@SpontEIN
Copy link

SpontEIN commented Aug 8, 2017

Steps to reproduce

  1. Use federation to link directory/file to remote cloud
  2. Delete federated link
  3. optionally: also delete previously shared dir/files entirely from cloud

Expected behaviour

Federated link should be gone / not active / do nothing

Actual behaviour

Every 15 min my nextcloud still tries to connect to the other cloud and apparently tries to access the federate links. Even when I turned of the federate cloud sharing entirely the error still occurs.

Error files_external Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused
Error no app in context OCP\Files\StorageNotAvailableException: Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused
Error files_external Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused 2017-
Error no app in context Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused

These log entries appear 4 times every 15 min. (4 dir/files were shared via federation)
My monitoring App, also still claims that there are 4 federated receive links (pink bar in web-GUI).

I confirmed that the federated links were certainly deleted. Some of the 4 dir/fiels were even entirely deleted from the cloud.

Otherwise the cloud seems to run fine.

Server configuration

Operating system: Ubuntu 16.04.3 LTS

Web server: nginx/1.13.0

Database: MariaDB

PHP version: PHP 7.1.8

Nextcloud version: 12.0.0

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Signing status:
Not sure what I am supposed to do here: login into my nextcloud as cloudadmin via web browser, then pasting http://example.com/index.php/settings/integrity/failed to new browser tab yields:
The image "http://example.com/index.php/settings/integrity/failed" cannot be displayed because it contains errors

List of activated apps:
Enabled:

  • activity: 2.5.2
  • admin_audit: 1.2.0
  • bookmarks: 0.10.1
  • bruteforcesettings: 1.0.2
  • calendar: 1.5.3
  • comments: 1.2.0
  • contacts: 1.5.3
  • dav: 1.3.0
  • encryption: 1.6.0
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_antivirus: 1.1.0
  • files_pdfviewer: 1.1.1
  • files_sharing: 1.4.0
  • files_texteditor: 2.4.1
  • files_trashbin: 1.2.0
  • files_versions: 1.5.0
  • files_videoplayer: 1.1.0
  • firstrunwizard: 2.1
  • gallery: 17.0.0
  • groupfolders: 1.1.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • nextcloud_announcements: 1.1
  • notes: 2.3.1
  • notifications: 2.0.0
  • oauth2: 1.0.5
  • password_policy: 1.2.2
  • provisioning_api: 1.2.0
  • serverinfo: 1.2.0
  • sharebymail: 1.2.0
  • survey_client: 1.0.0
  • systemtags: 1.2.0
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • workflowengine: 1.2.0

Disabled:

  • files_external
  • user_external
  • user_ldap

Nextcloud configuration:
The output of my config.php:

<?php
$CONFIG = array (
‘instanceid’ => ‘xxxx’,
‘passwordsalt’ => ‘xxxx’,
‘secret’ => ‘xxxx’,
‘trusted_domains’ =>
array (
0 => ‘xxxx’,
1 => ‘xxxx’,
),
‘datadirectory’ => ‘/nc_data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘12.0.0.29’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘nextcloud’,
‘dbpassword’ => ‘nextcloud’,
‘mysql.utf8mb4’ => true,
‘htaccess.RewriteBase’ => ‘/’,
‘overwrite.cli.url’ => ‘/’,
‘overwriteprotocol’ => ‘https’,
‘loglevel’ => 2,
‘logtimezone’ => ‘Europe/Berlin’,
‘logfile’ => ‘/var/nc_data/nextcloud.log’,
‘log_rotate_size’ => 104857600,
‘cron_log’ => false,
‘installed’ => true,
‘filesystem_check_changes’ => 1,
‘quota_include_external_storage’ => false,
‘knowledgebaseenabled’ => false,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filelocking.enabled’ => ‘true’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
),
‘maintenance’ => false,
‘theme’ => ‘’,
‘integrity.check.disabled’ => false,
‘updater.release.channel’ => ‘stable’,
‘enable_previews’ => true,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtphost’ => ‘mail.xxx.xx’,
‘mail_smtpport’ => ‘xxxx’,
‘mail_smtpsecure’ => ‘ssl’,
‘mail_from_address’ => ‘xxxx’,
‘mail_domain’ => 'xxxx,
‘mail_smtpauth’ => 1,
‘mail_smtpname’ => ‘xxxx’,
‘mail_smtppassword’ => ‘xxxx’,
);

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: Webdav

Client configuration

Browser: Firefox

Operating system: Debian Jessie

Logs

Web server error log

The output of my nginx error log in /var/log/nginx (not sure if this is connected since it occurred yesterday and the error I am describing here is periodic):

    2017/08/06 15:13:20 [error] 860#860: *50 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:61
    Stack trace:
    #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
    #1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
    #2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
    #3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
    #4 /var/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)
    #5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrin…
    PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:61
    Stack trace:
    #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
    #1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
    #2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
    #3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
    #4 /var/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)
    #5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManage

Nextcloud log (data/nextcloud.log)

Error files_external Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused
Error no app in context OCP\Files\StorageNotAvailableException: Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused
Error files_external Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused 2017-
Error no app in context Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused

The Traceback of Sabre\HTTP\ClientException: Failed to connect to XXX.XXX.XXX.XXX port 443: Connection refused

/var/www/nextcloud/3rdparty/sabre/http/lib/Client.php - line 103: Sabre\HTTP\Client->doRequest(Object(Sabre\HTTP\Request))
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Client.php - line 231: Sabre\HTTP\Client->send(Object(Sabre\HTTP\Request))
/var/www/nextcloud/lib/private/Files/Storage/DAV.php - line 263: Sabre\DAV\Client->propFind('https //45.32.1...', Array)
/var/www/nextcloud/lib/private/Files/Storage/DAV.php - line 577: OC\Files\Storage\DAV->propfind('')
/var/www/nextcloud/lib/private/Files/Storage/Common.php - line 444: OC\Files\Storage\DAV->stat('')
/var/www/nextcloud/apps/files_sharing/lib/External/Storage.php - line 184: OC\Files\Storage\Common->test()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 467: OCA\Files_Sharing\External\Storage->test()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 52: OC\Files\Storage\Wrapper\Wrapper->test()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 66: OC\Files\Storage\Wrapper\Availability->updateAvailability()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 75: OC\Files\Storage\Wrapper\Availability->isAvailable()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 458: OC\Files\Storage\Wrapper\Availability->checkAvailability()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 577: OC\Files\Storage\Wrapper\Availability->getMetaData('')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 577: OC\Files\Storage\Wrapper\Wrapper->getMetaData('')
/var/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 113: OC\Files\Storage\Wrapper\Wrapper->getMetaData('')
/var/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 152: OC\Files\Cache\Scanner->getData('')
/var/www/nextcloud/apps/files_sharing/lib/External/Scanner.php - line 62: OC\Files\Cache\Scanner->scanFile('', true)
/var/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 322: OCA\Files_Sharing\External\Scanner->scanFile('', true, -1, NULL, true)
/var/www/nextcloud/apps/files_sharing/lib/External/Scanner.php - line 41: OC\Files\Cache\Scanner->scan('', true, true, true)
/var/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 491: OCA\Files_Sharing\External\Scanner->scan('', true, 1)
/var/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 508: OC\Files\Cache\Scanner->OC\Files\Cache\{closure}()
/var/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 492: OC\Files\Cache\Scanner->runBackgroundScanJob(Object(Closure), '')
/var/www/nextcloud/lib/private/Files/Utils/Scanner.php - line 175: OC\Files\Cache\Scanner->backgroundScan()
/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php - line 88: OC\Files\Utils\Scanner->backgroundScan('')
/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php - line 112: OCA\Files\BackgroundJob\ScanFiles->runScanner(Object(OC\User\User))
/var/www/nextcloud/lib/private/BackgroundJob/Job.php - line 59: OCA\Files\BackgroundJob\ScanFiles->run(NULL)
/var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php - line 54: OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
/var/www/nextcloud/cron.php - line 124: OC\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
{main}

See also:

#https://help.nextcloud.com/t/federated-recieve-links-keep-trying-to-connect-to-remote-cloud-although-links-were-deleted/19157

@Schmuuu
Copy link

Schmuuu commented Aug 8, 2017

Hi,

I would like to mention that I had the same problem, but my server didn't run fine.
Everything was extremely slow and I had many timeouts which lead to only partially loaded pages in the Web GUI. Usually my (new) server is very fast, but due to the missing external shared and this bug, the server became totally unusable.

Journalctl told me the following:

Aug 08 11:30:07 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 18 total children
Aug 08 11:30:08 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 19 total children
Aug 08 11:30:09 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 20 total children
Aug 08 11:30:10 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 21 total children
Aug 08 11:30:11 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 22 total children
Aug 08 11:30:12 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 23 total children
Aug 08 11:30:13 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 24 total children
Aug 08 11:30:14 nextcloud php-fpm[755]: [WARNING] [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 25 total children

But with the following settings, I already provided a lot of resources that were totally sufficient before:

pm.start_servers=8
pm.min_spare_servers=1
pm.max_spare_servers=8

I deleted all external shares via
[mysql] delete from oc_share_external;
which solved my problem. The server was instantly very fast again.
But like @tflidd mentioned in the forum, this is just a dirty workaround.

However I just wanted to point out that this is not just a papercut, but a really serious issue when the servers dies after some time.

Server Info:
NC 12.0.1 (latest stable release)
PHP 7.1.8
nginx 1.12.1
MariaDB 10.1.25

@SpontEIN
Copy link
Author

SpontEIN commented Aug 9, 2017

Just wanted to confirm: The work around, by deleting the links from oc_share_external, also worked for me.

@tflidd
Copy link
Contributor

tflidd commented Aug 16, 2017

cc @schiessle

@MorrisJobke MorrisJobke added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing labels Sep 3, 2017
@mr-bolle
Copy link

mr-bolle commented Sep 25, 2017

Hi,
in my case the Source Server isn't available / offline.
With the Workaround from @SpontEIN i can delete this Links into oc_share_external

25-09-_2017_18-21-05

Level App Message Time
Error PHP Exception: The requested uri(/openapi/log/15_remocon) cannot be processed by the script '/core/templates/404.php') at /var/www/nextcloud/lib/private/AppFramework/Http/Request.php#729 2017-09-25T18:20:57+0200
Error no app in context OCP\Files\StorageNotAvailableException: 2017-09-25T18:20:20+0200
Error no app in context OCP\Files\StorageNotAvailableException: 2017-09-25T18:20:13+0200
Fatal webdav Sabre\DAV\Exception\ServiceUnavailable: Storage is temporarily not available 2017-09-25T18:19:56+0200
Fatal webdav Sabre\DAV\Exception\ServiceUnavailable: Storage is temporarily not available 2017-09-25T18:19:19+0200
Error files_external Sabre\HTTP\ClientException: Failed to connect to 192.168.178.29 port 800: Connection refused 2017-09-25T18:19:19+0200
Error no app in context OCP\Files\StorageNotAvailableException: Sabre\HTTP\ClientException: Failed to connect to 192.168.178.29 port 800: Connection refused 2017-09-25T18:19:19+0200
Error files_external Failed to connect to 192.168.178.29 port 800: Connection refused 2017-09-25T18:19:19+0200
Error no app in context Sabre\HTTP\ClientException: Failed to connect to 192.168.178.29 port 800: Connection refused 2017-09-25T18:19:19+0200

@theonlytruth
Copy link

Had that same problem after adding a federation share from a local IP. Removing it from the database worked for me. Thanks a lot.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@skjnldsv skjnldsv removed stale Ticket or PR with no recent activity labels Jun 12, 2019
@skjnldsv skjnldsv changed the title Federated recieve links keep trying to connect to remote cloud, although links were deleted Federated receive links keep trying to connect to remote cloud, although links were deleted Apr 10, 2020
@skjnldsv
Copy link
Member

As the version of the software you've reported this for has reached end of life, I will close this ticket. If this is still happening after an upgrade to the latest version, feel free to reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing
Projects
None yet
Development

No branches or pull requests

8 participants