jspricke / radicale-remind

Radicale storage backends for Remind and Abook
GNU General Public License v3.0
40 stars 4 forks source link

collections not created #24

Closed gour closed 2 years ago

gour commented 2 years ago

Hello,

Radicale seems to work properly:

Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] Skipped missing config file '/etc/radicale/config'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] Loaded config file '/home/atmarama/.config/radicale/config'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] Loaded command line arguments
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] Starting Radicale
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] auth type is 'radicale.auth.htpasswd'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] storage type is 'radicale_remind'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] rights type is 'radicale.rights.from_file'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] web type is 'radicale.web.internal'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] Listening on '[127.0.0.1]:62013'
Jul 08 13:31:14 s30.wservices.ch env[439651]: [2022-07-08 11:31:14 +0000] [439651] [INFO] Radicale server ready

but although I (uni)synced my files with the server no collections are created?

Here is my config file:

[server]
# Bind all addresses
hosts = 127.0.0.1:62013

[auth]
type = htpasswd
htpasswd_filename = ~/.config/radicale/users
htpasswd_encryption = md5

[rights]
type = from_file
file = /home/atmarama/.config/radicale/rights

[storage]
type = radicale_remind
filesystem_folder = /home/atmarama/radicale/collections
remind_file = ~/radicale/reminders
abook_file = ~/radicale/abook/addressbook
task_folder = ~/radicale/task

Any hint?

gour commented 2 years ago

Just wonder if the remind on the server and on my local machine have to be the same version?

jspricke commented 2 years ago

Can you please ask questions on the remind@ mailing list? This is an issue tracker for bugs in the software.

Please share your Remind files (a minimal example showing the problem, uploading them here is fine as the bug is there now, anyhow).

Just wonder if the remind on the server and on my local machine have to be the same version?

no, as long as the version is compatible with python-remind and your Remind files.

gour commented 2 years ago

Can you please ask questions on the remind@ mailing list? This is an issue tracker for bugs in the software.

OK. I was not sure if the list is appropriate for python-related stuff...

Please share your Remind files (a minimal example showing the problem, uploading them here is fine as the bug is there now, anyhow).

Attached (as *.txt). reminders.txt test.txt

no, as long as the version is compatible with python-remind and your Remind files.

OK.

gour commented 2 years ago

When I try to access reminders URL I get 404 with the following debug output:

Jul 08 14:25:54 s30.wservices.ch env[456310]:  'wsgi.run_once': False,
Jul 08 14:25:54 s30.wservices.ch env[456310]:  'wsgi.url_scheme': 'http',
Jul 08 14:25:54 s30.wservices.ch env[456310]:  'wsgi.version': (1, 0)}
Jul 08 14:25:54 s30.wservices.ch env[456310]: [2022-07-08 12:25:54 +0000] [456310/Thread-33] [DEBUG] Base prefix (from SCRIPT_NAME): ''
Jul 08 14:25:54 s30.wservices.ch env[456310]: [2022-07-08 12:25:54 +0000] [456310/Thread-33] [DEBUG] Sanitized path: '/~/radicale/reminders/'
Jul 08 14:25:54 s30.wservices.ch env[456310]: [2022-07-08 12:25:54 +0000] [456310/Thread-33] [INFO] Successful login: 'atmarama'
Jul 08 14:25:54 s30.wservices.ch env[456310]: [2022-07-08 12:25:54 +0000] [456310/Thread-33] [DEBUG] Rule 'atmarama':'~/radicale/reminders' matches '.*':'.*' from section 'root'
Jul 08 14:25:54 s30.wservices.ch env[456310]: [2022-07-08 12:25:54 +0000] [456310/Thread-33] [DEBUG] Response content:
Jul 08 14:25:54 s30.wservices.ch env[456310]: The requested resource could not be found.
Jul 08 14:25:54 s30.wservices.ch env[456310]: [2022-07-08 12:25:54 +0000] [456310/Thread-33] [INFO] GET response status for '/~/radicale/reminders/' in 0.005 seconds: 404 Not Found

so I wonder how is that Sanitized path: '/~/radicale/reminders/' constructed and what should be according to my setup since it does not look good to me?

jspricke commented 2 years ago

The problem was that all entries had a color (SET $DefaultColor "255 255 51"). I've fixed this here:

https://github.com/jspricke/python-remind/commit/be8e79f1f669ac654856ce55e3ff337467568ca6

Note that the git version needs Python 3.10 so you may want to apply the fix in your local source.

When I try to access reminders URL I get 404 with the following debug output:

Can you please share the command line as well?

I guess the tilde (~) in your config is not evaluated, please try with the full path.

gour commented 2 years ago

The problem was that all entries had a color (SET $DefaultColor "255 255 51"). I've fixed this here:

jspricke/python-remind@be8e79f

Note that the git version needs Python 3.10 so you may want to apply the fix in your local source.

OK, I've fixed it in the source.

Now I see see that test.rem was created.

Can you please share the command line as well?

I am trying straight from the Radicale's admin...URL and debug output is:

Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [DEBUG] Base prefix (from SCRIPT_NAME): ''
Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [DEBUG] Sanitized path: '/home/atmarama/radicale/test.rem/'
Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [INFO] Successful login: 'atmarama'
Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [DEBUG] Rule 'atmarama':'home/atmarama/radicale/test.rem' matches '.*':'.*' from section 'root'
Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [DEBUG] Response content:
Jul 08 15:45:24 s30.wservices.ch env[513924]: The requested resource could not be found.
Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [INFO] GET response status for '/home/atmarama/radicale/test.rem/' in 0.003 seconds: 404 Not Found

so, Sanitized path: '/home/atmarama/radicale/test.rem/ contains extra /?

