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

Setup LDAP Backend not possible #16194

Closed
thechonta opened this issue Jul 2, 2019 · 14 comments
Closed

Setup LDAP Backend not possible #16194

thechonta opened this issue Jul 2, 2019 · 14 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: ldap needs info stale Ticket or PR with no recent activity

Comments

@thechonta
Copy link

Operating system:Ubuntu 18.04
**Web server: nginx/1.14.0 (Ubuntu)
**Database:mariadb Ver 15.1
**PHP version:(PostgreSQL) 10.9
**Nextcloud version:16.0.1
Server is an Migration from mariadb to postgresql and apache to nginx.

Bug is related to #3074

require_once($_SERVER['DOCUMENT_ROOT'].'/lib/base.php');

This is needed if you wanna configure LDAP Backend for the first time.

 sudo -u www-data php /var/www/nextcloud/occ app:check-code user_ldap
Deprecated file found: /var/www/nextcloud/apps/user_ldap/appinfo/update.php - please use repair steps
App is not compliant

Something i would not expect from an official app. but with the Line up it will work.
Probably you will not be affected if the LDAP Backend is setup in a previous version.

the nginx error file contains something like that.

thrown in /var/www/nextcloud/apps/user_ldap/ajax/getConfiguration.php on line 28" while reading response header from upstream, client: 192.168.1.221, server: testcloud.domain.de, request: "POST /apps/user_ldap/ajax/getConfiguration.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "testcloud.domain.de"
2019/07/02 12:41:07 [error] 13438#13438: *92 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class 'OC_JSON' not found in /var/www/nextcloud/apps/user_ldap/ajax/wizard.php:32
Stack trace:
#0 {main}
  thrown in /var/www/nextcloud/apps/user_ldap/ajax/wizard.php on line 32" while reading response header from upstream, client: 192.168.1.221, server: testcloud.domain.de, request: "POST /apps/user_ldap/ajax/wizard.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "testcloud.domain.de"
@thechonta thechonta added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jul 2, 2019
@kesselb
Copy link
Contributor

kesselb commented Jul 2, 2019

cc @blizzz

version: '3'

volumes:
  nextcloud:

services:
  app:
    image: nextcloud
    ports:
      - 8080:80
    links:
      - ldap
    volumes:
      - nextcloud:/var/www/html
    restart: always

  ldap:
    image: rroemhild/test-openlda

Could not reproduce this issue with the above docker-compose.yml. Create a new nextcloud instance from scratch. Adding a new ldap backend works fine. Looks like some setup related issue.

@thechonta
Copy link
Author

The nextcloud is updated from 15.0.x

@kesselb
Copy link
Contributor

kesselb commented Jul 2, 2019

Please use the issue template next time. It is more difficult to reproduce your problem if half of the information is missing. Check if there is an update for the ldap app is available.

@thechonta
Copy link
Author

all apps are up to date, no updates available.

@kesselb
Copy link
Contributor

kesselb commented Jul 2, 2019

Maybe some requests are sent to the wrong endpoint. Let's try to investigate further ...

I will need your browser console log to investigate this issue. Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.

How to access your browser console (Click to expand)

Chrome

  • Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools.
  • Alternative method:
    1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
    2. Click the “console” tab.

Safari

  • Press CMD + ALT + I to open the Web Inspector.
  • See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.)

IE9

  1. Press F12 to open the developer tools.
  2. Click the “console” tab.

Firefox

  • Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs).
  • or, if Firebug is installed (recommended):
    1. Press F12 to open Firebug.
    2. Click on the “console” tab.

Opera

  1. Press CTRL + SHIFT + I to open Dragonfly.
  2. Click on the “console” tab.

@blizzz
Copy link
Member

blizzz commented Jul 30, 2019

@thechonta do you still have the issue? It rather seems somethings is strange with your setup, autoloading might be not working, also your added line should not be necessary.

@ghost
Copy link

ghost commented Aug 29, 2019

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Aug 29, 2019
@ghost ghost closed this as completed Sep 12, 2019
@nivadis
Copy link

nivadis commented Sep 8, 2020

as this issue doesn't reveal the cause i hope i can provide the needed info to get the real cause.

with the fix above all works good:

require_once($_SERVER['DOCUMENT_ROOT'].'/lib/base.php');

setup:
Server configuration
Operating system: nixos-20.03

Web server: nginx-1.16.1

Database: Version: PostgreSQL 11.7 on x86_64-pc-linux-gnu

PHP version: 7.3.20

Nextcloud version: 18.0.7 + 19.0.1 (tried both)

