Skip to content
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

Slapd-ltb service fails after server's reboot on RHEL8 #123

Open
damiencassu opened this issue Sep 20, 2024 · 2 comments
Open

Slapd-ltb service fails after server's reboot on RHEL8 #123

damiencassu opened this issue Sep 20, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@damiencassu
Copy link

Hello,

I recently noticed something strange after installing the latest 2.5.18 slapd-ltb rpms on a RHEL8 server.

Even if the slapd-ltb service is enabled in systemctl, the startup fails when the server starts up with the following error in slapd logs:

daemon: bind(7) failed errno=99 (Cannot assign requested address)

A simple attempt to start the slapd-ltb service (either with systemctl or with slapd-cli start) works perfectly.

It seems the process is starting too soon while the network services are not fully ready yet.

I've tuned a little bit the /usr/lib/systemd/system/slapd-ltb.service service file replacing

After=syslog.target network.target

by

After=syslog.target network-online.target

And now it works as expected.

  • Is there a reason to not use network-online.target from the begining ?
  • Are you aware of this issue on rhel8 (and maybe 9 ?) ? (I've tested it on rhel7 and the issue is not there)

Thanks a lot for your insights.
Have a nice weekend

Regards,

@davidcoutadeur davidcoutadeur self-assigned this Sep 20, 2024
@davidcoutadeur
Copy link

Thanks for the bug report.

I did not face this issue before, but indeed it can be an improvement.

@davidcoutadeur davidcoutadeur added this to the 2.5.19 milestone Sep 20, 2024
@davidcoutadeur
Copy link

Hello, after some investigations, it seems that:

  • network-online.target is for software that really need a network communication up and ready
  • network.target is sufficient for all others.

Actually, OpenLDAP does not need the connectivity, it just needs the network interface to exist.

As stated by systemd: (https://systemd.io/NETWORK_ONLINE/)

It is strongly recommended not to make use of this target (network-online.target) too liberally: for example network server software should generally not pull this in (since server software generally is happy to accept local connections even before any routable network interface is up). Its primary purpose is network client software that cannot operate without network.

If you check your network configuration, maybe you have a special configuration somewhere that prevent the needed network interfaces to show up? If you give more information or arguments, we can reconsider, but else I prefer not to change the current systemd configuration.

@davidcoutadeur davidcoutadeur modified the milestones: 2.5.19, 2.5.20 Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants