From owner-freebsd-questions@freebsd.org Sat Sep 29 09:58:52 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 660CC10C2669 for ; Sat, 29 Sep 2018 09:58:52 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Received: from mail1.protonmail.ch (mail1.protonmail.ch [185.70.40.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.protonmail.ch", Issuer "QuoVadis Global SSL ICA G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1963752B4 for ; Sat, 29 Sep 2018 09:58:51 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Date: Sat, 29 Sep 2018 09:58:40 +0000 To: FreeBSD Questions From: Lorenzo Salvadore Reply-To: Lorenzo Salvadore Subject: Re: Starting ntpd in a jail Message-ID: In-Reply-To: References: <8a138f2e-11d4-d890-c28d-72717a9eed3a@netfence.it> Feedback-ID: X6az_D2smWSR8MT5MHqXnWF0upxehDyHia7Id1cbayHNBUkRu3CIeusDsZHiivIIjmaKB1_OofpALrRUYjNz3w==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.protonmail.ch X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 09:58:52 -0000 > > Please give details on your jail configuration: do you manage it by wri= ting > > directly into /etc/jail.conf? do you use some utility like ezjail? > > Sorry, I should have said it at the start: I'm using ezjail. > Of course I have ntpd_enable=3D"YES". I do not use ezjail, hence I can not help you much. Hopefully, someonelse will help you more, but in the meantime I will try. I think your problem might be in the moment at which /bin/sh /etc/rc is exe= cuted. As you probably know, there is a difference between creating a jail and ent= ering a jail (a jail might run without being used by anybody). In my configuratio= n, the line exec.start=3D"/bin/sh /etc/rc" asks to start the services only whe= n the jail is created and they will not start again if I exit from the jail and enter aga= in into it without destroying and recreating the jail. Now, I think you could be in one of the following situations (or maybe both= ): 1) when you start your jail through ezjail, what you are really doing is en= tering in an already created jail and hence services are not started; in that case= , it might be that ntpd starts regularly if you reboot your system or restart the ezjail = service (I think it is a service); 2) ezjail creates your jail at boot before everything needed by ntpd is set= properly, so ntpd fails at start and when you enter into the jail there is no ntpd: you = could check if that is the case by reading into the logs. In that case the soluti= on would be to reorder the host's services. I hope it helps. Lorenzo Salvadore.