Updated from an older Nextcloud/ownCloud or fresh install: updated from 18.0.X

Where did you install Nextcloud from: nixpgks

Signing status: all good

Signing status
List of activated apps:

Enabled:
  - accessibility: 1.4.0
  - activity: 2.11.0
  - calendar: 2.0.4
  - cloud_federation_api: 1.1.0
  - comments: 1.8.0
  - contacts: 3.3.0
  - dav: 1.14.0
  - deck: 1.0.5
  - federatedfilesharing: 1.8.0
  - federation: 1.8.0
  - files: 1.13.1
  - files_pdfviewer: 1.7.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - files_videoplayer: 1.7.0
  - firstrunwizard: 2.7.0
  - forms: 2.0.4
  - groupfolders: 6.0.7
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - occweb: 0.0.7
  - password_policy: 1.8.0
  - photos: 1.0.0
  - polls: 1.4.3
  - privacy: 1.2.0
  - provisioning_api: 1.8.0
  - recommendations: 0.6.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - sharebymail: 1.8.0
  - support: 1.1.1
  - survey_client: 1.6.0
  - systemtags: 1.8.0
  - text: 2.0.0
  - theming: 1.9.0
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - user_ldap: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0

Nextcloud configuration:

Config report

{
    "system": {
        "apps_paths": [
            {
                "path": "\/data\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/data\/nextcloud\/store-apps",
                "url": "\/store-apps",
                "writable": true
            }
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "\/data\/skeleton",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "log_type": "syslog",
        "log_level": "2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "version": "18.0.7.1",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "loglevel": "2",
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "pipe",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "logfile": "\/data\/nextcloud\/data\/nextcloud.log",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpsecure": "tls",
        "trusted_domains": [
            "cloud-dev.EXAMPLEXXXX.de"
        ]
    },
    "apps": {
        "accessibility": {
            "installed_version": "1.4.0",
            "types": "",
            "enabled": "yes"
        },
        "activity": {
            "installed_version": "2.11.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "backgroundjob": {
            "lastjob": "6"
        },
        "calendar": {
            "installed_version": "2.0.4",
            "types": "",
            "enabled": "yes"
        },
        "cloud_federation_api": {
            "installed_version": "1.1.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "comments": {
            "installed_version": "1.8.0",
            "types": "logging",
            "enabled": "yes"
        },
        "contacts": {
            "installed_version": "3.3.0",
            "types": "",
            "enabled": "yes"
        },
        "core": {
            "installedat": "1592833226.09",
            "vendor": "nextcloud",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "public_files": "files_sharing\/public.php",
            "lastupdatedat": "1599566259",
            "backgroundjobs_mode": "cron",
            "shareapi_default_permission_canshare": "no",
            "lastcron": "1599567758",
            "enterpriseLogoChecked": "yes",
            "theming.variables": "5d77a90bcea65461786715122cf93587",
            "shareapi_default_internal_expire_date": "no",
            "lastupdateResult": "{\"version\":\"18.0.8.2\",\"versionstring\":\"Nextcloud 18.0.8\",\"url\":\"https:\\\/\\\/download.nextcloud.com\\\/server\\\/releases\\\/nextcloud-18.0.8.zip\",\"web\":\"https:\\\/\\\/docs.nextcloud.com\\\/server\\\/18\\\/admin_manual\\\/maintenance\\\/upgrade.html\",\"changes\":\"https:\\\/\\\/updates.nextcloud.com\\\/changelog_server\\\/?version=18.0.8\",\"autoupdater\":\"1\",\"eol\":\"0\"}",
            "shareapi_only_share_with_group_members": "no",
            "shareapi_enable_link_password_by_default": "yes",
            "shareapi_allow_share_dialog_user_enumeration": "yes",
            "shareapi_allow_links": "yes",
            "shareapi_default_permissions": "15",
            "shareapi_allow_resharing": "no",
            "oc.integritycheck.checker": "[]"
        },
        "dav": {
            "installed_version": "1.14.0",
            "types": "filesystem",
            "enabled": "yes",
            "buildCalendarSearchIndex": "yes",
            "buildCalendarReminderIndex": "yes",
            "regeneratedBirthdayCalendarsForYearFix": "yes"
        },
        "deck": {
            "types": "dav",
            "installed_version": "1.0.5",
            "enabled": "yes"
        },
        "federatedfilesharing": {
            "installed_version": "1.8.0",
            "types": "",
            "enabled": "yes"
        },
        "federation": {
            "installed_version": "1.8.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "files": {
            "installed_version": "1.13.1",
            "types": "filesystem",
            "enabled": "yes",
            "cronjob_scan_files": "500"
        },
        "files_pdfviewer": {
            "installed_version": "1.7.0",
            "types": "",
            "enabled": "yes"
        },
        "files_rightclick": {
            "installed_version": "0.15.2",
            "types": "",
            "enabled": "yes"
        },
        "files_sharing": {
            "installed_version": "1.10.1",
            "types": "filesystem",
            "enabled": "yes",
            "outgoing_server2server_share_enabled": "no"
        },
        "files_trashbin": {
            "installed_version": "1.8.0",
            "types": "filesystem,dav",
            "enabled": "yes"
        },
        "files_versions": {
            "installed_version": "1.11.0",
            "types": "filesystem,dav",
            "enabled": "yes"
        },
        "files_videoplayer": {
            "installed_version": "1.7.0",
            "types": "",
            "enabled": "yes"
        },
        "firstrunwizard": {
            "installed_version": "2.7.0",
            "types": "logging",
            "enabled": "yes"
        },
        "forms": {
            "types": "",
            "enabled": "yes",
            "installed_version": "2.0.4"
        },
        "groupfolders": {
            "enabled": "yes",
            "installed_version": "6.0.7",
            "types": "filesystem,dav"
        },
        "ldapcontacts": {
            "installed_version": "2.0.2",
            "types": "",
            "enabled": "no",
            "userLdapAttributes": "[{\"name\":\"title\",\"label\":\"Titel\"},{\"name\":\"givenname\",\"label\":\"Vorname\"},{\"name\":\"sn\",\"label\":\"Nachname\"},{\"name\":\"mail\",\"label\":\"Mail Adresse\"},{\"name\":\"telephonenumber\",\"label\":\"Telefon\"},{\"name\":\"labeleduri\",\"label\":\"Website\"},{\"name\":\"postaladdress\",\"label\":\"Adresse\"},{\"name\":\"roomnumber\",\"label\":\"Raumnummer\"}]"
        },
        "logreader": {
            "installed_version": "2.3.0",
            "types": "",
            "enabled": "yes",
            "relativedates": "1",
            "levels": "00111",
            "live": "1"
        },
        "lookup_server_connector": {
            "installed_version": "1.6.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "nextcloud_announcements": {
            "installed_version": "1.7.0",
            "types": "logging",
            "enabled": "yes",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200"
        },
        "notifications": {
            "installed_version": "2.6.0",
            "types": "logging",
            "enabled": "yes"
        },
        "oauth2": {
            "installed_version": "1.6.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "occweb": {
            "installed_version": "0.0.7",
            "types": "",
            "enabled": "yes"
        },
        "password_policy": {
            "installed_version": "1.8.0",
            "types": "",
            "enabled": "yes"
        },
        "photos": {
            "installed_version": "1.0.0",
            "types": "",
            "enabled": "yes"
        },
        "polls": {
            "installed_version": "1.4.3",
            "types": "",
            "enabled": "yes"
        },
        "privacy": {
            "installed_version": "1.2.0",
            "types": "",
            "enabled": "yes",
            "readableLocation": "de"
        },
        "provisioning_api": {
            "installed_version": "1.8.0",
            "types": "prevent_group_restriction",
            "enabled": "yes"
        },
        "recommendations": {
            "installed_version": "0.6.0",
            "types": "",
            "enabled": "yes"
        },
        "serverinfo": {
            "installed_version": "1.8.0",
            "types": "",
            "enabled": "yes"
        },
        "settings": {
            "installed_version": "1.0.0",
            "types": "",
            "enabled": "yes"
        },
        "sharebymail": {
            "installed_version": "1.8.0",
            "types": "filesystem",
            "enabled": "yes",
            "sendpasswordmail": "yes",
            "enforcePasswordProtection": "yes"
        },
        "support": {
            "types": "session",
            "enabled": "yes",
            "installed_version": "1.1.1",
            "SwitchUpdaterServerHasRun": "yes"
        },
        "survey_client": {
            "installed_version": "1.6.0",
            "types": "",
            "enabled": "yes",
            "last_sent": "1593256866",
            "last_report": "{\"id\":\"oclt14r43td1\",\"items\":[[\"server\",\"version\",\"18.0.6.0\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable_avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"\\\\OC\\\\Memcache\\\\APCu\"],[\"server\",\"memcache.distributed\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"none\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"cron\"],[\"php\",\"version\",\"7.3.16\"],[\"php\",\"memory_limit\",536870912],[\"php\",\"max_execution_time\",3600],[\"php\",\"upload_max_filesize\",536870912],[\"database\",\"type\",\"pgsql\"],[\"database\",\"version\",\"PostgreSQL 11.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.2.0, 64-bit\"],[\"database\",\"size\",13562527],[\"apps\",\"workflowengine\",\"2.0.0\"],[\"apps\",\"files_versions\",\"1.11.0\"],[\"apps\",\"password_policy\",\"1.8.0\"],[\"apps\",\"serverinfo\",\"1.8.0\"],[\"apps\",\"photos\",\"1.0.0\"],[\"apps\",\"files\",\"1.13.1\"],[\"apps\",\"logreader\",\"2.3.0\"],[\"apps\",\"survey_client\",\"1.6.0\"],[\"apps\",\"oauth2\",\"1.6.0\"],[\"apps\",\"sharebymail\",\"1.8.0\"],[\"apps\",\"files_rightclick\",\"0.15.2\"],[\"apps\",\"systemtags\",\"1.8.0\"],[\"apps\",\"updatenotification\",\"1.8.0\"],[\"apps\",\"provisioning_api\",\"1.8.0\"],[\"apps\",\"dav\",\"1.14.0\"],[\"apps\",\"accessibility\",\"1.4.0\"],[\"apps\",\"theming\",\"1.9.0\"],[\"apps\",\"lookup_server_connector\",\"1.6.0\"],[\"apps\",\"comments\",\"1.8.0\"],[\"apps\",\"firstrunwizard\",\"2.7.0\"],[\"apps\",\"cloud_federation_api\",\"1.1.0\"],[\"apps\",\"files_trashbin\",\"1.8.0\"],[\"apps\",\"files_pdfviewer\",\"1.7.0\"],[\"apps\",\"twofactor_backupcodes\",\"1.7.0\"],[\"apps\",\"privacy\",\"1.2.0\"],[\"apps\",\"federatedfilesharing\",\"1.8.0\"],[\"apps\",\"activity\",\"2.11.0\"],[\"apps\",\"nextcloud_announcements\",\"1.7.0\"],[\"apps\",\"files_sharing\",\"1.10.1\"],[\"apps\",\"viewer\",\"1.2.0\"],[\"apps\",\"text\",\"2.0.0\"],[\"apps\",\"recommendations\",\"0.6.0\"],[\"apps\",\"federation\",\"1.8.0\"],[\"apps\",\"settings\",\"1.0.0\"],[\"apps\",\"files_videoplayer\",\"1.7.0\"],[\"apps\",\"notifications\",\"2.6.0\"],[\"apps\",\"ldapcontacts\",\"2.0.2\"],[\"apps\",\"user_ldap\",\"1.8.0\"],[\"apps\",\"support\",\"1.1.1\"],[\"apps\",\"contacts\",\"3.3.0\"],[\"apps\",\"forms\",\"1.1.1\"],[\"apps\",\"calendar\",\"2.0.3\"],[\"stats\",\"num_files\",189],[\"stats\",\"num_users\",5],[\"stats\",\"num_storages\",13],[\"stats\",\"num_storages_local\",1],[\"stats\",\"num_storages_home\",12],[\"stats\",\"num_storages_other\",0],[\"stats\",\"num_comments\",0],[\"stats\",\"num_comment_markers\",0],[\"stats\",\"num_systemtags\",0],[\"stats\",\"num_systemtags_mappings\",0],[\"files_sharing\",\"num_shares\",0],[\"files_sharing\",\"num_shares_user\",0],[\"files_sharing\",\"num_shares_groups\",0],[\"files_sharing\",\"num_shares_link\",0],[\"files_sharing\",\"num_shares_link_no_password\",0],[\"files_sharing\",\"num_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"encryption\",\"enabled\",\"no\"],[\"encryption\",\"default_module\",\"no\"]]}"
        },
        "systemtags": {
            "installed_version": "1.8.0",
            "types": "logging",
            "enabled": "yes"
        },
        "text": {
            "installed_version": "2.0.0",
            "types": "dav",
            "enabled": "yes",
            "workspace_available": "0"
        },
        "theming": {
            "installed_version": "1.9.0",
            "types": "logging",
            "enabled": "yes",
            "url": "***REMOVED SENSITIVE VALUE***",
            "backgroundMime": "backgroundColor",
            "logoMime": "image\/png",
            "cachebuster": "19",
            "name": "EXAMPLEXXXX Nextcloud",
            "logoheaderMime": "image\/png",
            "color": "#F0FFF4"
        },
        "twofactor_backupcodes": {
            "installed_version": "1.7.0",
            "types": "",
            "enabled": "yes"
        },
        "updatenotification": {
            "installed_version": "1.8.0",
            "types": "",
            "enabled": "yes",
            "forms": "2.0.4",
            "groupfolders": "6.0.7",
            "core": "18.0.8.2",
            "update_check_errors": "1",
            "calendar": "2.0.4",
            "deck": "1.0.5"
        },
        "user_ldap": {
            "installed_version": "1.8.0",
            "types": "authentication",
            "enabled": "yes",
            "background_sync_interval": "43200",
            "s01ldap_backup_host": "",
            "s01ldap_port": "636",
            "s01ldap_quota_attr": "",
            "s01ldap_cache_ttl": "600",
            "s01home_folder_naming_rule": "",
            "s01ldap_turn_off_cert_check": "0",
            "s01ldap_attributes_for_user_search": "",
            "s01ldap_attributes_for_group_search": "",
            "s01ldap_expert_uuid_user_attr": "",
            "s01ldap_group_filter_mode": "0",
            "s01ldap_expert_uuid_group_attr": "",
            "s01use_memberof_to_detect_membership": "1",
            "s01last_jpegPhoto_lookup": "0",
            "s01ldap_nested_groups": "0",
            "s01ldap_paging_size": "500",
            "s01ldap_turn_on_pwd_change": "0",
            "s01ldap_experienced_admin": "0",
            "s01ldap_dynamic_group_member_url": "",
            "s01ldap_default_ppolicy_dn": "",
            "s01ldap_user_avatar_rule": "default",
            "s01ldap_ext_storage_home_attribute": "",
            "s01ldap_expert_username_attr": "uid",
            "s01ldap_dn": "cn=nextcloud,ou=dsa,dc=EXAMPLEXXXX,dc=de",
            "s01ldap_agent_password": "***REMOVED SENSITIVE VALUE***",
            "s01ldap_base": "dc=EXAMPLEXXXX,dc=de",
            "s01ldap_base_users": "dc=EXAMPLEXXXX,dc=de",
            "s01ldap_base_groups": "dc=EXAMPLEXXXX,dc=de",
            "s01ldap_tls": "0",
            "s01ldap_loginfilter_email": "1",
            "cleanUpJobOffset": "0",
            "s01ldap_userfilter_objectclass": "inetOrgPerson",
            "s01ldap_login_filter": "(&(&(|(objectclass=inetOrgPerson))(|(memberof=cn=nextcloudusers,ou=groups,dc=EXAMPLEXXXX,dc=de)))(|(uid=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))))",
            "s01has_memberof_filter_support": "1",
            "s01ldap_loginfilter_attributes": "",
            "s01ldap_configuration_active": "1",
            "s01ldap_userfilter_groups": "nextcloudusers",
            "s01ldap_groupfilter_objectclass": "gosaGroupOfNames\ngroupOfNames",
            "s01ldap_userlist_filter": "(&(|(objectclass=inetOrgPerson))(|(memberof=cn=nextcloudusers,ou=groups,dc=EXAMPLEXXXX,dc=de)))",
            "s01ldap_email_attr": "mail",
            "s01ldap_group_filter": "(&(|(objectclass=gosaGroupOfNames)(objectclass=groupOfNames)))",
            "s01_lastChange": "1599566280",
            "s01ldap_display_name": "cn",
            "s01ldap_group_member_assoc_attribute": "member",
            "background_sync_prefix": "s01",
            "s01ldap_backup_port": "",
            "s01ldap_override_main_server": "",
            "s01ldap_user_filter_mode": "0",
            "background_sync_offset": "0",
            "s01ldap_login_filter_mode": "0",
            "s01ldap_loginfilter_username": "1",
            "s01ldap_groupfilter_groups": "",
            "s01ldap_gid_number": "gidNumber",
            "s01ldap_user_display_name_2": "",
            "s01ldap_group_display_name": "cn",
            "s01ldap_quota_def": "",
            "s01ldap_host": "ldaps:\/\/ldap.EXAMPLEXXXX.de"
        },
        "viewer": {
            "installed_version": "1.2.0",
            "types": "",
            "enabled": "yes"
        },
        "workflowengine": {
            "installed_version": "2.0.0",
            "types": "filesystem",
            "enabled": "yes"
        }
    }
}

Are you using external storage, if yes which one: local
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)
LDAP config

