[daisy] [JIRA] Created: (DSY-431) Daisy wiki wrapper script should check/wait 'smart' for the repository to run!

Andreas Deininger adeininger at googlemail.com
Tue Mar 20 08:48:11 CDT 2007


2007/3/20, Bruno Dumon <bruno at outerthought.org>:
> On Tue, 2007-03-20 at 08:32 +0100, Andreas Deininger wrote:
> > 2007/3/19, Steven Noels <stevenn at outerthought.org>:
> > > On 19 Mar 2007, at 23:01, Marc Portier (JIRA) wrote:
> > >
> > > > wait_for_server_start () {
> > > >   port=$1
> > > >   counter=0
> > > >   serverstatus=`netstat -l  | grep -e "^tcp.*:${port}"`
> > >
> > > That command is pretty Linux-specific, I'm afraid.
> >
> > Windows has yet another version (coming with the MSYS Tools):
> >
> > NETSTAT [-a] [-b] [-e] [-n] [-o] [-p Protokoll] [-r] [-s] [-v] [Intervall]
> >
> > Inside my windows installer, I'm facing exactly the same problem.
> > Here, I'm using a utility called T4ePingPort which is used to check
> > whether we can successfully to the daisy repository and wiki. It is
> > taken from the Tools4ever Command Line Utilities Bundle, which can be
> > obtained via:
> > http://www.tools4ever.com/products/free/command/.
> >
>
> Maybe something can be written in Java, so that it would work on any
> platform.
>
> > I'm wondering whether we shouldn't go the other way and tackling that
> > issue from the wiki side (besides altering the startup scripts, which
> > could be  also useful). There was an issue on that (DSY 317) already
> > which was discarded.
> > Would be nice if instead on cocoon error page talking about an
> > initialization error there would be a button "Reconnect" that allows
> > you to try to connect to the repository again. Now idea how difficult
> > it would be to implement such a behaviour.
>
> A "Reconnect" button seems pretty strange to me. Could you imagine
> surfing to e.g. google.com and seeing such a button there? :-)
>
> A possible solution would be to do the initialization in a background
> thread, which could retry to connect until it succeeds. This way,
> initialization of cocoon will not fail, a nicer error can be shown if
> the connnection was not yet established, and it copes with the wiki
> being up earlier than the repo.

Maybe we could come up with a reusable solution that could be used
during the daisy wiki and wiki data initialisation, too, since we are
facing almost the same problem there. This way, maybe a port check
utility will not be needed at all.

Regards
Andreas


More information about the daisy mailing list