Share from a local IP locks up an Nextcloud instance on different network

Nextcloud version: 13.0.0
Operating system and version: CentOS 7.4.1708
Apache version: 2.4.6
PHP version: 5.6

The issue I’m facing: My friend sent me a share link to his Nextcloud, but accidentally gave me a local IP share link (i.e. http:192.168.1.10). When I added it, everything in Nextcloud began to run slowly. When I disable the sharing app, everything functions normally. The Sharing app won’t load at all, so I can’t seem to remove my friend’s share.

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. On server A, create a share with a local address (i.e. http://192.168.1.10).
  2. On server B (on a different network than server A), add the share.

The output of my Nextcloud log in Admin > Logging:

|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery.ocdialog.scss, ignoring|2018-03-09T11:02:39-0500|
|---|---|---|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/share.scss, ignoring|2018-03-09T11:02:39-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/server.scss, ignoring|2018-03-09T11:02:39-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery-ui-fixes.scss, ignoring|2018-03-09T11:02:39-0500|
|Debug|Finished OC\Command\CommandJob job with ID 102 in 0 seconds|2018-03-09T11:01:22-0500|
|Debug|Run OC\Command\CommandJob job with ID 102|2018-03-09T11:01:22-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\BruteForceSettings\Settings\IPWhitelist! Class OCA\BruteForceSettings\Settings\IPWhitelist does not exist|2018-03-09T11:01:10-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\Spreed\Settings\Admin\Section! Class OCA\Spreed\Settings\Admin\Section does not exist|2018-03-09T11:01:10-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T11:01:10-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T11:01:10-0500|
|Error|Sabre\HTTP\ClientException: Failed connect to 192.168.0.108:80; Connection timed out|2018-03-09T10:59:45-0500|
|Error|OCP\Files\StorageNotAvailableException: Sabre\HTTP\ClientException: Failed connect to 192.168.0.108:80; Connection timed out|2018-03-09T10:59:45-0500|
|Error|Failed connect to 192.168.0.108:80; Connection timed out|2018-03-09T10:59:45-0500|
|Error|Sabre\HTTP\ClientException: Failed connect to 192.168.0.108:80; Connection timed out|2018-03-09T10:59:45-0500|
|Debug|Finished OC\Command\CommandJob job with ID 101 in 0 seconds|2018-03-09T10:58:18-0500|
|Debug|Run OC\Command\CommandJob job with ID 101|2018-03-09T10:58:18-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery.ocdialog.scss, ignoring|2018-03-09T10:57:38-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/share.scss, ignoring|2018-03-09T10:57:38-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/server.scss, ignoring|2018-03-09T10:57:38-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery-ui-fixes.scss, ignoring|2018-03-09T10:57:38-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\BruteForceSettings\Settings\IPWhitelist! Class OCA\BruteForceSettings\Settings\IPWhitelist does not exist|2018-03-09T10:57:16-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\Spreed\Settings\Admin\Section! Class OCA\Spreed\Settings\Admin\Section does not exist|2018-03-09T10:57:16-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T10:57:16-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T10:57:16-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery.ocdialog.scss, ignoring|2018-03-09T10:52:39-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/share.scss, ignoring|2018-03-09T10:52:39-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/server.scss, ignoring|2018-03-09T10:52:39-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery-ui-fixes.scss, ignoring|2018-03-09T10:52:39-0500|
|Debug|Finished OC\Command\CommandJob job with ID 100 in 0 seconds|2018-03-09T10:50:34-0500|
|Debug|Run OC\Command\CommandJob job with ID 100|2018-03-09T10:50:34-0500|
|Debug|Finished OC\Command\CommandJob job with ID 99 in 0 seconds|2018-03-09T10:49:01-0500|
|Debug|Run OC\Command\CommandJob job with ID 99|2018-03-09T10:49:01-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\BruteForceSettings\Settings\IPWhitelist! Class OCA\BruteForceSettings\Settings\IPWhitelist does not exist|2018-03-09T10:48:39-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\Spreed\Settings\Admin\Section! Class OCA\Spreed\Settings\Admin\Section does not exist|2018-03-09T10:48:39-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T10:48:39-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T10:48:39-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery.ocdialog.scss, ignoring|2018-03-09T10:48:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/share.scss, ignoring|2018-03-09T10:48:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/server.scss, ignoring|2018-03-09T10:48:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery-ui-fixes.scss, ignoring|2018-03-09T10:48:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery.ocdialog.scss, ignoring|2018-03-09T10:43:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/share.scss, ignoring|2018-03-09T10:43:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/server.scss, ignoring|2018-03-09T10:43:25-0500|
|Debug|Scss is disabled for /home/hmhrex/webapps/owncloud/core/css/jquery-ui-fixes.scss, ignoring|2018-03-09T10:43:25-0500|
|Debug|Finished OC\Command\CommandJob job with ID 98 in 0 seconds|2018-03-09T10:42:43-0500|
|Debug|Run OC\Command\CommandJob job with ID 98|2018-03-09T10:42:43-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\BruteForceSettings\Settings\IPWhitelist! Class OCA\BruteForceSettings\Settings\IPWhitelist does not exist|2018-03-09T10:41:52-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\Spreed\Settings\Admin\Section! Class OCA\Spreed\Settings\Admin\Section does not exist|2018-03-09T10:41:52-0500|
|Info|OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist|2018-03-09T10:41:52-0500|

The output of my config.php file in /path/to/nextcloud:

<?php
$CONFIG = array (
  'instanceid' => '*',
  'passwordsalt' => '*',
  'secret' => '*',
  'trusted_domains' =>
  array (
    0 => 'hmhrex.webfactional.com',
    1 => 'cloud.hicks.house',
  ),
  'datadirectory' => '/home/hmhrex/webapps/owncloud/data',
  'overwrite.cli.url' => 'http://hmhrex.webfactional.com/owncloud',
  'dbtype' => 'mysql',
  'version' => '13.0.0.14',
  'dbname' => '*',
  'dbhost' => '*',
  'dbtableprefix' => '*',
  'dbuser' => '*',
  'dbpassword' => '*',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_domain' => '*',
  'mail_smtpmode' => 'php',
  'mail_from_address' => 'cloud',
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => false,
  'integrity.check.disabled' => true,
  'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
  'updater.release.channel' => 'stable',
  'updater.secret' => '*',
);

I finally figured out how to do this manually after some thinking and prodding. However, I still think this is a bug that needs looked at. If this happens by accident to someone, it can be a real pain to figure out what’s going on.

To fix:

  1. Go to the oc_share_external table on your Nextcloud database.
  2. Find the column with the local IP address.
  3. Delete that column.