Client configuration
Browser: Chrome/safari/etc.

Operating system: MacOs 10.15.6

Logs
Web server error log
when opening url /settings/admin/ldap:

Sep 08 14:17:52 cloud-dev nginx[2479]: 2020/09/08 14:17:52 [error] 2483#2483: *782 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class 'OC_JSON' not found in /nix/store/83lmfh5bh69zwnhz177rfzf1ikqvg806-nextcloud-18.0.7/apps/user_ldap/ajax/getConfiguration.php:29
Sep 08 14:17:52 cloud-dev nginx[2479]: Stack trace:
Sep 08 14:17:52 cloud-dev nginx[2479]: #0 {main}
Sep 08 14:17:52 cloud-dev nginx[2479]:   thrown in /nix/store/83lmfh5bh69zwnhz177rfzf1ikqvg806-nextcloud-18.0.7/apps/user_ldap/ajax/getConfiguration.php on line 29" while reading response header from upstream, client: xxxx, server: xxxx, request: "POST /apps/user_ldap/ajax/getConfiguration.php HTTP/2.0", upstream: "fastcgi://unix:/run/phpfpm/nextcloud.sock:", host: "XXXX"

OCC check APP:

occ app:check-code user_ldap
Analysing /data/nextcloud/apps/user_ldap/lib/Group_LDAP.php
 7 errors
    line  207: OCP\Util::writeLog - Method of deprecated class must not be called
    line  295: != - is discouraged
    line  698: OCP\Util::writeLog - Method of deprecated class must not be called
    line  741: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1024: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1039: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1130: != - is discouraged
