Re: is there a reason for starting zookeeper.service in background?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> well. But if you can double fork() in Java you should be fine and can

it seems that zookeeper is doing the fork in the bash script using nohub
not in java

> when it finished setting up its listening socket. You cannot script

typically I loop using "lsof" or "nc"

> Polling around a 1s sleep loop. That's a gross hack.

usually I use loop i over `seq XYZ` and sleep increasing amount (I start sleep with 0.1s then 0.2s then 0.3 ...) then give up
and there is no initial wait

bash -c "for i in `seq 1000 100000 1000`; do echo '' | nc localhost $PORT 1>/dev/null 2>/dev/null && echo $PORT is up && break; usleep $i; done"

> at the same point as for mariadb /  mysql

thank you this is what I'm talking about





On Tue, Jan 12, 2016 at 4:45 PM, Lennart Poettering <mzerqung@xxxxxxxxxxx> wrote:
On Tue, 12.01.16 10:22, Muayyad AlSadi (alsadi@xxxxxxxxx) wrote:

>
> @Lennart Poettering is there a way to use something like "ExecStartPost="
> do the the notify with type=simple?

When would you even call that? Somehow your Java app needs to report
when it finished setting up its listening socket. You cannot script
around that fact.

Lennart

--
Lennart Poettering, Red Hat

--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux