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

Failed to connect to www.nextcloud.com #9932

Closed
Thorbinjho opened this issue Jun 20, 2018 · 4 comments
Closed

Failed to connect to www.nextcloud.com #9932

Thorbinjho opened this issue Jun 20, 2018 · 4 comments

Comments

@Thorbinjho
Copy link

Thorbinjho commented Jun 20, 2018

I am having trouble to connect to nextcloud.com from my server. When searching for this issue, I often find solutions where the server is not connected to the internet. Therefore I did some ping-tests:

  1. my server --> www.nextcloud.com: I get some answers but there is ~97% package loss. I ran the test for some minutes and the answered packages are distributed over the entire run. The answers come with a normal latency.
  2. my server --> www.google.de: All requests are being answered (0% package loss)
  3. my desktop PC (different network) --> www.nextcloud.com: All requests are being answered.

So, what I know is that there is a very messy connection between my server and nextcloud.com while the overall internet connection of my server (dedicated server machine with gigabit-connection to the internet) seems to be very stable. Using my nextcloud over the internet works fine. Might it be that due to some misconfiguration, my server "spams" nextcloud.com and becomes therefore blacklisted for some time? The log entries do not seem to be too frequent unless I try to open the app store or try to look for updates.

Steps to reproduce

  1. Wait until my nextcloud installation tries to connect to www.nextcloud.com while looking for updates
    or: Try to open the app store in my nextcloud installation

Expected behaviour

nextcloud.com should return the current version which allows my installation to check if it's up-to-date
The app store should show up and show me the available apps

Actual behaviour

The requests often time out with the note:

  • GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to www.nextcloud.com port 80: Connection timed out

The App store needs at least 10 seconds to show up and than just shows my installed apps and some app bundles (in german "App Pakete"). Clicking on the app bundles-button takes even longer. Finally, it shows three bundles which are all composed of already installed packages. The log is being flooded with the following log entries:

  • Could not connect to appstore: {"Exception":"GuzzleHttp\Exception\ConnectException","Message":"cURL error 28: Connection timed out after 10001 milliseconds","Code":0,"Trace":"#0 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(103): GuzzleHttp\Exception\RequestException::wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\ConnectException))\n#1 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))\n#2 /usr/share/webapps/nextcloud/3rdparty/react/promise/src/FulfilledPromise.php(25): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(*** sensitive parameters replaced ***)\n#3 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)\n#4 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)\n#5 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(134): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))\n#6 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php(165): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))\n#7 /usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php(125): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))\n#8 /usr/share/webapps/nextcloud/lib/private/Http/Client/Client.php(138): GuzzleHttp\Client->get('https://apps.ne...', Array)\n#9 /usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php(106): OC\Http\Client\Client->get('https://apps.ne...', Array)\n#10 /usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php(71): OC\App\AppStore\Fetcher\Fetcher->fetch('"2018-04-09 09:...', '[{"id":"bookmar...')\n#11 /usr/share/webapps/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php(170): OC\App\AppStore\Fetcher\AppFetcher->fetch('"2018-04-09 09:...', '[{"id":"bookmar...')\n#12 /usr/share/webapps/nextcloud/settings/Controller/AppSettingsController.php(182): OC\App\AppStore\Fetcher\Fetcher->get()\n#13 /usr/share/webapps/nextcloud/settings/Controller/AppSettingsController.php(395): OC\Settings\Controller\AppSettingsController->getAppsForCategory(3)\n#14 [internal function]: OC\Settings\Controller\AppSettingsController->listApps('app-bundles')\n#15 /usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(161): call_user_func_array(Array, Array)\n#16 /usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(91): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\AppSettingsController), 'listApps')\n#17 /usr/share/webapps/nextcloud/lib/private/AppFramework/App.php(115): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\AppSettingsController), 'listApps')\n#18 /usr/share/webapps/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OC\\Settings\\Con...', 'listApps', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#19 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)\n#20 /usr/share/webapps/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)\n#21 /usr/share/webapps/nextcloud/lib/base.php(998): OC\Route\Router->match('/settings/apps/...')\n#22 /usr/share/webapps/nextcloud/index.php(37): OC::handleRequest()\n#23 {main}","File":"/usr/share/webapps/nextcloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php","Line":49}

I am sure that it has already been working but I am not absolutely sure if it was with my current 13.0.1 or an earlier version.

Server configuration

Operating system:
Arch Linux

Web server:
Apache

Database:
MariaDB

PHP version:
7.2

Nextcloud version: (see Nextcloud admin page)
13.0.1 / stable branch

Updated from an older Nextcloud/ownCloud or fresh install:
Clean install of Nextcloud 13 (testing-branch) and one update to the officially stable 13.0.1 as soon as it became publicly available (update via pacman/Arch repositories)

Where did you install Nextcloud from:
Arch repositories
I installed the apps through the webinterface of nextcloud

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.6.1
  - announcementcenter: 3.2.1
  - bruteforcesettings: 1.0.3
  - calendar: 1.6.1
  - comments: 1.3.0
  - contacts: 2.1.3
  - dav: 1.4.6
  - deck: 0.3.1
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_pdfviewer: 1.2.0
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - password_policy: 1.3.0
  - phonetrack: 0.2.7
  - provisioning_api: 1.3.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - spreed: 3.1.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - user_ldap: 1.3.1
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_external

Nextcloud configuration:

Config report
    "system": {
        "maintenance": false,
        "loglevel": 1,
        "theme": "",
        "skeletondirectory": "\/home\/nextcloud\/data\/Admin\/files\/Administration\/Skeleton\/",
        "trashbin_retention_obligation": "auto, 90",
        "versions_retention_obligation": "auto, 180",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.MYURL.de"
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "timeout": 1.5
        },
        "filelocking.enabled": true,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.MYURL.de",
        "dbtype": "mysql",
        "version": "13.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "data-fingerprint": "8a2051323c7e6a6c384ed2d3d0e95b43",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory"
    }

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: LDAP

LDAP configuration (delete this part if not used)

I think, this is not interesting. But when needed, I can add it later.

@MorrisJobke
Copy link
Member

nextcloud.com should return the current version which allows my installation to check if it's up-to-date
The app store should show up and show me the available apps

That's not how it works. We use www.nextcloud.com only for general connectivity check.

apps.nextcloud.com is another machine that serves the app store and the updates of those apps.

updates.nextcloud.com is yet another machine that informs your Nextcloud about updates of the server.

Seeing your first description it looks like there is a slight setup issue somewhere. As we can't reproduce the issue I would think it is outside the scope of the PHP code base. Thus I would ask you to reach out with your setup related question to the forums: https://help.nextcloud.com and check if other people also run into this.

@Thorbinjho
Copy link
Author

Thanks for your fast comment!

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #9509 (Can't connect Nextcloud to MariaDB with SSL), #6410 (Nextcloud 11 - Upgrade to 12 failed - ), #3735 (Recommend doing a external Security Scan over "scan.nextcloud.com"), #5882 (Swift as external storage fails in Nextcloud 12), and #9728 (Migrate from GitHub to git.nextcloud.com).

@Thorbinjho
Copy link
Author

I feel bad to post that it was related to my firewall settings. I only had some filters on the incoming network traffic and did not expect to have any problems with "outgoing" connections. However, the firewall somehow interferred with some targets which prevented my server to download git-repositories in many cases as well as connections to nextcloud.com (both often but not always).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants