Impossible to add an external storage

Hi,

I’m impossible to add an external storage in my NextCloud…
I’ve a VPS.
I checked my Apache config because I’ve the AH01630 error…
But I’ve always the same problem.

Have you any issue for my problem ?

Thank’s

Romain

Nextcloud version : 10.0.3
Operating system and version : 8.7
Apache version : 2.4.10
PHP version : 5.6.30
Is this the first time you’ve seen this error?: YES

The output of your Nextcloud log in Admin > Logging:

_OpenCloud\Common\Exceptions\EndpointError: No endpoints for service type [object-store], name [ostack], region [GRA1] and urlType [publicURL]_
_/var/www/nextcloud/3rdparty/rackspace/php-opencloud/lib/OpenCloud/Common/Service/CatalogService.php - line 72: OpenCloud\Common\Service\CatalogService->findEndpoint()_
_/var/www/nextcloud/3rdparty/rackspace/php-opencloud/lib/OpenCloud/ObjectStore/Service.php - line 43: OpenCloud\Common\Service\CatalogService->__construct(Object(OpenCloud\OpenStack), NULL, 'ostack', 'GRA1', NULL)_
_/var/www/nextcloud/3rdparty/rackspace/php-opencloud/lib/OpenCloud/Common/Service/ServiceBuilder.php - line 43: OpenCloud\ObjectStore\Service->__construct(Object(OpenCloud\OpenStack), NULL, 'ostack', 'GRA1', NULL)_
_/var/www/nextcloud/3rdparty/rackspace/php-opencloud/lib/OpenCloud/OpenStack.php - line 459: OpenCloud\Common\Service\ServiceBuilder factory(Object(OpenCloud\OpenStack), 'OpenCloud\\Objec...', Array)_
_/var/www/nextcloud/apps/files_external/lib/Lib/Storage/Swift.php - line 581: OpenCloud\OpenStack->objectStoreService('ostack', 'GRA1')_
_/var/www/nextcloud/apps/files_external/lib/Lib/Storage/Swift.php - line 606: OCA\Files_External\Lib\Storage\Swift->getConnection()_
_/var/www/nextcloud/apps/files_external/lib/Lib/Storage/Swift.php - line 129: OCA\Files_External\Lib\Storage\Swift->getContainer()_
_/var/www/nextcloud/apps/files_external/lib/Lib/Storage/Swift.php - line 302: OCA\Files_External\Lib\Storage\Swift->fetchObject('')_
_/var/www/nextcloud/lib/private/Files/Storage/Common.php - line 439: OCA\Files_External\Lib\Storage\Swift->stat('')_
_/var/www/nextcloud/apps/files_external/lib/config.php - line 233: OC\Files\Storage\Common->test(false, false)_
_/var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 257: OC_Mount_Config getBackendStatus('\\OCA\\Files_Exte...', Array, false, false)_
_/var/www/nextcloud/apps/files_external/lib/Controller/UserGlobalStoragesController.php - line 121: OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)_
_[internal function] OCA\Files_External\Controller\UserGlobalStoragesController->show(1, false)_
_/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)_
_/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')_
_/var/www/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')_
_/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('UserGlobalStora...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)_
_[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)_
_/var/www/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)_
_/var/www/nextcloud/lib/base.php - line 1010: OC\Route\Router->match('/apps/files_ext...')_
_/var/www/nextcloud/index.php - line 40: OC handleRequest()_
_{main}_

The output of your config.php file in /path/to/nextcloud :
<?php
$CONFIG = array (
_ ‘instanceid’ => ‘XXX’,
_ ‘passwordsalt’ => ‘XXX’,
_ ‘secret’ => ‘XXX’,
_ ‘trusted_domains’ =>
_ array (
_ 0 => ‘myip’,
_ ),
_ ‘datadirectory’ => ‘/var/www/nextcloud/data’,
_ ‘overwrite.cli.url’ => ‘myip’,
_ ‘dbtype’ => ‘mysql’,
_ ‘version’ => ‘11.0.3.2’,
_ ‘dbname’ => ‘dynamo’,
_ ‘dbhost’ => ‘localhost’,
_ ‘dbport’ => ‘’,
_ ‘dbtableprefix’ => 'oc
’,
_ ‘dbuser’ => 'oc_admin’,
_ ‘dbpassword’ => ‘XXX’,
_ ‘logtimezone’ => ‘UTC’,
_ ‘installed’ => true,
_ ‘updater.release.channel’ => ‘stable’,
_ ‘maintenance’ => false,
_ ‘theme’ => ‘’,
_ ‘loglevel’ => 2,
_ ‘mail_from_address’ => ‘mail address’,
_ ‘mail_smtpmode’ => ‘php’,
_ ‘mail_domain’ => ‘gmail.com’,
_ ‘updater.secret’ => ‘XXX’,
_);

The output of your Apache/nginx/system log in `/var/log/____`:
   _[Thu Apr 27 12:38:44.348267 2017] [authz_core:error] [pid 5218] [client ip:57559] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
   _[Thu Apr 27 12:38:49.482778 2017] [authz_core:error] [pid 5211] [client ip:57554] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
   _[Thu Apr 27 12:38:56.093415 2017] [authz_core:error] [pid 5211] [client ip:57554] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata

000-default.conf

<VirtualHost *:80>

    ServerName myIP
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www

    <Directory "/var/www/nextcloud">
        Options MultiViews FollowSymLinks
        AllowOverride all
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.

Do you have trouble adding any external storage or just your external storage? Has it been working with a previous setup?

In fact, I’m unable to add any external storage…

I 've tested to add a FTP external storage and I’ve a problem again

For FTP, this is the Nextcloud Log :
file_exists(): connect() failed: Connection timed out at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/StreamWrapper.php#74

I’ve deleted and reinstalled apache and php.

I’ve created another file in sites-enabled, as it writted in NextCloud manual :

Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud

</Directory>

It’s the first time I want to add an external storage.
I’ve tested my identifiants on the OwnCloud of a friend and it’s works perfectly !

The file integrity check on the admin-page doesn’t show any errors?

Connection time out is quite obvious but it’s not clear, you are sure there is no firwall blocking outgoing ftp connections? Can you access from command line via FTP?

Hmmm, I was certain, I’ve opened the port 21…
It’s now OK and the FTP is added :wink:

But my OpenStack external storage is always not connected.
For information, it’s a private bucket.

I don’t find how to check integrity of a page… How can you do ?

Thank’s for your help !

Nobody…?

Nobody…?

Did you try to search for the ports?
https://docs.openstack.org/juno/config-reference/content/firewalls-default-ports.html

Or disable your firewall and monitor your connections, you have perhaps a debug or analysis mode in your firewall which shows you the blocked ports.

Thank’s for your response.
Yes, I search some responses about ports…
I opened ports 6000, 6001, 6002 and 873 but always same problem

Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11-1
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11-2
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:rsync

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11-1
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11-2
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:x11

It’s Crazy ! :expressionless:

I’m also having trouble adding external storage. I tried Dropbox, Google, and SFTP… I thought it might be my firewall so I disabled it but the problem persisted. I thought I’d try local storage, so I created a /home/nextcloud directory owned by www-data (the user running apache) with a group of www-data and permissions of 750, but all I get is a red square when I try to add it to nextcloud. I don’t get any error messages or any entries in the admin logs… just a red square when I try to add it (same thing for everything else – including sftp which I can connect to fine on the command line from the server). I also have “All checks passed” under “Security and Setup Warnings”. I’m perplexed. Everything else seems to work well, including file sync from the desktop client.

Have you found any answers to your FTP problem? Have you tried Local storage to see if it lets you?

Matthew