problem with replication (revisited)

383 views
Skip to first unread message

Chanda Unmack

unread,
May 23, 2013, 8:43:31 PM5/23/13
to Repo and Gerrit Discussion
I found an old thread with my exact problem, but the resolution did not work for me.

I'm trying to replicate to a separate instance on the same server that gerrit is running on. The "slave" instance is running as a different user, but I have verified that I can do passwordless ssh from the user gerrit runs as to the user the slave is running as. I verified the permissions were correct on the ~/.ssh directory and the known_hosts file, HOME is set correctly, and that I disabled the ecdsa in the sshd_config file.


the error_log for all the projects I'm trying to replicate is:

[2013-05-23 17:27:49,035] ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Cannot replicate to ssh://hostname/project
org.eclipse.jgit.errors.TransportException: ssh://hostname/project: reject HostKey: hostname
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
at com.googlesource.gerrit.plugins.replication.PushOne.listRemote(PushOne.java:400)
at com.googlesource.gerrit.plugins.replication.PushOne.doPushAll(PushOne.java:348)
at com.googlesource.gerrit.plugins.replication.PushOne.generateUpdates(PushOne.java:341)
at com.googlesource.gerrit.plugins.replication.PushOne.pushVia(PushOne.java:290)
at com.googlesource.gerrit.plugins.replication.PushOne.runImpl(PushOne.java:244)
at com.googlesource.gerrit.plugins.replication.PushOne.runPushOperation(PushOne.java:202)
at com.googlesource.gerrit.plugins.replication.PushOne.access$000(PushOne.java:69)
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:181)
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:178)
at com.google.gerrit.server.util.RequestScopePropagator$5.call(RequestScopePropagator.java:196)
at com.google.gerrit.server.util.RequestScopePropagator$4.call(RequestScopePropagator.java:174)
at com.google.gerrit.server.git.PerThreadRequestScope$Propagator$1.call(PerThreadRequestScope.java:73)
at com.googlesource.gerrit.plugins.replication.PushOne.run(PushOne.java:178)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:337)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.jcraft.jsch.JSchException: reject HostKey: hostname
at com.jcraft.jsch.Session.checkHost(Session.java:712)
at com.jcraft.jsch.Session.connect(Session.java:313)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
... 25 more


I've tried using the hostname, localhost, user@hostname with the same result.

Running gerrit 2.5.2
I get no errors on reloading the plugin

replication config:

[remote "secondary"]
        url = ssh://hostname/${name}.git
        push = refs/heads/*:refs/heads/*
        authGroup = Replicate

I checked the box for the group Replicate so that it's visible to all registered users, and the projects that I want replicated the group Replicate has read access to refs/*

Any pointers greatly appreciated as I feel I'm missing something obvious here.

thanks!

chanda

Chanda Unmack

unread,
May 28, 2013, 11:22:33 AM5/28/13
to Robert Jones, Repo and Gerrit Discussion



On Fri, May 24, 2013 at 6:42 PM, Robert Jones <time2...@gmail.com> wrote:
Hi ,
Make sure you have the components necessary for replication 
./ssh/config 
Pub keys 
and test by doing an ssh to the replicant with out using a password or cahallange response .
If all those things are in place ...

I used this in the same fashion , Using ssh , 
        url = Name_of_...@example.com:/gitrepos/${name}.git/   #I had to add the trailing slash or it didnt work , and I wanted to mirror every thing , you dont have to use the push's in my example or the git style revieve pack options
        push = +refs/*:refs/*
        push = refs/changes
        push = +refs/heads
        push = +refs/meta
        push = +refs/tags
        timeout = 0
        replicationDelay = 8
        replicationRetry = 45
        receivepack = /usr/bin/git-receive-pack
        uploadpack = /usr/bin/git-upload-pack
        threads = 5

Thanks! that seems to have gotten rid of the dump, still not quite there but I think there's something amiss on the other end. Not having the log fill up with the java stack is definitely making that easier to debug.

chanda 

Reply all
Reply to author
Forward
0 new messages