Koozali.org: home of the SME Server
Contribs.org Forums => Koozali SME Server 10.x => Topic started by: holck on September 13, 2022, 09:57:36 AM
-
I have SME10 running as a virtual machine under Proxmox. Unfortunately, sometimes after rebooting the Proxmox host, some of the SME10 services fail to start. I think this is due to some network interfaces, supplied by Proxmox, not being ready when SME10 starts.
I have made a small script to test for this, and start services as necessary:
#!/bin/sh
for SERVICE in mailman fail2ban squeezeboxserver nmbd dovecot
do
if systemctl is-enabled --quiet $SERVICE; then
echo "$SERVICE is enabled"
else
echo "Enabling $SERVICE ..."
systemctl enable $SERVICE
fi
if systemctl is-active --quiet $SERVICE; then
echo "$SERVICE is running"
else
echo "Starting $SERVICE ..."
systemctl start $SERVICE
fi
done
Where is the proper way to place this script? I want in to run 30 seconds after SME is started.
-
proper way is to identify those services and check:
- they are indeed enabled
systemctl status servicename
- what says their unit section. If they really need to have network up then you should see in unit section After=network-online.target
systemct cat servicename
checking the log for the issue might also help
journalctl -u servicename
and
also the service log itself in /var/log
-
I think this is due to some network interfaces, supplied by Proxmox, not being ready when SME10 starts.
What makes you think they are not ready? What symptoms?
What spec is the Prox box and the SME VM?
Prox version. SME version.
Run the SME server manager debug so we can see what else you have installed.
You could post the Prox VM config.
Are you over provisioned? Slow server?
A lot of us run SME on a variety of Prox/hardware and I've not seen this so interested to see what the issue is.
-
Thanks for your comments and questions. Here's an example from dovecot's log, as it tries to start after reboot:
Sep 12 22:31:38 sme10 dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Sep 12 22:35:26 sme10 dovecot: master: Error: bind(192.168.1.11, 110) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 110) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(pop3-login): listen(192.168.1.11, 110) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 995) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(pop3-login): listen(192.168.1.11, 995) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 143) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(imap-login): listen(192.168.1.11, 143) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 993) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(imap-login): listen(192.168.1.11, 993) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Fatal: Failed to start listeners
Sep 12 22:35:27 sme10 dovecot: master: Error: service(pop3-login): listen(192.168.1.11, 110) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: master: Error: bind(192.168.1.11, 995) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: master: Error: service(pop3-login): listen(192.168.1.11, 995) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: master: Error: bind(192.168.1.11, 143) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: master: Error: service(imap-login): listen(192.168.1.11, 143) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: master: Error: bind(192.168.1.11, 993) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: master: Error: service(imap-login): listen(192.168.1.11, 993) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 110) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(pop3-login): listen(192.168.1.11, 110) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 995) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(pop3-login): listen(192.168.1.11, 995) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 143) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(imap-login): listen(192.168.1.11, 143) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: bind(192.168.1.11, 993) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Error: service(imap-login): listen(192.168.1.11, 993) failed: Cannot assign requested address
Sep 12 22:35:27 sme10 dovecot: Fatal: Failed to start listeners
Sep 12 22:35:27 sme10 dovecot: master: Fatal: Failed to start listeners
...
I run SME10 on Proxmox 7.2-7. The VM is allocated 20 GB memory. The hardware is a HP Microserver Gen10 Plus with 32 GB memory. I use ZFS, using 3 mirrored disks, each 1 TB.
I believe my problems with mailman and squeezeboxserver are mostly due to the fact that I haven't found the correct way to enable them across reboots. So each time I restart the server, I seem to need to re-enable them.
-
Not sure why the services aren't starting but not sure it's what you think it is.
Please post these so we can see what else you have going on.
/sbin/e-smith/audittools/newrpms
/sbin/e-smith/audittools/templates
Regarding mailman if you are using the contrib it should just work.
Regarding squeezebox you need to read the wiki on how to use systemd and integrate to SME. There are some tricks you need to learn.
You'll need a confg entry and a systemd template/override at a minimum. Look at how it is done with other services.
Or chat to us on Rocket.....
-
I believe my problems with mailman and squeezeboxserver are mostly due to the fact that I haven't found the correct way to enable them across reboots. So each time I restart the server, I seem to need to re-enable them.
These notes might help you figure out how to get mailman and squeezeboxserver to start autmoatically:
https://wiki.koozali.org/KnownProblems#Manualy_install_a_service_on_SME_10_and_newer
https://forums.koozali.org/index.php/topic,54838.msg288340.html#msg288340
Summary:
* You must create an "enabled" service entry for each service in the config db
* If that doesn't solve the problem, you may need a custom template for systemd -> system-preset
-
These notes might help you figure out how to get mailman and squeezeboxserver to start autmoatically:
Thanks Mike - I was on mobile and couldn't find those links!!
(As I mentioned, mailman should just work if it is via the contrib)
-
question regarding boot and network. any other vm your sme is relying on ?
like a firewall or dhcp?
if yes then you should use the boot order in proxmox to make sure that when sme start booting the prerequesite are already there.
dovecot can you show
systemctl cat dovecot
for other services and option you have already the answers there.