Analysing /data/nextcloud/apps/user_ldap/lib/Wizard.php
 8 errors
    line  303: OCP\Util::writeLog - Method of deprecated class must not be called
    line  683: OCP\Util::writeLog - Method of deprecated class must not be called
    line  706: OCP\Util::writeLog - Method of deprecated class must not be called
    line  851: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1028: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1048: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1067: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1082: OCP\Util::writeLog - Method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/LogWrapper.php
 1 errors
    line   38: OCP\Util::writeLog - Method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/Access.php
 18 errors
    line  190: OCP\Util::writeLog - Method of deprecated class must not be called
    line  198: OCP\Util::writeLog - Method of deprecated class must not be called
    line  253: OCP\Util::writeLog - Method of deprecated class must not be called
    line  277: OCP\Util::writeLog - Method of deprecated class must not be called
    line  283: OCP\Util::writeLog - Method of deprecated class must not be called
    line  369: OCP\Util::writeLog - Method of deprecated class must not be called
    line  578: OCP\Util::writeLog - Method of deprecated class must not be called
    line  585: OCP\Util::writeLog - Method of deprecated class must not be called
    line  644: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1122: == - is discouraged
    line 1135: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1141: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1173: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1185: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1258: OCP\Util::writeLog - Method of deprecated class must not be called
    line 1572: OCP\Util::writeLog - Method of deprecated class must not be called
    line 2055: OCP\Util::writeLog - Method of deprecated class must not be called
    line 2086: OCP\Util::writeLog - Method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/Controller/RenewPasswordController.php
 1 errors
    line  144: OC_User - Static method of private class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/UserPluginManager.php
 1 errors
    line   80: == - is discouraged
