-
Notifications
You must be signed in to change notification settings - Fork 10
LDAP Background sync crashes with LDAP_BACKGROUND_SYNC_INTERVAL set improperly #50
Comments
I did already fix this wekan/wekan@fff144a |
It doesn't look like any changes were made. For me, it still crashes when set to "500" (double quotes) |
I'm running wekan via systemd using an .env file to set the environment variables like so. Maybe that eats the quotes? 14:52:05 root@wekan /usr/local/wekan $ cat wekan-settings.env 14:59:00 root@wekan /usr/lib/systemd/system $ cat wekan.service [Service] [Install] |
Hmm, in my commit wekan/wekan@fff144a for empty values I did use single or double quotes. Maybe you have some quotes missing? Previously when I did service file, I did it this way:
But I have not used EnvironmentFile option yet. |
The "fix" I added is only about changing LDAP_BACKGROUND_SYNC_INTERVAL to empty string, because it seems to work with that setting. As mentioned at original pull request wekan/wekan#2555 , getting it working is a hack. I think it does not support setting LDAP_BACKGROUND_SYNC_INTERVAL to any other value. If supporting that would be needed, then most likely it would require some new pull request to enable that. |
Hi, I was on vacation, sorry. LDAP_BACKGROUND_SYNC_INTERVAL should be set to a string like "every 10 minute". The SyncedCron page points to the later.js documentation where this is explained. |
Do you mean optionally? Can default be empty string? |
@xet7 |
Thanks! I'll try out that tomorrow. |
Indeed, it works with the form "every 10 minutes". You can close this if you like, but it might be better to fail with a human readable error if the config setting cannot be parsed properly, rather than a crash stacktrace. |
Issue
With LDAP_BACKGROUND_SYNC_INTERVAL set, wekan fails to sync
Server Setup Information:
Problem description:
Also enable background sync via:
LDAP_BACKGROUND_SYNC=true
LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=true
LDAP_BACKGROUND_SYNC_INTERVAL=500
---> error occurs:
Jul 26 19:09:31 wekan Wekan: [INFO] Enabling LDAP Background Sync
Jul 26 19:09:31 wekan Wekan: Exception in callback of async function: TypeError: str.toLowerCase is not a function
Jul 26 19:09:31 wekan Wekan: at Object.later.parse.text (/usr/local/wekan/build-0/programs/server/npm/node_modules/meteor/percolate_synced-cron/node_modules/later/later.js:1506:34)
Jul 26 19:09:31 wekan Wekan: at Object.schedule (packages/wekan-ldap/server/sync.js:436:22)
Jul 26 19:09:31 wekan Wekan: at scheduleEntry (packages/percolate_synced-cron.js:126:24)
Jul 26 19:09:31 wekan Wekan: at packages/percolate_synced-cron.js:163:7
Jul 26 19:09:31 wekan Wekan: at Function..each..forEach (packages/underscore.js:147:22)
Jul 26 19:09:31 wekan Wekan: at packages/percolate_synced-cron.js:162:7
Jul 26 19:09:31 wekan Wekan: at Object.startup (packages/meteor.js:992:5)
Jul 26 19:09:31 wekan Wekan: at Object.SyncedCron.start (packages/percolate_synced-cron.js:160:10)
Jul 26 19:09:31 wekan Wekan: at addCronJobDebounced (packages/wekan-ldap/server/sync.js:4
The text was updated successfully, but these errors were encountered: