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

Desktop client fails to sync: timeout on PROPFIND /remote.php/webdav #6432

Closed
tYYGH opened this issue Sep 10, 2017 · 3 comments
Closed

Desktop client fails to sync: timeout on PROPFIND /remote.php/webdav #6432

tYYGH opened this issue Sep 10, 2017 · 3 comments

Comments

@tYYGH
Copy link

tYYGH commented Sep 10, 2017

Steps to reproduce

  1. Sync a first time after installing the Nextcloud client -> OK
  2. Reboot the PC, and let the Nextcloud client sync with the server -> KO

Expected behaviour

Sync works

Actual behaviour

The client asks for the password, and then times out while trying to sync, and displays:
“Aucune connexion au serveur Nextcloud à l’adresse https://yalis.fr/nc. Operation canceled” (French)
≃“No connection to the Nextcloud server at https://yalis.fr/nc. Operation canceled” (translated)

Server configuration

Operating system: up-to-date Arch Linux
Web server: nginx-mainline 1.13.4
Database: postgresql 9.6.5
PHP version: php 7.1.9
Nextcloud version: nextcloud 12.0.2

Updated from an older Nextcloud/ownCloud or fresh install: Updated from ownCloud 10
Where did you install Nextcloud from: Archlinux package

Signing status: https://yalis.fr/nc/index.php/settings/integrity/failed =>

No errors have been found.

List of activated apps: sudo -u cloud /usr/bin/env NEXTCLOUD_CONFIG_DIR=/etc/webapps/nextcloud/config /usr/bin/php ./occ app:list =>

Enabled:
  - calendar: 1.5.3
  - comments: 1.2.0
  - contacts: 1.5.3
  - dav: 1.3.0
  - deck: 0.2.2
  - drawio: 0.8.8
  - federatedfilesharing: 1.2.0
  - federation: 1.2.0
  - files: 1.7.2
  - files_external: 1.3.0
  - files_pdfviewer: 1.1.1
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - firstrunwizard: 2.1
  - flowupload: 0.0.5
  - gallery: 17.0.0
  - keeweb: 0.4.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - mail: 0.7.2
  - nextcloud_announcements: 1.1
  - notes: 2.3.1
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - ocsms: 1.12.1
  - ojsxc: 3.3.0
  - password_policy: 1.2.2
  - provisioning_api: 1.2.0
  - richdocuments: 1.12.34
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - spreed: 2.0.1
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - updatenotification: 1.2.0
  - user_ldap: 1.2.1
  - workflowengine: 1.2.0
Disabled:
  - activity
  - admin_audit
  - bruteforcesettings
  - encryption
  - rainloop
  - user_external

Nextcloud configuration: sudo -u cloud /usr/bin/env NEXTCLOUD_CONFIG_DIR=/etc/webapps/nextcloud/config /usr/bin/php ./occ config:list system =>

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/usr\/share\/webapps\/nextcloud\/apps",
                "url": "\/nc\/apps",
                "writable": false
            },
            {
                "path": "\/var\/lib\/nextcloud\/apps",
                "url": "\/nc\/xapps",
                "writable": true
            }
        ],
        "tempdirectory": "\/var\/tmp\/nextcloud",
        "overwritewebroot": "\/nc",
        "overwrite.cli.url": "https:\/\/yalis.fr\/nc",
        "skeletondirectory": "",
        "check_for_working_htaccess": false,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "yalis.fr"
        ],
        "datadirectory": "\/var\/lib\/nextcloud\/data",
        "dbtype": "pgsql",
        "version": "12.0.2.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "localhost:\/run\/postgres",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "log.condition": [],
        "mail_domain": "yalis.fr",
        "filelocking.enabled": false,
        "log_type": "syslog",
        "mail_smtphost": "localhost",
        "mail_smtpmode": "smtp",
        "mail_smtpport": 25
    }
}

Are you using external storage, if yes which one: Yes, one local additional storage
Are you using encryption: no
Are you using an external user-backend, if yes which one: Yes, LDAP

LDAP configuration

sudo -u cloud /usr/bin/env NEXTCLOUD_CONFIG_DIR=/etc/webapps/nextcloud/config /usr/bin/php ./occ ldap:show-config =>