Analysing /data/nextcloud/apps/user_ldap/lib/User/User.php
 1 errors
    line  575: OC_Helper - Static method of private class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/Jobs/UpdateGroups.php
 17 errors
    line   64: OCP\Util::writeLog - Method of deprecated class must not be called
    line   70: OCP\Util::writeLog - Method of deprecated class must not be called
    line   80: OCP\Util::writeLog - Method of deprecated class must not be called
    line   95: OCP\Util::writeLog - Method of deprecated class must not be called
    line   96: OC_DB - Static method of private class must not be called
    line  108: OCP\Util::writeLog - Method of deprecated class must not be called
    line  115: OCP\Util::writeLog - Method of deprecated class must not be called
    line  124: OCP\Util::writeLog - Method of deprecated class must not be called
    line  133: OCP\Util::writeLog - Method of deprecated class must not be called
    line  134: OC_DB - Static method of private class must not be called
    line  140: OCP\Util::writeLog - Method of deprecated class must not be called
    line  146: OCP\Util::writeLog - Method of deprecated class must not be called
    line  155: OCP\Util::writeLog - Method of deprecated class must not be called
    line  156: OC_DB - Static method of private class must not be called
    line  162: OCP\Util::writeLog - Method of deprecated class must not be called
    line  167: OCP\Util::writeLog - Method of deprecated class must not be called
    line  215: OC_DB - Static method of private class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/Connection.php
 12 errors
    line  209: OCP\Util::writeLog - Method of deprecated class must not be called
    line  380: OCP\Util::writeLog - Method of deprecated class must not be called
    line  407: OCP\Util::writeLog - Method of deprecated class must not be called
    line  450: OCP\Util::writeLog - Method of deprecated class must not be called
    line  465: OCP\Util::writeLog - Method of deprecated class must not be called
    line  478: OCP\Util::writeLog - Method of deprecated class must not be called
    line  488: OCP\Util::writeLog - Method of deprecated class must not be called
    line  536: OCP\Util::writeLog - Method of deprecated class must not be called
    line  546: OCP\Util::writeLog - Method of deprecated class must not be called
    line  556: OCP\Util::writeLog - Method of deprecated class must not be called
    line  560: OCP\Util::writeLog - Method of deprecated class must not be called
    line  673: OCP\Util::writeLog - Method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/FilesystemHelper.php
 1 errors
    line   45: OC_Util - Static method of private class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/User_LDAP.php
 4 errors
    line  183: Util::writeLog - Method of deprecated class must not be called
    line  269: Util::writeLog - Method of deprecated class must not be called
    line  278: Util::writeLog - Method of deprecated class must not be called
    line  356: Util::writeLog - Method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/Helper.php
 1 errors
    line  158: OC_DB - Static method of private class must not be called
