Discussion:
[gentoo-user] A couple of problems with systemd
(too old to reply)
John Covici
2022-05-27 21:10:01 UTC
Permalink
Hi. Lately I am having a couple of problems with systemd. I am using
version 250.5-r1.

I have one service which always times out, but slows down the boot
process. It is
/lib/systemd/system/systemd-networkd-wait-online.service. Because
many jobs wait in queue for a while, till this fails.

Also, I have a couple of services, ntpdate and proftpd which always
fail because when they try to execute named has not started yet. I
can restart them once the system is fully booted and I can login.

So, I wonder if this is all related to the failing service, or are
they separate problems that I can fix? And can you suggest how to fix
the two service which seem to start too soon?

Thanks in advance for any suggestions.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici wb2una
***@ccs.covici.com
Neil Bothwick
2022-05-27 21:50:01 UTC
Permalink
Post by John Covici
I have one service which always times out, but slows down the boot
process. It is
/lib/systemd/system/systemd-networkd-wait-online.service. Because
many jobs wait in queue for a while, till this fails.
Are you using systemd-networkd or something else to manage your network?
Post by John Covici
Also, I have a couple of services, ntpdate and proftpd which always
fail because when they try to execute named has not started yet. I
can restart them once the system is fully booted and I can login.
You can create a drop-in to require the service to start after named, run
"systemctl edit ntpdate.service" and add

[Unit]
Requires=named.service
After=named.service

That will create a drop-in file in /etc/systemd/system/ntpdate.service.d
containing your additions - you can also create these files manually.
--
Neil Bothwick

Copy from another: plagiarism. Copy from many: research.
John Covici
2022-05-28 00:00:01 UTC
Permalink
On Fri, 27 May 2022 17:49:24 -0400,
[1 <text/plain; US-ASCII (quoted-printable)>]
Post by John Covici
I have one service which always times out, but slows down the boot
process. It is
/lib/systemd/system/systemd-networkd-wait-online.service. Because
many jobs wait in queue for a while, till this fails.
Are you using systemd-networkd or something else to manage your network?
Post by John Covici
Also, I have a couple of services, ntpdate and proftpd which always
fail because when they try to execute named has not started yet. I
can restart them once the system is fully booted and I can login.
You can create a drop-in to require the service to start after named, run
"systemctl edit ntpdate.service" and add
[Unit]
Requires=named.service
After=named.service
That will create a drop-in file in /etc/systemd/system/ntpdate.service.d
containing your additions - you can also create these files manually.
Thanks. I am not using systemd-network or anything like that. I
created a service called network and use the %i and links in
/etc/systemd/system/multi-user-target.wants to start my two cards.
Maybe this is not the normal way, but when I first started using
systemd, this is the best I could come up with at the time.

I will try the drop-in, I had kind of forgot about them.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici wb2una
***@ccs.covici.com
Neil Bothwick
2022-05-28 07:10:01 UTC
Permalink
Post by John Covici
On Fri, 27 May 2022 17:49:24 -0400,
[1 <text/plain; US-ASCII (quoted-printable)>]
Post by John Covici
I have one service which always times out, but slows down the boot
process. It is
/lib/systemd/system/systemd-networkd-wait-online.service. Because
many jobs wait in queue for a while, till this fails.
Are you using systemd-networkd or something else to manage your network?
Post by John Covici
Also, I have a couple of services, ntpdate and proftpd which always
fail because when they try to execute named has not started yet. I
can restart them once the system is fully booted and I can login.
You can create a drop-in to require the service to start after named,
run "systemctl edit ntpdate.service" and add
[Unit]
Requires=named.service
After=named.service
That will create a drop-in file in
/etc/systemd/system/ntpdate.service.d containing your additions - you
can also create these files manually.
Thanks. I am not using systemd-network or anything like that. I
created a service called network and use the %i and links in
/etc/systemd/system/multi-user-target.wants to start my two cards.
Maybe this is not the normal way, but when I first started using
systemd, this is the best I could come up with at the time.
If you are not starting systemd-networkd, network-online will fail. You
only need to create a file in /etc/systemd/network to configure your
card, something like

[Match]
Name=eth0

[Network]
Description=Wired network
DHCP=yes

Then start systemd-networkd.service.
Post by John Covici
I will try the drop-in, I had kind of forgot about them.
--
Neil Bothwick

The cow is nothing but a machine that makes grass fit for us people to
eat.
Canek Peláez Valdés
2022-05-29 00:50:01 UTC
Permalink
Post by John Covici
[...]
Thanks. I am not using systemd-network or anything like that. I
created a service called network and use the %i and links in
/etc/systemd/system/multi-user-target.wants to start my two cards.
Maybe this is not the normal way, but when I first started using
systemd, this is the best I could come up with at the time.
Have you tried using .network files? You can setup it static:

$ cat /etc/systemd/network/enp2s0.network
# Ethernet

[Match]
Name=enp2s0

[Network]
Address=192.168.1.1/24
Gateway=192.168.1.254
DNS=192.168.1.254

or with DHCP:

# /etc/systemd/network/30-bond1.network
[Match]
Name=bond1

[Network]
DHCP=ipv6

Even with wpa_supplicant[1].

Regards.
[1]
https://wiki.somlabs.com/index.php/Connecting_to_WiFi_network_using_systemd_and_wpa-supplicant
--
Dr. Canek Peláez Valdés
Profesor de Carrera Asociado C
Departamento de Matemáticas
Facultad de Ciencias
Universidad Nacional Autónoma de México

Loading...