+-------------------------------+--------------------------------------------+
| Configuration                 | s01                                        |
+-------------------------------+--------------------------------------------+
| hasMemberOfFilterSupport      |                                            |
| hasPagedResultSupport         |                                            |
| homeFolderNamingRule          |                                            |
| lastJpegPhotoLookup           | 0                                          |
| ldapAgentName                 |                                            |
| ldapAgentPassword             | ***                                        |
| ldapAttributesForGroupSearch  |                                            |
| ldapAttributesForUserSearch   |                                            |
| ldapBackupHost                |                                            |
| ldapBackupPort                |                                            |
| ldapBase                      | dc=yalis,dc=fr                             |
| ldapBaseGroups                | ou=Groups,dc=yalis,dc=fr                   |
| ldapBaseUsers                 | ou=Users,dc=yalis,dc=fr                    |
| ldapCacheTTL                  | 600                                        |
| ldapConfigurationActive       | 1                                          |
| ldapDefaultPPolicyDN          |                                            |
| ldapDynamicGroupMemberURL     |                                            |
| ldapEmailAttribute            |                                            |
| ldapExperiencedAdmin          | 0                                          |
| ldapExpertUUIDGroupAttr       | cn                                         |
| ldapExpertUUIDUserAttr        | uid                                        |
| ldapExpertUsernameAttr        |                                            |
| ldapGidNumber                 | gidNumber                                  |
| ldapGroupDisplayName          | cn                                         |
| ldapGroupFilter               | (&(|(objectclass=posixGroup)))             |
| ldapGroupFilterGroups         |                                            |
| ldapGroupFilterMode           | 0                                          |
| ldapGroupFilterObjectclass    | posixGroup                                 |
| ldapGroupMemberAssocAttr      | gidNumber                                  |
| ldapHost                      | ldapi://%2Frun%2Fback%2Fldapi/             |
| ldapIgnoreNamingRules         |                                            |
| ldapLoginFilter               | (&(|(objectclass=posixAccount))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                            |
| ldapLoginFilterEmail          | 0                                          |
| ldapLoginFilterMode           | 0                                          |
| ldapLoginFilterUsername       | 1                                          |
| ldapNestedGroups              | 0                                          |
| ldapOverrideMainServer        |                                            |
| ldapPagingSize                | 500                                        |
| ldapPort                      | 7636                                       |
| ldapQuotaAttribute            |                                            |
| ldapQuotaDefault              |                                            |
| ldapTLS                       | 0                                          |
| ldapUserDisplayName           | cn                                         |
| ldapUserDisplayName2          |                                            |
| ldapUserFilter                | (|(objectclass=posixAccount))              |
| ldapUserFilterGroups          |                                            |
| ldapUserFilterMode            | 0                                          |
| ldapUserFilterObjectclass     | posixAccount                               |
| ldapUuidGroupAttribute        | auto                                       |
| ldapUuidUserAttribute         | auto                                       |
| turnOffCertCheck              | 0                                          |
| turnOnPasswordChange          | 1                                          |
| useMemberOfToDetectMembership | 1                                          |
+-------------------------------+--------------------------------------------+

Client configuration

Client: nextcloud-client-git-nokde 231.eb3bba6
I also tried with nextcloud-client 2.3.2
Operating system: up-to-date Arch Linux

Logs

Web server error log

None

Nextcloud log (data/nextcloud.log)

sept. 10 13:15:05 sphinx3 ownCloud[8414]: {PHP} inet_pton(): Unrecognized address unix: at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#69
sept. 10 13:15:05 sphinx3 ownCloud[8414]: {PHP} inet_ntop(): Invalid in_addr value at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#77
sept. 10 13:15:18 sphinx3 ownCloud[8548]: {PHP} inet_pton(): Unrecognized address unix: at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#69
sept. 10 13:15:18 sphinx3 ownCloud[8548]: {PHP} inet_ntop(): Invalid in_addr value at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#77
sept. 10 13:15:35 sphinx3 ownCloud[8414]: {user_ldap} Bind failed: 49: Invalid credentials
sept. 10 13:15:35 sphinx3 ownCloud[8414]: {user_ldap} Bind failed: 49: Invalid credentials
sept. 10 13:15:35 sphinx3 ownCloud[8414]: {core} Login failed: 'yves' (Remote IP: 'unix:')
sept. 10 13:15:35 sphinx3 ownCloud[8414]: {PHP} inet_pton(): Unrecognized address unix: at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#69
sept. 10 13:15:35 sphinx3 ownCloud[8414]: {PHP} inet_ntop(): Invalid in_addr value at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#77
sept. 10 13:16:10 sphinx3 ownCloud[8563]: {PHP} inet_pton(): Unrecognized address unix: at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#69
sept. 10 13:16:10 sphinx3 ownCloud[8563]: {PHP} inet_ntop(): Invalid in_addr value at /usr/share/webapps/nextcloud/lib/private/Security/Normalizer/IpAddress.php#77

The above log lines seem to indicate a password problem. However, the same user+password works perfectly in the Web UI, although I find the login phase rather long (response times are OK after that).

@tYYGH
Copy link
Author

tYYGH commented Sep 10, 2017

Might be related to #3645 and #3762

@tYYGH
Copy link
Author

tYYGH commented Sep 11, 2017

Good news! I have been too quick in dismissing the “Login failed” log line. As I said, the user and password I gave are correct; however, the “Remote IP: 'unix:'” is the culprit and wreaks havoc in Nextcloud.

If anyone encounters this problem, in my case it lied in Nginx config. I wrongly assumed that a Unix socket was identified as localhost; that’s not the case. So I had to change from this:

listen unix:/run/https+.pp proxy_protocol;
set_real_ip_from 127.0.0.0/8;
set_real_ip_from ::1;
real_ip_header proxy_protocol;

to this:

listen unix:/run/https+.pp proxy_protocol;
set_real_ip_from unix:;
real_ip_header proxy_protocol;

Now it works perfectly, and fast!

@kissgyorgy
Copy link

This solved my problem too! Thanks.

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

No branches or pull requests

2 participants