Only the first login is successful with owncloud client on Ubuntu 16.04

I’m using owncloud client on Ubuntu 16.04 to sync with Nextcloud server 10.0.

I’m able to properly configure the account and successfully sync data with the server.

But when I attempt to login for the second time, I have the “No Connection to owncloud” error.

I tried a lot of things, using Ubuntu 16.04 official repository installation and owncloud Suse repository for Ubuntu 16.04.

Both client (./Nextcloud/.owncloudsync.log) and server (/var/nextcloud/data/nextcloud.log) logs didn’t show errors.

Nextcloud server is configured to accept SSL self-signed certificate:

'check_for_working_webdav' => false,

The HSTS is configured:

<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

What could be the problem?
Maybe a time-out error? (first login require a lot of seconds)


It might be a DNS resolution time out. Is PHP able to resolve domain names?

I solve the problem removing owncloud-client, his dependencies (dpkg -l | grep -i owncloud), configuration file (.local/share/data/ownCloud in Ubuntu) and than installing Ubuntu 16.04 repository owncloud-client 2.1.1.

But this is strange for me, because I’m pretty sure that I had already tried that.

Is it possible that my problem was due to the fact that the first time I tried to install owncloud-client there was another PC connected to the server with the same account?