Can't connect with Android app after updated from ownCloud 9 to Nextcloud 11

Nextcloud version: 11.0.1
Operating system and version: Debian 8.7
Apache or nginx version: Nginx 1.6.2
PHP version: 5.6.29
Is this the first time you’ve seen this error and can you replicate it?: First time, reproducible

The issue you are facing:

I can’t connect with the Android app, I get the error “The server took too long to respond”.
On the web browser, after cleaning the cache and the cookies, I failed to connect at the first attempt, I stayed on the login screen for 30 seconds, then a white page showed and then back to login screen.
On the second attempt I was able to connect, but it took me more than 40 seconds to have the Files page displayed (significantly slower than when I had ownCloud 9).
I can’t connect with the client desktop (connection timeout).
I migrated directly from ownCloud 9 to Nextcloud 11 (and I can’t go back now because it took me a week to have this problem, at the beginning everything was working flawlessly :frowning2: ).

The output of your Nextcloud log in Admin > Logging:

Nothing new in the log when I’m trying to connect with the android app.
Nothing new in the log when I’m connecting with the web browser (whether it’s a success or not).

Do you really wan that I copy/paste the log here?? It’s huge…

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'oc12837683456',
  'passwordsalt' => 'xxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxx.xxxxxx.com',
  ),
  'datadirectory' => '/home/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '11.0.1.2',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'loglevel' => 0,
  'theme' => '',
  'forcessl' => true,
  'maintenance' => false,
  'secret' => 'xxxx',
  'mail_from_address' => 'noreply',
  'mail_domain' => 'xxx.xxxxxx.com',
  'mail_smtpmode' => 'php',
  'appstore.experimental.enabled' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trashbin_retention_obligation' => 'auto',
  'updatechecker' => false,
  'updater.secret' => 'xxxxxxx',
);```

The output of your Apache/nginx/system log in `/var/log/____`:

`tail /var/log/nginx/access.log`

```192.222.253.42 - my_user_id [24/Jan/2017:21:08:47 -0500] "PROPFIND /remote.php/webdav/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/2.2.4 (Nextcloud)"
192.222.253.42 - my_user_id [24/Jan/2017:21:08:51 -0500] "HEAD /remote.php/webdav/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) ownCloud-android/1.4.0"
192.222.253.42 - my_user_id [24/Jan/2017:21:08:52 -0500] "GET /status.php HTTP/1.1" 200 157 "-" "Mozilla/5.0 (Linux) mirall/2.2.4 (Nextcloud)"
192.222.253.42 - - [24/Jan/2017:21:09:14 -0500] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 74 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0"
192.222.253.42 - my_user_id [24/Jan/2017:21:09:19 -0500] "PROPFIND /remote.php/webdav/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/2.2.4 (Nextcloud)"
192.222.253.42 - my_user_id [24/Jan/2017:21:09:24 -0500] "GET /status.php HTTP/1.1" 200 157 "-" "Mozilla/5.0 (Linux) mirall/2.2.4 (Nextcloud)"
192.222.253.42 - - [24/Jan/2017:21:09:31 -0500] "GET /status.php HTTP/1.1" 200 157 "-" "Mozilla/5.0 (Android) ownCloud-android/1.4.0"
192.222.253.42 - - [24/Jan/2017:21:09:32 -0500] "HEAD /remote.php/webdav/ HTTP/1.1" 401 0 "-" "Mozilla/5.0 (Android) ownCloud-android/1.4.0"
192.222.253.42 - - [24/Jan/2017:21:09:41 -0500] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 74 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0"
192.222.253.42 - my_user_id [24/Jan/2017:21:09:44 -0500] "HEAD /remote.php/webdav/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) ownCloud-android/1.4.0"```
 
---

`tail nextcloud_error.log`

```2017/01/24 14:58:54 [error] 23194#0: *194232 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.222.253.42, server: xxx.xxxxxxxx.com, request: "GET /ocs/v1.php/cloud/users/my_user_id?format=json HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.owncloud.sock", host: "xxxx.xxxxxxx.com"```

As far as i know, cross upgrading is not supported (yet).

Apparently it’s possible to migrate directly from ownCloud 9 to Nextcloud 10 (https://nextcloud.com/migration/)
But it’s not precised if it’s possible to go directly from OC 9 to NC 11.

But I’ve seen this link a little too late… Now I don’t really know if I can fix it, or even if the migration is really the problem.

Normally the upgrade is not carried out and your setup should still be in NC 9. Check your config/config.php for the version number. If this is still 9,0 something, you can upgrade to 10:

  • backup
  • delete everything EXCEPT data/ and config/ folder
  • download latest 10.0.x version from nextcloud.com/changelog
  • extract package, fix permissions, run occ-upgrade-command

Note that I didn’t go from NC 9 to NC 11. I migrate from OC 9 to NC 11 (it’s not a typo).