CalDAV / CardDAV URLs no longer working after upgrading to 9.0
Steps to reproduce
- Run ownCloud 8.2.2-1.1 RPM from the official ownCloud yum repository with the "old" Calendar and Contacts app
- Upgrade to the new 9.0.0-1.1 RPM from the official ownCloud yum repository
Expected behaviour
Calendars and contacts should still be there and accessible through the web interface as well as the existing WebDAV endpoints
Actual behaviour
- Calendar data in the web interface only shows after specifically selecting a calendar, this is confusing.
- Contacts data in the web interface is gone ("No contacts in here"), even after running the new occ upgrade commands for calendars and contacts (which are not documented where I would expect them, in the official administrator manual). However, if I click "Add Contact" in the web interface, a list of my contacts appears below the button, but disappears again when I click around to reload the main contacts app interface where the listing should be.
- None of the endpoints - both the old /remote.php/caldav|carddav and the new /remote.php/dav/ work for me. I the logs, I see redirections happening to fully expanded URLs, but they always return a 404:
"PROPFIND /remote.php/carddav/addressbooks/284db192-041e-1029-8d1e-87d3446ede58/ HTTP/1.1" 404 289
"PROPFIND /remote.php/caldav/calendars/284db192-041e-1029-8d1e-87d3446ede58/ HTTP/1.1" 404 289
"PROPFIND /remote.php/dav/principals/users/my_login/ HTTP/1.1" 404 240
Server configuration
Operating system: CentOS 7.2
Web server: Apache 2.4.6
Database: MariaDB 5.5.44
PHP version: 5.4.16
ownCloud version: (see ownCloud admin page) 9.0.0
Updated from an older ownCloud or fresh install: Updated from 8.2.2
Where did you install ownCloud from: RPM from the official ownCloud yum repo
Signing status (ownCloud 9.0 and above): All clear
List of activated apps:
Enabled:
- calendar: 1.0
- comments: 0.2
- contacts: 1.0.0.0
- dav: 0.1.5
- encryption: 1.2.0
- federatedfilesharing: 0.1.0
- federation: 0.0.4
- files: 1.4.4
- files_pdfviewer: 0.8
- files_sharing: 0.9.1
- files_texteditor: 2.1
- files_versions: 1.2.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- gallery: 14.5.0
- notifications: 0.2.3
- provisioning_api: 0.4.1
- systemtags: 0.2
- templateeditor: 0.1
- updatenotification: 0.1.0
- user_ldap: 0.8.0
Disabled:
- activity
- external
- files_external
- files_trashbin
- user_external
The content of config/config.php:
{
"system": {
"instanceid": "XXX",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "\/var\/owncloud",
"dbtype": "mysql",
"version": "9.0.0.19",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"forcessl": true,
"theme": "",
"maintenance": false,
"loglevel": "2",
"log_rotate_size": 52428800,
"trusted_domains": [
"XXX"
],
"mail_smtpmode": "smtp",
"mail_from_address": "XXX",
"mail_domain": "XXX",
"mail_smtphost": "localhost",
"mail_smtpport": "25",
"ldapIgnoreNamingRules": false,
"secret": "***REMOVED SENSITIVE VALUE***",
"singleuser": false,
"appstore.experimental.enabled": false,
"updatechecker": false
}
}
Are you using external storage, if yes which one: no
Are you using encryption: yes
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
+-------------------------------+------------------------------------------------+
| Configuration | |
+-------------------------------+------------------------------------------------+
| hasMemberOfFilterSupport | 0 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | ou=xxx,dc=xxx,dc=xxx |
| ldapBaseGroups | dc=xxx,dc=xxx |
| ldapBaseUsers | ou=xxx,dc=xxx,dc=xxx |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | (&(|(objectclass=top))) |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | uniqueMember |
| ldapHost | 127.0.0.1 |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(|(objectclass=xxx))(cn=%uid)) |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 0 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayname |
| ldapUserDisplayName2 | |
| ldapUserFilter | (|(objectclass=xxx)) |
| ldapUserFilterGroups | |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | xxx |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| useMemberOfToDetectMembership | 0 |
+-------------------------------+------------------------------------------------+
Client configuration
Browser: Chromium 49.0.2623.75, Chrome 47.0.2526.80
Operating system: OS X 10.11.3
Logs
Web server error log
Insert your webserver log here
ownCloud log (data/owncloud.log)
{"reqId":"Vt-h5mSSkYFxuIM0F0TurgAAAAU","remoteAddr":"xxx","app":"PHP","message":"ldap_search(): 396 is not a valid ldap link resource at \/var\/www\/html\/owncloud\/apps\/user_ldap\/lib\/ldap.php#264","level":3,"time":"2016-03-09T08:42:14+00:00"}
{"reqId":"Vt-h5mSSkYFxuIM0F0TurgAAAAU","remoteAddr":"xxx","app":"PHP","message":"ldap_errno(): 396 is not a valid ldap link resource at \/var\/www\/html\/owncloud\/apps\/user_ldap\/lib\/ldap.php#264","level":3,"time":"2016-03-09T08:42:14+00:00"}
{"reqId":"Vt-h5mSSkYFxuIM0F0TurgAAAAU","remoteAddr":"xxx","app":"PHP","message":"ldap_error(): 396 is not a valid ldap link resource at \/var\/www\/html\/owncloud\/apps\/user_ldap\/lib\/ldap.php#264","level":3,"time":"2016-03-09T08:42:14+00:00"}
{"reqId":"Vt-h5mSSkYFxuIM0F0TurgAAAAU","remoteAddr":"xxx","app":"PHP","message":"ldap_errno(): 396 is not a valid ldap link resource at \/var\/www\/html\/owncloud\/apps\/user_ldap\/lib\/ldap.php#264","level":3,"time":"2016-03-09T08:42:14+00:00"}
{"reqId":"Vt-h5mSSkYFxuIM0F0TurgAAAAU","remoteAddr":"xxx","app":"user_ldap","message":"Error when searching: code ","level":3,"time":"2016-03-09T08:42:14+00:00"}
{"reqId":"Vt-h5mSSkYFxuIM0F0TurgAAAAU","remoteAddr":"xxx","app":"user_ldap","message":"Attempt for Paging? ","level":3,"time":"2016-03-09T08:42:14+00:00"}
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
cc @DeepDiver1975
Updated with user_ldap-related log entries that I see whenever I attempt to contact the server through CalDAV which results in a 404 from Apache. This could be a clue about incompatibilities related to the user_ldap module.
P.S.: The LDAP configurations dialog in the admin web interface show no errors when testing the configuration, btw. Obviously, there was no problem before doing the upgrade.
P.P.S.: The standard ownCloud Files functionality (e.g. using the ownCloud client software) or logging into the web interface is not affected for users stored in LDAP. All that still works as expected.
CC @blizzz for the LDAP part
@PVince81 old endpoints don't for me either with local users. Needed to switch to /remote.php/dav/
The old endpoints do work me on Android
For me the old and the new endpoints do not work. I have tested with Android (DAVDroid) and Thunderbird (Linux). DAVDroid can't find any calendars or address books. Thunderbird only shows a little yellow warning sign.
The old endpoints also do not work, tested with DAVDroid.
For me, remote.php/dav/calendars/USERNAME/CALENDAR_NAME works. However, in the upgrade process my old calendars (and contacts) somehow got lost. I think this is a major issue and should be fixed as quickly as possible.
I think, however, that this is an issue of the rewrite of the calendar and contacts apps.
Try this:
% curl -u $ocusername -X PROPFIND https://$ochost/remote.php/dav/calendars/$ocusername/
It should show you a list of calendars.
Then you can redo the same by adding the calendar name to the URL, in my case:
% curl -u $ocusername -X PROPFIND https://$ochost/remote.php/dav/calendars/$ocusername/perso
However, in the upgrade process my old calendars (and contacts) somehow got lost.
This isn't enough information to be able to fix it. Was there anything in the logs during the update ?
When I enter the full new endpoint https://my.server/remote.php/dav/ into BusyCal I get the following Apache log entries:
x.x.x.x - [email protected] [09/Mar/2016:09:56:40 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 207 1090
x.x.x.x - [email protected] [09/Mar/2016:09:56:40 +0000] "REPORT /remote.php/dav/principals/ HTTP/1.1" 200 768
and that's it. The owncloud.log has the entries reported in the issue description.
@PVince81 The manual curl invocation yields the same results as in my previous comment. The calendars are still there, though, they do show up in the web interface.
@dataflake The web interface is from the calendar GUI app: https://github.com/owncloud/calendar It already uses Caldav, so not sure why it wouldn't aknowledge the calendar's existence.
So far it is not clear whether it's a bug in the Caldav interface, the way the GUI does the request or something in the data isn't right.
Does the calendar app work correctly for non-LDAP users ? Try creating a new user and setting up calendars. Then do the same with a new LDAP user, setup new calendars.
If that works, then the problem is the migration of old calendars.
@dataflake was the calendar updated? should be 1.0 for OC 9, iirc.
@PVince81 curl command does not work for me aka does not show my calendars. If i try to connect to one calendar directly I get an error: does not exist.
Strange thing is: I can see my calendars in the web interface - I also created a new one for testing but i can't sync them.
All tested with an non-LDAP user.
@Grot4x open the browser's network console and see what PROPFIND calls are made. Often the calendar name in caldav is not the same as the display name, you probably used the wrong name. (I have a calendar called "test" internally but display name is "Main")
Also for those where the old endpoints don't work any more, try this:
MariaDB [owncloud]> select * from oc_appconfig where appid='core' and configkey like 'remote_cal%';
+-------+-----------------+---------------------------+
| appid | configkey | configvalue |
+-------+-----------------+---------------------------+
| core | remote_caldav | dav/appinfo/v1/caldav.php |
| core | remote_calendar | dav/appinfo/v1/caldav.php |
+-------+-----------------+---------------------------+
I think we get closer: I created a new user with a new calendar and it works! My old accounts+calendars still do not work. So seems like migration is the problem. @PVince81 I did that but even when i use a url out of the console it says: Node with name '$name' could not be found.
@Grot4x full log for errors please
If it's the migration, the question is "regular user" or "LDAP user" ? And then, maybe the old calendar data contained fields/value that made the migrator trip over. So need to find out what these values are.
Best would be to check the owncloud.log at the time of the update, whether warnings or exceptions were logged during update.
All my users are regular users. I will check owncloud log for errors with migration