If I try to access https://radicale.atmarama.net/home/atmarama/radicale/test.rem I get:

Jul 08 15:47:20 s30.wservices.ch env[513924]: [2022-07-08 13:47:20 +0000] [513924/Thread-35] [DEBUG] Base prefix (from SCRIPT_NAME): ''
Jul 08 15:47:20 s30.wservices.ch env[513924]: [2022-07-08 13:47:20 +0000] [513924/Thread-35] [DEBUG] Sanitized path: '/home/atmarama/radicale/test.rem'
Jul 08 15:47:20 s30.wservices.ch env[513924]: [2022-07-08 13:47:20 +0000] [513924/Thread-35] [INFO] Successful login: 'atmarama'
Jul 08 15:47:20 s30.wservices.ch env[513924]: [2022-07-08 13:47:20 +0000] [513924/Thread-35] [DEBUG] Rule 'atmarama':'home/atmarama/radicale/test.rem' matches '.*':'.*' from section 'root'
Jul 08 15:47:20 s30.wservices.ch env[513924]: [2022-07-08 13:47:20 +0000] [513924/Thread-35] [DEBUG] Response content:
Jul 08 15:47:20 s30.wservices.ch env[513924]: The requested resource could not be found.
Jul 08 15:47:20 s30.wservices.ch env[513924]: [2022-07-08 13:47:20 +0000] [513924/Thread-35] [INFO] GET response status for '/home/atmarama/radicale/test.rem' in 0.003 seconds: 404 Not Found

Moreover, filesystem_folder = /home/atmarama/radicale/collections is not created??

I guess the tilde (~) in your config is not evaluated, please try with the full path.

Changed, but get the above behavior...

jspricke commented 2 years ago

Moreover, filesystem_folder = /home/atmarama/radicale/collections is not created??

try:

filesystem_folder = /home/atmarama/radicale

filesystem_folder is the base folder for your files, so if remind_file = /home/atmarama/radicale/reminders is the reminders.txt from above then filesystem_folder will sanitize the first part.

Sanitized path: '/home/atmarama/radicale/test.rem/ contains extra /?

Correct, but only for the CalDAV URL.

Jul 08 15:45:24 s30.wservices.ch env[513924]: [2022-07-08 13:45:24 +0000] [513924/Thread-34] [DEBUG] Rule 'atmarama':'home/atmarama/radicale/test.rem' matches '.':'.' from section 'root'

can you share your Radicale rights file (/home/atmarama/.config/radicale/rights)?

gour commented 2 years ago

try:


filesystem_folder = /home/atmarama/radicale
``

I just wanted to ask why in the example there is: filesystem_folder = /home`` instead of e.g.filesystem_folder = /home/user'. :smile:

filesystem_folder is the base folder for your files, so if remind_file = /home/atmarama/radicale/reminders is the reminders.txt from above then filesystem_folder will sanitize the first part.

OK. Got it.

Now I get:

Jul 08 16:46:22 s30.wservices.ch env[551052]: [2022-07-08 14:46:22 +0000] [551052/Thread-3] [DEBUG] Sanitized path: '/reminders/'
Jul 08 16:46:22 s30.wservices.ch env[551052]: [2022-07-08 14:46:22 +0000] [551052/Thread-3] [INFO] Successful login: 'atmarama'
Jul 08 16:46:22 s30.wservices.ch env[551052]: [2022-07-08 14:46:22 +0000] [551052/Thread-3] [DEBUG] Rule 'atmarama':'reminders' matches '.*':'.*' from section 'root'
Jul 08 16:46:22 s30.wservices.ch env[551052]: [2022-07-08 14:46:22 +0000] [551052/Thread-3] [DEBUG] Response content:
Jul 08 16:46:22 s30.wservices.ch env[551052]: Directory listings are not supported.
Jul 08 16:46:22 s30.wservices.ch env[551052]: [2022-07-08 14:46:22 +0000] [551052/Thread-3] [INFO] GET response status for '/reminders/' in 0.003 seconds: 403 Forbidden

Correct, but only for the CalDAV URL.

OK.

can you share your Radicale rights file (/home/atmarama/.config/radicale/rights)?

[root]
user: .*
collection: .*
permissions: RrWw
jspricke commented 2 years ago

just tested, filesystem_folder = /home/atmarama should work, sorry.

gour commented 2 years ago

just tested, filesystem_folder = /home/atmarama should work, sorry.

Thank you for being so patient with me!

Now it works...with one strange thing - if I enable task_folder, then the Radicale can't start:

Jul 08 17:19:16 s30.wservices.ch systemd[512211]: radicale.service: Scheduled restart job, restart counter is at 5.
Jul 08 17:19:16 s30.wservices.ch systemd[512211]: Stopped A simple CalDAV (calendar) and CardDAV (contact) server.
Jul 08 17:19:16 s30.wservices.ch systemd[512211]: radicale.service: Start request repeated too quickly.
Jul 08 17:19:16 s30.wservices.ch systemd[512211]: radicale.service: Failed with result 'exit-code'.
Jul 08 17:19:16 s30.wservices.ch systemd[512211]: Failed to start A simple CalDAV (calendar) and CardDAV (contact) server.

Any clue?

jspricke commented 2 years ago

Can you run radicale -D from the command line and paste the output?

gour commented 2 years ago

Can you run radicale -D from the command line and paste the output?

Ahh, I forgot that taskwarrior is not installed on the server. :-(

gour commented 2 years ago

Compiled my own version and now it seems that everything is OK, iow. debug time is over and time for real testing. :-)

Thanks a lot for your assistance!

jspricke commented 2 years ago

Closing then.