Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.protocols.time.ntp > #164282

Re: ntpd does not start daemon control: got EOF

From "Cy Schubert" <Cy.Schubert@cschubert.com>
Newsgroups comp.protocols.time.ntp
Subject Re: ntpd does not start daemon control: got EOF
Date 2026-04-27 23:38 +0000
Organization Taughannock Networks, Trumansburg NY
Message-ID <20260427233300.9B7B8CE@slippy.cwsent.com> (permalink)
References (6 earlier) <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmail.com> <f2767d42-f578-4553-9e8a-d1e2d2c2e151@ntp.org> <20260425052318.07925C6@slippy.cwsent.com> <c125bd87-a762-4468-b214-5ead5147b82c@ntp.org> <10s8hv2$38nht$1@paganini.bofh.team>

Show all headers | View raw


In message <c125bd87-a762-4468-b214-5ead5147b82c@ntp.org>, "Harlan Stenn" 
write
s:
> On 4/27/2026 12:59 PM, Cy Schubert wrote:
> > In message <CAMbSiYD=phHqGb=DjmYoZmYOjXWvv1r+TLex=ZjiyZHfaPYBAA@mail.gmail.
> c
> > om>
> > , Dave Hart writes:
> >>
> >> On Mon, Apr 27, 2026 at 14:11=E2=80=AFUTC Cy Schubert wrote:
> >>
> >>> The issue with ntpd is that it forks a subprocess, with a pipe between
> >>> both
> >>> processes. The child process write "R\n" to the pipe. If the parent does
> >>> not read two bytes it exits with an error. Just a guess here that monit
> >>> might have its fingers in the pipe.
> >>>
> >>
> >> ntpd does have --nofork/-n to avoid forking to daemonize.  I have not
> >> tested, but intuitively it seems like a better solution for FreeBSD's rc.d
> >> script.
> >>
> > 
> > I suppose users of monit could use that. rcng uses the .pid file to manage
> > services. I don't see any benefit of changing the FreeBSD rc file to
> > support an esoteric process monitoring application. Applications should
> > conform to and work within the O/S, not the other way around. Though not
> > posix pidfiles are a common UNIX-like management tool.
>
> We believe we provide a robust mechanism for ntpd startup.  If there is 
> missing functionality here, please open a bug report.
>
> There are a staggering number of systems out there that use a myriad of 
> different startup schemes.  Any given system can undergo spontaneous 
> changes in its startup framework.
>
> It seems unreasonable to me to expect *any* application project 
> (including NTP) to conform to an OS.
>
> But it *is* perfectly reasonable to expect an application project to 
> offer command-line and configuration options that are sufficiently 
> robust to allow an arbitrary OS to reliably start/stop the application.
>
> Are we agreed on this?

In this regard ntp (and sendmail) are working correctly. The issue only 
occurs when run under monit. Monit might be inserting itself between the 
parent and the child in order to cause the parent not to read "R\n" on the 
pipe.

I have confirmed, in a jail on a 16-CURRENT system, that the problem only 
occurs under monit. This is why I suggested the O/P open a bugzilla bug for 
the problem. It's one of the following:

- a monit bug, or
- a bug uncovered by monit in the FreeBSD kernel or libc.

What ntpd is doing by opening a pipe so the child can notify the parent it 
can terminate itself looks reasonable.


>
> -- 
> Harlan Stenn <stenn@ntp.org>
> NTP Project Lead.  The NTP Project is part of:
> https://www.nwtime.org/ - be a member!


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e**(i*pi)+1=0

Back to comp.protocols.time.ntp | Previous | NextPrevious in thread | Find similar


Thread

ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-21 21:08 +0200
  Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-21 19:58 +0000
    Re: ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-21 22:08 +0200
      Re: ntpd does not start daemon control: got EOF "Dave Hart via questions Mailing List" <questions@lists.ntp.org> - 2026-04-21 20:58 +0000
      Re: ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-22 19:43 +0200
        Re: ntpd does not start daemon control: got EOF "Dave Hart" <davehart@gmail.com> - 2026-04-27 19:43 +0000
          Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-27 20:03 +0000
        Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-27 21:38 +0000
          Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-28 04:38 +0000
      Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-22 22:03 +0000
        Re: ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-23 06:51 +0200
          Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-25 05:28 +0000
          Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-28 00:08 +0000
      Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-22 22:13 +0000
    Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-21 20:43 +0000
      Re: ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-22 05:25 +0200
    Re: ntpd does not start daemon control: got EOF "Harlan Stenn via questions Mailing List" <questions@lists.ntp.org> - 2026-04-21 21:03 +0000
      Re: ntpd does not start daemon control: got EOF "Alexander Ziaee" <ziaee@FreeBSD.org> - 2026-04-22 10:03 +0000
        Re: ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-22 12:37 +0200
          Re: ntpd does not start daemon control: got EOF "Alexander Ziaee" <ziaee@FreeBSD.org> - 2026-04-22 14:33 +0000
            Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-22 14:58 +0000
              Re: ntpd does not start daemon control: got EOF "Marco Moock" <mm@dorfdsl.de> - 2026-04-22 16:18 +0000
    Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-27 15:13 +0000
      Re: ntpd does not start daemon control: got EOF "Marco Moock" <mm@dorfdsl.de> - 2026-04-27 16:13 +0000
      Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-28 04:33 +0000
  Re: ntpd does not start daemon control: got EOF "Dave Hart" <davehart@gmail.com> - 2026-04-22 18:33 +0000
    Re: ntpd does not start daemon control: got EOF Marco Moock <mm@dorfdsl.de> - 2026-04-22 20:54 +0200
      Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-23 04:13 +0000
  Re: ntpd does not start daemon control: got EOF "Marco Moock" <mm@dorfdsl.de> - 2026-04-25 09:38 +0000
  Re: ntpd does not start daemon control: got EOF "Ralph Blach" <chip.from.nc@gmail.com> - 2026-04-27 20:08 +0000
  Re: ntpd does not start daemon control: got EOF "Cy Schubert" <Cy.Schubert@cschubert.com> - 2026-04-27 23:38 +0000

csiph-web