Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

error with starting radicale #894

Closed
peter33826 opened this issue Nov 16, 2018 · 42 comments
Closed

error with starting radicale #894

peter33826 opened this issue Nov 16, 2018 · 42 comments

Comments

@peter33826
Copy link

peter33826 commented Nov 16, 2018

Hi,
I have problems starting radicale 2.1 automatically on Lubuntu 18.04.

Directly after reboot systemctl status radicale says this:

radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
Loaded: loaded (/etc/systemd/system/radicale.service; enabled; vendor preset: enabled)
Active: activating (start) since Fri 2018-11-16 22:41:35 CET; 299ms ago
Cntrl PID: 1040 (python3)
Tasks: 1 (limit: 1824)
CGroup: /system.slice/radicale.service
└─1040 python3 -m radicale --daemon --pid /var/lib/radicale/pid

But after a few seconds systemctl status radicale says this:

radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
Loaded: loaded (/etc/systemd/system/radicale.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-11-16 22:41:38 CET; 1min 15s ago
Process: 1045 ExecStart=/usr/bin/env python3 -m radicale --daemon --pid /var/lib/radicale/pid (code=exited, status=1/FA

Nov 16 22:41:38 radicale systemd[1]: radicale.service: Service hold-off time over, scheduling restart.
Nov 16 22:41:38 radicale systemd[1]: radicale.service: Scheduled restart job, restart counter is at 9.
Nov 16 22:41:38 radicale systemd[1]: Stopped A simple CalDAV (calendar) and CardDAV (contact) server.
Nov 16 22:41:38 radicale systemd[1]: radicale.service: Start request repeated too quickly.
Nov 16 22:41:38 radicale systemd[1]: radicale.service: Failed with result 'exit-code'.
Nov 16 22:41:38 radicale systemd[1]: Failed to start A simple CalDAV (calendar) and CardDAV (contact) server.

Does anyone know what could be the reason?

When I run python3 -m radicale --config "" --storage-filesystem-folder=/var/lib/radicale/collections manually, radicale works fine.

Thanks.

@Tntdruid
Copy link

I was getting that too, can't remember how i fixed it :(

@bkeltm
Copy link

bkeltm commented Nov 26, 2018

for me, after what seemed like a mostly painless upgrade from ubuntu 16.04 lts to 18, radicale was also not working, with similar errors.
finally i ran journalctl --unit radicale.service which declared there was no such module. Well, it was there and working before the upgrade!!!
finally gave up and just reinstalled by:
python3 -m pip install --upgrade radicale
python3 -m pip install --upgrade radicale[bcrypt]
then the systemctl enable radicale then systemctl start radicale,
collections files still exist, users are adding items to calendars, said all is well. YMMV!

@mookie-
Copy link
Contributor

mookie- commented Nov 26, 2018

@peter33826 the logs you've provided are just from systemd telling radicale stops and systemd tries to restart it. Can you please enable the radicale logging and paste the radicale logs here (https://radicale.org/logging/).

@peter33826
Copy link
Author

Hi, thanks for comments.
I tried re-install
python3 -m pip install --upgrade radicale[bcrypt]
but without sucess. Radicale has same behavior as mentioned in the first post.

I also actived logging. But my logging folder is still empty.

@mookie-
Copy link
Contributor

mookie- commented Nov 28, 2018

@peter33826 Please take a look at the systemd logs with journalctl I think there could be more informations than with systemctl status. If so please paste them here and also please paste your systemd unit file.

@peter33826
Copy link
Author

journalctl says this:

radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
Loaded: loaded (/etc/systemd/system/radicale.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-11-30 22:14:28 CET; 1min 37s ago
Process: 940 ExecStart=/usr/bin/env python3 -m radicale --daemon --pid /var/lib/radicale/pid (code=exited, status

Nov 30 22:14:28 radicale systemd[1]: radicale.service: Service hold-off time over, scheduling restart.
Nov 30 22:14:28 radicale systemd[1]: radicale.service: Scheduled restart job, restart counter is at 10.
Nov 30 22:14:28 radicale systemd[1]: Stopped A simple CalDAV (calendar) and CardDAV (contact) server.
Nov 30 22:14:28 radicale systemd[1]: radicale.service: Start request repeated too quickly.
Nov 30 22:14:28 radicale systemd[1]: radicale.service: Failed with result 'exit-code'.
Nov 30 22:14:28 radicale systemd[1]: Failed to start A simple CalDAV (calendar) and CardDAV (contact) server.

@peter33826
Copy link
Author

and systemctl status this

State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Fri 2018-11-30 22:14:03 CET; 4min 53s ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service
│ │ ├─gvfs-goa-volume-monitor.service
│ │ │ └─835 /usr/lib/gvfs/gvfs-goa-volume-monitor
│ │ ├─gvfs-daemon.service
│ │ │ ├─745 /usr/lib/gvfs/gvfsd
│ │ │ ├─750 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
│ │ │ └─884 /usr/lib/gvfs/gvfsd-trash --spawner :1.4 /org/gtk/gvfs/exec_spaw/0
│ │ ├─gvfs-udisks2-volume-monitor.service
│ │ │ └─824 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
│ │ ├─xfce4-notifyd.service
│ │ │ └─831 /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd
│ │ ├─init.scope
│ │ │ ├─664 /lib/systemd/systemd --user
│ │ │ └─665 (sd-pam)
│ │ ├─gvfs-gphoto2-volume-monitor.service
│ │ │ └─852 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
│ │ ├─dbus.service
│ │ │ ├─694 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activatio
│ │ │ ├─809 /usr/lib/dconf/dconf-service
│ │ │ ├─829 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
│ │ │ ├─903 /usr/lib/x86_64-linux-gnu/indicator-application-service
│ │ │ └─905 /usr/lib/indicator-sound-gtk2/indicator-sound-service
│ │ ├─gvfs-mtp-volume-monitor.service
│ │ │ └─844 /usr/lib/gvfs/gvfs-mtp-volume-monitor
│ │ └─gvfs-afc-volume-monitor.service
│ │ └─865 /usr/lib/gvfs/gvfs-afc-volume-monitor
│ ├─session-2.scope
│ │ ├─ 944 sshd: lubuntu [priv]
│ │ ├─1034 sshd: lubuntu@pts/0
│ │ ├─1035 -bash
│ │ ├─1060 systemctl status
│ │ └─1061 pager
│ └─session-c1.scope
│ ├─660 lightdm --session-child 12 15
│ ├─679 /usr/bin/lxsession -s Lubuntu -e LXDE
│ ├─734 /usr/bin/ssh-agent /usr/bin/im-launch /usr/bin/lxsession -s Lubuntu -e LXDE
│ ├─759 openbox --config-file /home/lubuntu/.config/openbox/lubuntu-rc.xml
│ ├─761 lxpanel --profile Lubuntu
│ ├─767 pcmanfm --desktop --profile lubuntu
│ ├─768 lxpolkit
│ ├─778 /usr/bin/ssh-agent -s
│ ├─781 update-notifier
│ ├─798 light-locker
│ ├─800 nm-applet
│ ├─804 xfce4-power-manager
│ ├─814 /usr/bin/pulseaudio --start --log-target=syslog
│ └─820 /usr/lib/menu-cache/menu-cached /run/user/1000/menu-cached-:0
├─init.scope
│ └─1 /sbin/init splash
└─system.slice
├─irqbalance.service
│ └─422 /usr/sbin/irqbalance --foreground
├─fail2ban.service
│ └─530 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
├─systemd-udevd.service
│ └─244 /lib/systemd/systemd-udevd
├─whoopsie.service
│ └─566 /usr/bin/whoopsie -f
├─cron.service
│ └─433 /usr/sbin/cron -f
├─polkit.service
│ └─469 /usr/lib/policykit-1/polkitd --no-debug
├─networkd-dispatcher.service
│ └─418 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
├─accounts-daemon.service
│ └─397 /usr/lib/accountsservice/accounts-daemon
├─wpa_supplicant.service
│ └─428 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
├─lightdm.service
│ ├─538 /usr/sbin/lightdm
│ └─622 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novt
├─ModemManager.service
│ └─409 /usr/sbin/ModemManager
├─systemd-journald.service
│ └─230 /lib/systemd/systemd-journald
├─ssh.service
│ └─536 /usr/sbin/sshd -D
├─NetworkManager.service
│ ├─412 /usr/sbin/NetworkManager --no-daemon
│ └─547 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /run/dhclient-ens3.pid -lf
├─rsyslog.service
│ └─398 /usr/sbin/rsyslogd -n
├─kerneloops.service
│ ├─575 /usr/sbin/kerneloops --test
│ └─581 /usr/sbin/kerneloops
├─cups.service
│ └─414 /usr/sbin/cupsd -l
├─upower.service
│ └─848 /usr/lib/upower/upowerd
├─systemd-resolved.service
│ └─295 /lib/systemd/systemd-resolved
├─udisks2.service
│ └─427 /usr/lib/udisks2/udisksd
├─acpid.service
│ └─396 /usr/sbin/acpid
├─dbus.service
│ └─361 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --s
├─systemd-timesyncd.service
│ └─291 /lib/systemd/systemd-timesyncd
├─system-getty.slice
│ └─getty@tty1.service
│ └─631 /sbin/agetty -o -p -- \u --noclear tty1 linux
├─avahi-daemon.service
│ ├─410 avahi-daemon: running [radicale.local]
│ └─439 avahi-daemon: chroot helper
└─systemd-logind.service
└─406 /lib/systemd/systemd-logind

@habubagit
Copy link

habubagit commented Dec 20, 2018

I had a similar problem and was wondering: Is anyone running Radicale 2.1.10 on Ubuntu 18.04? It was too working fine with executing the /usr/local/bin/radicale script and also with the command python3 -m radicale. But I too could not get it running with 'systemctl start radicale'.

After uncommenting #Restart=on-failure in /etc/systemd/system/radicale.service I got this log entrys:

Dec 20 14:56:24 hostname systemd[1]: Started A simple CalDAV (calendar) and CardDAV (contact) server.
Dec 20 14:56:24 hostname radicale[25440]: Traceback (most recent call last):
Dec 20 14:56:24 hostname radicale[25440]:   File "/usr/local/bin/radicale", line 7, in <module>
Dec 20 14:56:24 hostname radicale[25440]:     from radicale.__main__ import run
Dec 20 14:56:24 hostname radicale[25440]: ModuleNotFoundError: No module named 'radicale.__main__'
Dec 20 14:56:24 hostname systemd[1]: radicale.service: Main process exited, code=exited, status=1/FAILURE
Dec 20 14:56:24 hostname systemd[1]: radicale.service: Failed with result 'exit-code'.

After setting ExecStart=/usr/bin/env python3 -m radicale in /etc/systemd/system/radicale.service according to https://radicale.org/setup/ it worked. This was not done by ubuntu.

@mookie-
Copy link
Contributor

mookie- commented Dec 21, 2018

@peter33826 I'm sorry for the late response. I think I can see your problem now. Please remove the --daemon from the ExecStart in your systemd unit file. You could also paste your systemd unit file so I can change it for your.

You can find an example systemd unit file here: https://radicale.org/setup/
(And if you want to enable radicale logging, please take a look at this: https://github.com/Kozea/Radicale/pull/904/files

@peter33826
Copy link
Author

@mookie- I removed '--daemon' from the 'ExecStart' file, but it did not change anything. Any Ideas what could help? Thanks

@peter33826
Copy link
Author

This is the output of

systemctl status radicale

● radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
Loaded: loaded (/etc/systemd/system/radicale.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-01-04 22:36:20 CET; 3min 39s ago
Process: 944 ExecStart=/usr/bin/env python3 -m radicale (code=exited, status=1/FAILURE)
Main PID: 944 (code=exited, status=1/FAILURE)

Jan 04 22:36:20 radicale systemd[1]: radicale.service: Service hold-off time over, scheduling restart.
Jan 04 22:36:20 radicale systemd[1]: radicale.service: Scheduled restart job, restart counter is at 10.
Jan 04 22:36:20 radicale systemd[1]: Stopped A simple CalDAV (calendar) and CardDAV (contact) server.
Jan 04 22:36:20 radicale systemd[1]: radicale.service: Start request repeated too quickly.
Jan 04 22:36:20 radicale systemd[1]: radicale.service: Failed with result 'exit-code'.
Jan 04 22:36:20 radicale systemd[1]: Failed to start A simple CalDAV (calendar) and CardDAV (contact) server.

@peter33826
Copy link
Author

after a few seconds Radicale crashs:

at 964ms it works

systemctl status radicale
● radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
   Loaded: loaded (/etc/systemd/system/radicale.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-01-04 23:10:48 CET; 964ms ago
 Main PID: 1115 (python3)
    Tasks: 1 (limit: 1824)
   CGroup: /system.slice/radicale.service
           └─1115 python3 -m radicale

But after 4s it is down

Jan 04 23:10:48 radicale systemd[1]: Started A simple CalDAV (calendar) and CardDAV (contact) server.
xxx@radicale:~$ systemctl status radicale
● radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
   Loaded: loaded (/etc/systemd/system/radicale.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-01-04 23:10:49 CET; 4s ago
  Process: 1115 ExecStart=/usr/bin/env python3 -m radicale (code=exited, status=1/FAILURE)
 Main PID: 1115 (code=exited, status=1/FAILURE)

Jan 04 23:10:49 radicale systemd[1]: radicale.service: Service hold-off time over, scheduling restart.
Jan 04 23:10:49 radicale systemd[1]: radicale.service: Scheduled restart job, restart counter is at 5.
Jan 04 23:10:49 radicale systemd[1]: Stopped A simple CalDAV (calendar) and CardDAV (contact) server.
Jan 04 23:10:49 radicale systemd[1]: radicale.service: Start request repeated too quickly.
Jan 04 23:10:49 radicale systemd[1]: radicale.service: Failed with result 'exit-code'.
Jan 04 23:10:49 radicale systemd[1]: Failed to start A simple CalDAV (calendar) and CardDAV (contact) server.

@habubagit
Copy link

And how does your /etc/systemd/system/radicale.service look?

@peter33826
Copy link
Author

This is my /etc/systemd/system/radicale.service

[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target

[Service]
ExecStart=/usr/bin/env python3 -m radicale
Restart=on-failure
User=radicale
# Deny other users access to the calendar data
UMask=0027
# Optional security settings
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
NoNewPrivileges=true
ReadWritePaths=/var/lib/radicale/collections
ReadWritePaths=/var/log/radicale

[Install]
WantedBy=multi-user.target



@habubagit
Copy link

This is what I have:

[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target

[Service]
ExecStart=/usr/bin/env python3 -m radicale
#Restart=on-failure
User=radicale
# Deny other users access to the calendar data
UMask=0027
# Optional security settings
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
NoNewPrivileges=true
ReadWritePaths=/var/lib/radicale/collections/collection-root
ReadWritePaths=/var/log/radicale

[Install]
WantedBy=multi-user.target

Some days ago I alredy wrote, what I had to change here to get meaningful error messages.

@mookie-
Copy link
Contributor

mookie- commented Jan 9, 2019

@habubagit please add --debug to your ExecStart like this:

ExecStart=/usr/bin/env python3 -m radicale --debug

Then you should get more output.
If that's not helping I would try to comment/remove the "Optional security settings" and test if it works without them. As I'm not using systemd I can't test it myself.

@4b69
Copy link

4b69 commented Jan 26, 2019

I can add that radicale.service works if User=root. Currently investigating the cause...

@return42
Copy link

@nja0087 did you double check the owner of the radicale installation and the folders are uses by (i.e. /var/lib/radicale/collections)

When I run python3 -m radicale --config "" --storage-filesystem-folder=/var/lib/radicale/collections manually, radicale works fine.

In your systemd-unit file you start the service with user radicale (User=radicale), did you manual start with this the same user?

@FBachofner
Copy link

FBachofner commented Mar 14, 2019

I, too, am on Ubuntu 18.04 and have the same problem. [ I can also successfully run Radicale manually. ]

/var/log/syslog reports:
[7ff1ca989740] ERROR: An exception occurred during server startup: [Errno 30] Read-only file system: '/var/lib/radicale'

My implementation details:

  1. I am not trying to store any Radicale data at the /var/lib/radicale or /var/lib/radicale/collections directories.

  2. /etc/systemd/system/radicale.service correctly identifies a completely different directory for the "ReadWritePaths"

  3. /etc/radicale/radicale.conf ALSO correctly identifies a completely different directory for the "filesystem_folder"

  4. Indeed, the /var/lib/radicale directory does not even exist.

  5. Why is Radicale expecting this folder (i.e. /var/lib/radicale ) to exist? Is it hard-coded somewhere?

@FBachofner
Copy link

FBachofner commented Mar 14, 2019

For a more exhaustive test, I created the directory: /var/lib/radicale

Then the syslog error message changed to:
[7f74a83d5740] ERROR: An exception occurred during server startup: [Errno 30] Read-only file system: '/var/lib/radicale/collections'

So . . . I created the directory /var/lib/radicale/collections

Now the Radicale service starts, but browsing to the relevant:5232 URL reports " Unable to connect " rather than showing a Radicale login page (such as when I run the Radicale command manually)

These directories (as well as my actual storage directory for the collections) are chown(ed) radicale:radicale .

In theory, this means that either user radicale or user root should be able to run radicale successfully, right?

@FBachofner
Copy link

FBachofner commented Mar 14, 2019

Based on comments by @nja0087 and @return42, I have also tried setting the service to:

User=root
Group=root

Radicale still "runs" [and should I point out the (hopefully) obvious: I am stopping it and starting it after configuration changes] but the URL still shows "Unable to connect" when browsed to . . .

Now I am really puzzled as manually running a Radicale "test" instance succeeded using a command similar to:
sudo -H python3 -m radicale --config "" --server-hosts my.super.secret.IPaddress --storage-filesystem-folder=/my/special/path/for/radicale/collections

@mookie-
Copy link
Contributor

mookie- commented Mar 14, 2019

@FBachofner please post your systemd unit file and your radicale configuration. Else it's hard to help you with this error.

@FBachofner
Copy link

I just noticed:

sudo systemctl status radicale reports:

Mar 14 08:45:47 server-name-here systemd[1]: radicale.service: Current command vanished from the unit file, execution of the command list won't be resumed.

I wonder whether this is somehow instructive?

@mookie -- systemd and radicale.conf files coming up . . .

@FBachofner
Copy link

@mookie:

my radicale.service file (in /etc/systemd/system )

[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contacts) server
After=network.target
Requires=network.target

[Service]
ExecStart=/usr/bin/env python3 -m radicale --debug
Restart=on-failure
User=root
Group=root

# Deny other users access to the calendar data
UMask=0027

# Optional security settings
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
NoNewPrivileges=true
ReadWritePaths=/my/redacted/special/path/to/radicale/collections

[Install]
WantedBy=multi-user.target

my radicale.conf file (in /etc/radicale )

[server]
# Bind access to all possible addresses by using 0.0.0.0
# if behind a reverse proxy, bind only to localhost, i.e. 127.0.0.1
hosts = 0.0.0.0:5232


#ssl = True
#certificate = /etc/ssl/radicale.cert.pem
#key = /etc/ssl/radicale.key.pem
#certificate_authority = /path/to/client_cert.pem


[auth]
# if serving directly from Radicale
#type = htpasswd
#htpasswd_filename = /etc/radicale/users
#htpasswd_encryption = bcrypt

# if serving indirectly from behind a reverse proxy
# type = http_x_remote_user


[storage]
filesystem_folder = /my/redacted/special/path/to/radicale/collections

Note, I have tried both with and without the [auth] section enabled just to see whether it has any "positive" effect

@FBachofner
Copy link

FBachofner commented Mar 14, 2019

after once again enabling --debug I noticed the following syslog message:

Mar 14 09:02:22 server-name-here env[24752]: [7f3bc77e9740] INFO: Listening to 'localhost' on port 5232

WTF?!@#%*% " Listening to 'localhost' ?!"

radicale.conf clearly states " hosts = 0.0.0.0:5232 "

ANY computer on my network should be "listened to"

Radicale is installed on a headless (and no Desktop Environment -installed) server, so I can NOT test it "locally"

@FBachofner
Copy link

OK,

  1. I took a moment to install a DE and Firefox
  2. remoted into the headless server
  3. browse to localhost:5232
  4. voila! I can see Radicale's web interface

So I think I am down to one (current) issue: Why does Radicale not allow other hosts on my network to browse to Radicale's web interface when my radicale.conf clearly intends to allow all hosts (i.e. 0.0.0.0:5232)?

This may be related to the radicale.service setting "ProtectSystem=strict"

I will disable that, retry and report back.

@FBachofner
Copy link

In radicale.service I disabled ProtectSystem=strict

This modification still does not allow hosts (other than the local host) to access the Radicale web interface.

Then, in radicale.service I disabled the whole "# Optional security settings" section with the exception of " ReadWritePaths=/my/redacted/special/path/to/radicale/collections " which references my data directory

These additional modifications still does not allow hosts (other than the local host) to access the Radicale web interface!

@cianci
Copy link

cianci commented Aug 3, 2019

To the person who asked:

5. Why is Radicale expecting this folder (i.e. /var/lib/radicale ) to exist? Is it hard-coded somewhere?

I'm just as confused as everyone else, but I will note that "/var/lib/radicale" is the home directory of the user radicale.

I noticed this, because in attempting the test someone else did above changing User=root, the permission denied error I get suddenly changes to:

                                     [3c72] CRITICAL: An exception occurred during server startup: Can't extract file(s) to egg cache
                                     
                                     The following error occurred while trying to extract file(s) to the Python egg
                                     cache:
                                     
                                       [Errno 30] Read-only file system: '/root/.cache'
                                     
                                     The Python egg cache directory is currently set to:
                                     
                                       /root/.cache/Python-Eggs
                                     
                                     Perhaps your account does not have write access to this directory?  You can
                                     change the cache directory by setting the PYTHON_EGG_CACHE environment
                                     variable to point to an accessible directory.>

How is it possible that root is getting a permission denied error?

@mookie-
Copy link
Contributor

mookie- commented Aug 4, 2019

@cianci You error message shows "Read-only file system". Even root can't write to a Read-only file system.

@mookie-
Copy link
Contributor

mookie- commented Aug 4, 2019

@FBachofner please try this ExecStart command:

ExecStart=/usr/bin/env python3 -m radicale -C /path/to/your/radicale/config

If you configured 0.0.0.0:5253 and radicale isn't listening on this port, then probably your configuration isn't used.

@cianci
Copy link

cianci commented Aug 4, 2019

@cianci You error message shows "Read-only file system". Even root can't write to a Read-only file system.

Perhaps I should have been more specific: In neither case (/root and /var/lib/radicale) is the filesystem mounted read only. The root user can (obviously) write to both of them (when invoked manually by me at cmdline), and the radicale user can create whatever it wants in /var/lib/radicale, also verified by direct testing.

In the end, I gave up and added
Environment="PYTHON_EGG_CACHE=/tmp"
to the top of the [Service] section in /etc/systemd/system/radicale.service

This seems to make it work for now [Shrug].

@mookie-
Copy link
Contributor

mookie- commented Aug 4, 2019

@cianci if it works if you manually start it from command line, then it's properly a problem with the systemd unit file configuration. Unfortunately I don't use systemd and can't help you there. But you could try to remove the "optional security settings" and check if it works then.

@herrwusel
Copy link

I had the authors problem on ubuntu 18.10 as well. What solved the problem was adding Type=forking to the systemd file. After adding it, radicale doesn't shut down immediately after starting it.

@gitporst
Copy link

I also had the same problem as the author and nothing really worked. I got /usr/env/bin module radicale not found errors. So it helped uninstalling radicale without sudo and re-installing with sudo to make it available to systemd services (#725 (comment)). Also check the ownerships of the paths that radicale is granted read and write access to.

@viertelb
Copy link

viertelb commented Apr 6, 2020

I had the same issue. The systemctl is not able to start radicale if installed without sudo. But the instructions says so. Probably just need to update the instructions here

@lil5
Copy link

lil5 commented Oct 11, 2021

I am using a different directory to store the collections directory in.

My fix is to alter the radicale.service file

# change this to your location
ReadWritePaths=/my/redacted/special/path/to/radicale/collections

@GosuJunk
Copy link

GosuJunk commented Jan 4, 2024

For those who would face a similar issue on Ubuntu 23 : the service seems to be failing when it's started for the first time with all optional security settings.

In my radicale.service file I commented all the settings below , and the service started fine:

Optional security settings

PrivateTmp=true

ProtectSystem=strict

ProtectHome=true

PrivateDevices=true

ProtectKernelTunables=true

ProtectKernelModules=true

ProtectControlGroups=true

NoNewPrivileges=true

ReadWritePaths=/var/lib/radicale/collections

Then I uncommented them one by one to check which one would cause me trouble, everything worked fine even with all of them enabled.

That solved it for me !

@lil5
Copy link

lil5 commented Jan 4, 2024

@GosuJunk GitHub uses markdown to format your post, please wrap your example in back ticks

https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting

@pbiering
Copy link
Collaborator

pbiering commented Jan 4, 2024

Then I uncommented them one by one to check which one would cause me trouble, everything worked fine even with all of them enabled.

No wonder as you disabled now all "Optional security settings", question would be which particular one is causing issues.

@pbiering
Copy link
Collaborator

pbiering commented Mar 2, 2024

looks like systemd example file should be documented somewhere...

@tzcrawford
Copy link

I am on debian, just after upgrading from buster to bookworm and I am now getting this error.
If I run /usr/
Invalid configuration: Invalid option 'daemon' in section 'server' in config file '/etc/radicale/config'
And after removing that, Invalid configuration: Invalid option 'config' in section 'logging' in config file '/etc/radicale/config'. So in essence, I simply had to comment out both of those lines.

@pbiering
Copy link
Collaborator

pbiering commented Apr 3, 2024

I am on debian, just after upgrading from buster to bookworm and I am now getting this error. If I run /usr/ Invalid configuration: Invalid option 'daemon' in section 'server' in config file '/etc/radicale/config' And after removing that, Invalid configuration: Invalid option 'config' in section 'logging' in config file '/etc/radicale/config'. So in essence, I simply had to comment out both of those lines.

looks like this update had implicit a major upgrade of "radicale" from 2 to 3, where both options were dropped.

@Kozea Kozea locked and limited conversation to collaborators Apr 3, 2024
@pbiering pbiering converted this issue into discussion #1464 Apr 3, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests