Hi Lennart, I missed some details in the previous mail. This is seen on systemd 230. Unfortunately, I cannot do a systemd upgrade now.
Subscribe() is done on org.freedesktop.systemd1 path =/org/freedesktop/systemd1 intf =org.freedesktop.systemd1.Manager. To make sure that the signal was not missed due to an error in the Subscribe() logic, I also ran a dbus-monitor script that runs "/usr/bin/dbus-monitor --system" and redirects it to a dbus-monitor log file. The dbus-monitor script is always guaranteed to run before the service in question so it doesn't miss any signal. I don't see any signal indicating active state in the dbus-monitor log file when the issue happens. Thanks Ashitha On Tue, Feb 12, 2019 at 2:14 AM Lennart Poettering <[email protected]> wrote: > On Mo, 11.02.19 19:50, systemd Mailing List ( > [email protected]) wrote: > > > Hi, > > > > I have a service file as follows: > > > > [Unit] > > Description= "Daemon description" > > After=a.service > > < > https://opengrok-evo.juniper.net/source/s?path=mgd.service&project=EVO_TOT > > > > b.service < > https://opengrok-evo.juniper.net/source/s?path=mgd-api.service&project=EVO_TOT > > > > c.service < > https://opengrok-evo.juniper.net/source/s?path=jsd.service&project=EVO_TOT > > > > OnFailure=failure_handler@%p.service > > < > https://opengrok-evo.juniper.net/source/s?path=p.service&project=EVO_TOT> > > > > [Service] > > WorkingDirectory=/usr/sbin > > < > https://opengrok-evo.juniper.net/source/s?path=/usr/sbin&project=EVO_TOT> > > ExecStartPre=/bin/sleep > > < > https://opengrok-evo.juniper.net/source/s?path=/bin/sleep&project=EVO_TOT> > > 30 > > ExecStart=<path-to-binary> > > > > > > When this service starts I expected a signal indicating state=active. > > When I reboot the system multiple times, the signal indicating > > "active" is missing some times. > > > > I got the signal ActiveState=activating, SubState=start-pre at all > > times. But signal indicating ActiveState="active" and > > SubState="running" was missing for some reboots. > > > > The service is running and shows active state all the time. What is > > reason for missing signal? I am also checking if the sleep in the > > ExecStartPre is required for this > > > > service. I am wondering if that has something to do with the missing > signal. > > Have you called Subscribe() on the manager object? Unless there's at > least one client doing that (which hasn't dsiconnected yet) these > messages are not necessarily generated. > > Also, which systemd version is this? There have been some bugfixes in > this area in the past, hence make sure to run a current version of systemd. > > Lennart > > -- > Lennart Poettering, Red Hat > -- thanks Ashitha
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
