Go back and double check your Tomcat configuration. It looks like
Tomcat doesn't have the right data and thus cannot setup the
connection for Gerrit.
That sounds like the embedded SSHD cannot load the host key, because
it cannot find the BouncyCastle JARs. Make sure the JARs are copied
in from $site_path/lib and restart the Tomcat container? I've never
tried to use the SSHD with BouncyCastle under Tomcat, I've only used
it under the embedded Jetty that Gerrit comes with.
You could try to remove the need for BouncyCastle by removing the bc
JARs from $site_path/lib, removing the host keys from $site_path/etc,
and re-running init. Instead of answering "y" to the BouncyCastle
question answer "n" and Gerrit will create the host key using a
serialized Java object, which can be read without the BouncyCastle
code.
This is the Tomcat server running out of file descriptors I think. Try
increasing your Tomcat server to have more available file descriptors
by setting its ulimit higher when the server starts. The gerrit.sh
script that comes with Gerrit already knows to do this when its
running the internal Jetty.
I know, it seems unrelated to the error. But MINA SSHD seems to forget
its SSH public key sometimes, and then spits back this sort of garbage
when it cannot open its key because it ran out of file descriptors.