Analysing /data/nextcloud/apps/user_ldap/lib/GroupPluginManager.php
 1 errors
    line   70: == - is discouraged
Analysing /data/nextcloud/apps/user_ldap/appinfo/app.php
 1 errors
    line   56: OC_User - Static method of private class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/wizard.php
 15 errors
    line   32: OC_JSON - Static method of deprecated class must not be called
    line   33: OC_JSON - Static method of deprecated class must not be called
    line   34: OC_JSON - Static method of deprecated class must not be called
    line   39: OC_JSON - Static method of deprecated class must not be called
    line   45: OC_JSON - Static method of deprecated class must not be called
    line   98: OC_JSON - Static method of deprecated class must not be called
    line  102: OC_JSON - Static method of deprecated class must not be called
    line  105: OC_JSON - Static method of deprecated class must not be called
    line  114: OC_JSON - Static method of deprecated class must not be called
    line  118: OC_JSON - Static method of deprecated class must not be called
    line  121: OC_JSON - Static method of deprecated class must not be called
    line  130: OC_JSON - Static method of deprecated class must not be called
    line  137: OC_JSON - Static method of deprecated class must not be called
    line  145: OC_JSON - Static method of deprecated class must not be called
    line  148: OC_JSON - Static method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/clearMappings.php
 5 errors
    line   31: OC_JSON - Static method of deprecated class must not be called
    line   32: OC_JSON - Static method of deprecated class must not be called
    line   33: OC_JSON - Static method of deprecated class must not be called
    line   57: OC_JSON - Static method of deprecated class must not be called
    line   59: OC_JSON - Static method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/getConfiguration.php
 4 errors
    line   29: OC_JSON - Static method of deprecated class must not be called
    line   30: OC_JSON - Static method of deprecated class must not be called
    line   31: OC_JSON - Static method of deprecated class must not be called
    line   41: OC_JSON - Static method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/setConfiguration.php
 4 errors
    line   29: OC_JSON - Static method of deprecated class must not be called
    line   30: OC_JSON - Static method of deprecated class must not be called
    line   31: OC_JSON - Static method of deprecated class must not be called
    line   50: OC_JSON - Static method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/getNewServerConfigPrefix.php
 4 errors
    line   27: OC_JSON - Static method of deprecated class must not be called
    line   28: OC_JSON - Static method of deprecated class must not be called
    line   29: OC_JSON - Static method of deprecated class must not be called
    line   51: OC_JSON - Static method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/deleteConfiguration.php
 5 errors
    line   29: OC_JSON - Static method of deprecated class must not be called
    line   30: OC_JSON - Static method of deprecated class must not be called
    line   31: OC_JSON - Static method of deprecated class must not be called
    line   36: OC_JSON - Static method of deprecated class must not be called
    line   39: OC_JSON - Static method of deprecated class must not be called
