Thanks for your answer. Slapd is just an example, it happens with any
application like apache, mysql, dovecot and others.
I can see the process is running and up, and it dies after pkg process has
finished. Looks like pkg is killing any application related to its thread.
I know it's not the best approach, but used to work on FreeBSD 10.
Anyway, I'll change my script to restart services out of pkg process.
On Fri, Aug 11, 2017 at 5:09 AM, Matthew Seaman <matt...@freebsd.org> wrote:
> On 10/08/2017 22:05, Cassiano Peixoto wrote:
> > I ran into an issue after FreeBSD 11 upgrade. I have some meta ports that
> > starts services like slapd.
> > Its has been working fine on 10-STABLE. But after FreeBSD
> > 11-STABLE r321625M upgrade it stopped working.
> > Here is a simple example of my pkg-install.in script:
> > #!/bin/sh
> > /usr/local/etc/rc.d/slapd stop
> > /usr/local/etc/rc.d/slapd start
> > I can see its executing while upgrading a package:
> > Stopping slapd.
> > Waiting for PIDS: 13875.
> > Starting slapd.
> > But looking if the process is running, it's not:
> > # ps ax | grep slapd
> > 14164 0 S+ 0:00.00 grep slapd
> > Then I manually run the rc.d script and the service starts:
> > # /usr/local/etc/rc.d/slapd restart
> > slapd not running? (check /var/run/openldap/slapd.pid).
> > Starting slapd.
> > So my question is: something has changed on FreeBSD 11 not allowing this
> > kind of execution?
> > BTW, I'm using pkg 1.10.1 and my ports collection is as same as I was
> > on FreeBSD 10.
> Restarting daemons after upgrading is something the project has been
> quite resistant to implementing. Mostly because as soon as you start
> looking into it in any depth the true complexity of doing that sort of
> thing reliably for any conceivable system becomes apparent and you end
> up muttering darkly about systemd and losing the will to live.
> However, yes, restarting slapd -- it's clear that your script does get
> called, but slapd fails to start at that point during the upgrade
> process. slapd is well known (at least to me) for failing to start
> /silently/ -- you need to check the process is actually there after
> trying to start it, and look at the logfiles and so forth. It also
> seems to quit at the slightest provocation, presumably to avoid any
> potential for data corruption.
> So check you logs to see why slapd didn't start. It's quite possible
> that it was simply that something else that slapd needed wasn't
> available at that exact point during the upgrade process, and just
> waiting until the upgrade had finished would sort things out.
email@example.com mailing list
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"