No host ssh keys found under /var/gerrit/etc

914 views
Skip to first unread message

abhishek gaikwad

unread,
Mar 15, 2019, 7:27:06 AM3/15/19
to Repo and Gerrit Discussion
When running gerrit on docker container. I am getting ssh keys not found in /var/gerrit/etc directory. Following is the screen shot of the docker log.
Can some one tell me which ssh keys are required.

Also facing issue when initializing gerrit on server without using docker. Following error occurs when I say yes to create administrator account during initialization. Second screenshot shows this error.
gerrit_log_snap.JPG
gerrit_init_error.JPG

Gert van Dijk

unread,
Mar 15, 2019, 8:18:29 AM3/15/19
to Repo and Gerrit Discussion
On Friday, 15 March 2019 12:27:06 UTC+1, abhishek gaikwad wrote:
When running gerrit on docker container. I am getting ssh keys not found in /var/gerrit/etc directory. Following is the screen shot of the docker log.
Can some one tell me which ssh keys are required.

SSH host keys should be generated by Gerrit init if absent. The init process spawns an external ssh-keygen process to do that. Make sure you have ssh-keygen installed in your Docker environment. E.g. in Debian- and derivatives, this is provided by the openssh-client package.

If that does not help, what kind of Docker image are you using? Home grown or a public one available? Just so we can reproduce...
 
Also facing issue when initializing gerrit on server without using docker. Following error occurs when I say yes to create administrator account during initialization. Second screenshot shows this error.

That error *seems* unrelated to your other error, but looks severe. What is the Java version that you're using there?

Also, please copy/paste textual content instead of sharing images as screenshots. It makes it easier for others to help you, by allowing them to copy the text and search. Thanks.

HTH
Message has been deleted

abhishek gaikwad

unread,
Mar 16, 2019, 5:40:13 AM3/16/19
to Repo and Gerrit Discussion
Hi,
I am using 
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode) On my host machine.
When running java -jar gerrit-2.16.7.war init -d /home/gerrit/review_site on cloud server and reaching the step to create administratorit gives me following error I am posting all the steps here.


Attaching a text file conatining actual output of the above java -jar command. 
gerrit_cloud_server_error.txt

Gert van Dijk

unread,
Mar 21, 2019, 5:59:55 AM3/21/19
to Repo and Gerrit Discussion
On Saturday, 16 March 2019 10:40:13 UTC+1, abhishek gaikwad wrote:
I am using 
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode) On my host machine.
When running java -jar gerrit-2.16.7.war init -d /home/gerrit/review_site on cloud server and reaching the step to create administratorit gives me following error I am posting all the steps here.


Attaching a text file conatining actual output of the above java -jar command. 

Did you manage to find a solution to that?
It looks like a bug to me, but I'm quite sure your existing site directory is related. Can you confirm that you can init a new site on the same machine? If so, please file an issue on the tracker with details that lead up to this error (e.g. history of Gerrit versions you've used on that site, OS version, etc.).

And what about the original issue you had in Docker with SSH host keys? You haven't answered my earlier questions to that really:

If that does not help, what kind of Docker image are you using? Home grown or a public one available?
 
Also, if home-grown are you able to share that image or Dockerfile somewhere?

HTH

abhishek gaikwad

unread,
Mar 25, 2019, 1:56:24 AM3/25/19
to Repo and Gerrit Discussion
Hi,
I managed it by using older version of gerrit in docker as well as without docker. I downloaded gerrit version 2.14.19 war file and used openfrontier/gerrit :2.14.18 docker image.
But now I m facing error while integrating jenkins with gerrit.
I have created a jenkins user in gerrit and added jenkins public key to jenkins_gerrit acoount.
When I entered all the information in jenkins gerrit trigger settings, I am getting 
Connection error : com.jcraft.jsch.JSchException: java.net.ConnectException: Connection timed out (Connection timed out)
Can you help me to solve this issue
Reply all
Reply to author
Forward
0 new messages