Analysing /data/nextcloud/apps/user_ldap/ajax/testConfiguration.php
 8 errors
    line   31: OC_JSON - Static method of deprecated class must not be called
    line   32: OC_JSON - Static method of deprecated class must not be called
    line   33: OC_JSON - Static method of deprecated class must not be called
    line   72: OC_JSON - Static method of deprecated class must not be called
    line   76: OC_JSON - Static method of deprecated class must not be called
    line   79: OC_JSON - Static method of deprecated class must not be called
    line   83: OC_JSON - Static method of deprecated class must not be called
    line   87: OC_JSON - Static method of deprecated class must not be called
Deprecated file found: /data/nextcloud/apps/user_ldap/appinfo/update.php - please use repair steps
App is not compliant

Browser log:

jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 1.4.1
ProxyBus.js:65 Proxying an event bus of version 1.1.2 with 0.2.1
t @ ProxyBus.js:65
(anonymous) @ index.js:20
n @ bootstrap:19
(anonymous) @ requesttoken.js:11
n @ bootstrap:19
(anonymous) @ index.js:25
n @ bootstrap:19
(anonymous) @ client.js:12
n @ bootstrap:19
(anonymous) @ notifications.js?v=73c51c60-19:21
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ notifications.js?v=73c51c60-19:1
globals.js:66 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20
ne @ globals.js:66
get @ globals.js:96
e.default @ no-conflict.js:8
(anonymous) @ handlebars.runtime.js:60
n @ bootstrap:19
(anonymous) @ runtime.js:3
n @ bootstrap:19
(anonymous) @ file.handlebars:1
n @ bootstrap:19
(anonymous) @ richObjectStringParser.js:13
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ notifications.js?v=73c51c60-19:1

