Radicale
Radicale copied to clipboard
error with starting radicale
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.
I was getting that too, can't remember how i fixed it :(
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!
@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/).
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.
@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.
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.
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 │ ├─[email protected] │ │ ├─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 │ └─[email protected] │ └─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
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.
@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
@mookie- I removed '--daemon' from the 'ExecStart' file, but it did not change anything. Any Ideas what could help? Thanks
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.
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.
And how does your /etc/systemd/system/radicale.service
look?
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
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.
@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.
I can add that radicale.service works if User=root. Currently investigating the cause...
@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?
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:
-
I am not trying to store any Radicale data at the /var/lib/radicale or /var/lib/radicale/collections directories.
-
/etc/systemd/system/radicale.service correctly identifies a completely different directory for the "ReadWritePaths"
-
/etc/radicale/radicale.conf ALSO correctly identifies a completely different directory for the "filesystem_folder"
-
Indeed, the /var/lib/radicale directory does not even exist.
-
Why is Radicale expecting this folder (i.e. /var/lib/radicale ) to exist? Is it hard-coded somewhere?
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?
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
@FBachofner please post your systemd unit file and your radicale configuration. Else it's hard to help you with this error.
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 . . .
@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
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"
OK,
- I took a moment to install a DE and Firefox
- remoted into the headless server
- browse to localhost:5232
- 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.
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!
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?
@cianci You error message shows "Read-only file system". Even root can't write to a Read-only file system.
@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.