Issue 451: gerrit.sh shows OK before gerrit is really ready to accept connections
Status:  Released
Owner: ----
Closed:  Mar 2012
Reported by mike.lifeguard@gmail.com, Feb 13, 2010
Affected Version: 2.1.1
Environment: Ubuntu (karmic)

What steps will reproduce the problem?
1. tail -f logs/error_log
2. Run gerrit.sh start -d /path/to/wherever
3. See gerrit.sh say "OK"
4. Immediately try to connect - the server isn't up yet
5. Keep waiting. In error_log you will see it takes several more seconds to
actually be ready to accept incoming connections. Indeed, errors can still
be encountered, and gerrit.sh won't tell the user anything, because it has
already said OK and ended.

gerrit.sh should wait until the server is really ready before saying OK.
Feb 13, 2010
#1 sop@google.com
Yea, I've been burned this too.  We should fix it somehow.

Off the top of my head, the easiest thing to do is grab the httpd.listenAddress
and/or sshd.listenAddress out of the gerrit.config and then poke those ports in
a loop until the daemon answers.  The problem is I think you can disable either
daemon through command line flags, so we might need to look for either.  Also
its a bit tricky to parse those listenAddress fields to pull out the port.  I'm
not sure I would want to do that in Bourne shell.
Status: Accepted
Feb 24, 2010
#2 sop@google.com
Fixed in change Ic5018b347a5037221c3d26c16c71173f5071d244
Status: Fixed
Labels: Milestone-2.1.2
Mar 27, 2012
#3 sop@google.com
(No comment was entered for this change.)
Status: Released