@blizzz
Copy link
Member

blizzz commented Sep 8, 2020

Sep 08 14:17:52 cloud-dev nginx[2479]: 2020/09/08 14:17:52 [error] 2483#2483: *782 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'OC_JSON' not found in /nix/store/83lmfh5bh69zwnhz177rfzf1ikqvg806-nextcloud-18.0.7/apps/user_ldap/ajax/getConfiguration.php:29

Must be a setup issue as the class is there. Did ye compare the nginx config? https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html

@nivadis
Copy link

nivadis commented Sep 8, 2020

you are right. the nixos does nginx config wrong:
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/web-apps/nextcloud.nix
the location settings for / and .php are wrong for nc18 + nc19. -> seems to be the settings from nextcloud20, so with nextcloud20 nginx settings user_ldap will make problems.

seems written in https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
latest meens here nc20

@blizzz
Copy link
Member

blizzz commented Sep 8, 2020

yes, latest refers to 20 for the time being.

and, hey, +1 for Tocotronic 🎸

Ma27 added a commit to Ma27/nixpkgs that referenced this issue Sep 10, 2020
It seems as I misconfigured `nginx` for certain cases such as the
`ldap`-plugin[1] in 42f6244. This patch
fixes the `nginx`-config to match the upstream recommendations[2].

Also added a comment to the module to remind myself to ensure that
`nginx` will work with both v19 and v20 as soon as the latter is
released and can be packaged in `nixpkgs`.

Co-authored-by: nivadis <nivadis@users.noreply.github.com>

[1] nextcloud/server#16194 (comment)
[2] https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html
Ma27 added a commit to NixOS/nixpkgs that referenced this issue Oct 4, 2020
It seems as I misconfigured `nginx` for certain cases such as the
`ldap`-plugin[1] in 42f6244. This patch
fixes the `nginx`-config to match the upstream recommendations[2].

Also added a comment to the module to remind myself to ensure that
`nginx` will work with both v19 and v20 as soon as the latter is
released and can be packaged in `nixpkgs`.

Co-authored-by: nivadis <nivadis@users.noreply.github.com>

[1] nextcloud/server#16194 (comment)
[2] https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html

(cherry picked from commit 8d8871c)
Ma27 added a commit to NixOS/nixpkgs that referenced this issue Oct 4, 2020
It seems as I misconfigured `nginx` for certain cases such as the
`ldap`-plugin[1] in 42f6244. This patch
fixes the `nginx`-config to match the upstream recommendations[2].

Also added a comment to the module to remind myself to ensure that
`nginx` will work with both v19 and v20 as soon as the latter is
released and can be packaged in `nixpkgs`.

Co-authored-by: nivadis <nivadis@users.noreply.github.com>

[1] nextcloud/server#16194 (comment)
[2] https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html

(cherry picked from commit 8d8871c)
@JanBoehme
Copy link

Hi,

the situation seems to be the same when using NC 20 under Ubuntu 20.04.1 with the nginx config under https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html. Using the config for https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html the error is gone and I can set up the LDAP configuration.

Which part of the config could be causing this?

Best: Jan.

@kesselb
Copy link
Contributor

kesselb commented Oct 12, 2020

@JanBoehme subscribe to nextcloud/documentation#2197.

@viharm
Copy link

viharm commented Dec 14, 2020

I've recently tried to install v20.0.2 on Debian 10 using the Nginx instructions in the latest documentation. I encountered the same error and found HTTP 500 error in my browser console.

I then added the directives for legacy compatibility shown here.

It works after the fix.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: ldap needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

6 participants