Problem adminUrl section in replication.config

234 views
Skip to first unread message

SeongUk Baek

unread,
Sep 16, 2014, 10:22:53 PM9/16/14
to repo-d...@googlegroups.com
Hi all.

I'm setting adminUrl section like below.

[remote "test_mirror"]
        url = git://domain:9419/${name}.git
        push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*
        replicationDelay = 5
        mirror = true
        threads = 10
        adminUrl = ssh://gerrit2@domain/home/gerrit2/git/${name}.git

I tested the ssh connection.
It's no problem
$ ssh gerrit2@domain

I'm getting strange error like below.

ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Error creating remote repository at ssh://gerrit2@domain/home/gerrit2/git/test/test01.git:
Exception: org.eclipse.jgit.errors.TransportException: ssh://gerrit2@domain/home/gerrit2/git/test/test01.git: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e
Command: mkdir -p '/home/gerrit2/git/test/test01.git' && cd '/home/gerrit2/git/test/test01.git' && git init --bare && git symbolic-ref HEAD 'HEAD'
Output:
org.eclipse.jgit.errors.TransportException: ssh://gerrit2@domain/home/gerrit2/git/test/test01.git: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e



Saša Živkov

unread,
Sep 17, 2014, 7:45:00 AM9/17/14
to SeongUk Baek, repo-d...@googlegroups.com
On Wed, Sep 17, 2014 at 4:22 AM, SeongUk Baek <baeks...@gmail.com> wrote:
Hi all.

I'm setting adminUrl section like below.

[remote "test_mirror"]
        url = git://domain:9419/${name}.git
        push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*
        replicationDelay = 5
        mirror = true
        threads = 10
        adminUrl = ssh://gerrit2@domain/home/gerrit2/git/${name}.git

I tested the ssh connection.
It's no problem
$ ssh gerrit2@domain

How were you logged on when you executed this command?
Do you run Gerrit server under the same user?
 


I'm getting strange error like below.

ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Error creating remote repository at ssh://gerrit2@domain/home/gerrit2/git/test/test01.git:
Exception: org.eclipse.jgit.errors.TransportException: ssh://gerrit2@domain/home/gerrit2/git/test/test01.git: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e

Which 
 
Command: mkdir -p '/home/gerrit2/git/test/test01.git' && cd '/home/gerrit2/git/test/test01.git' && git init --bare && git symbolic-ref HEAD 'HEAD'
Output:
org.eclipse.jgit.errors.TransportException: ssh://gerrit2@domain/home/gerrit2/git/test/test01.git: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SeongUk Baek

unread,
Sep 17, 2014, 8:33:44 PM9/17/14
to repo-d...@googlegroups.com, baeks...@gmail.com
Hi all.

I'm setting adminUrl section like below.

[remote "test_mirror"]
        url = git://domain:9419/${name}.git
        push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*
        replicationDelay = 5
        mirror = true
        threads = 10
        adminUrl = ssh://gerrit2@domain/home/gerrit2/git/${name}.git

I tested the ssh connection.
It's no problem
$ ssh gerrit2@domain

How were you logged on when you executed this command?

The log in without a password entered. 

Do you run Gerrit server under the same user?

Yes, same user. 


More detail logs.

[2014-09-18 09:23:24,062] ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Error creating remote repository at ssh://gerrit2@domain/home/gerrit2/git/test/test01.git:
  Exception: org.eclipse.jgit.errors.TransportException: ssh://gerrit2@domain/home/gerrit2/git/test/test01.git: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e
  Command: mkdir -p '/home/gerrit2/git/test/test01.git' && cd '/home/gerrit2/git/test/test01.git' && git init --bare && git symbolic-ref HEAD 'HEAD'
  Output:
org.eclipse.jgit.errors.TransportException: ssh://gerrit2@domain/home/gerrit2/git/test/test01.git: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e
        at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
        at com.googlesource.gerrit.plugins.replication.ReplicationQueue.connect(ReplicationQueue.java:459)
        at com.googlesource.gerrit.plugins.replication.ReplicationQueue.executeRemotSsh(ReplicationQueue.java:439)
        at com.googlesource.gerrit.plugins.replication.ReplicationQueue.createRemoteSsh(ReplicationQueue.java:368)
        at com.googlesource.gerrit.plugins.replication.ReplicationQueue.createProject(ReplicationQueue.java:328)
        at com.googlesource.gerrit.plugins.replication.ReplicationQueue.onNewProjectCreated(ReplicationQueue.java:251)
        at com.googlesource.gerrit.plugins.replication.PushOne.createRepository(PushOne.java:335)
        at com.googlesource.gerrit.plugins.replication.PushOne.runPushOperation(PushOne.java:279)
        at com.googlesource.gerrit.plugins.replication.PushOne.access$000(PushOne.java:78)
        at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:240)
        at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:237)
        at com.google.gerrit.server.util.RequestScopePropagator$5.call(RequestScopePropagator.java:222)
        at com.google.gerrit.server.util.RequestScopePropagator$4.call(RequestScopePropagator.java:201)
        at com.google.gerrit.server.git.PerThreadRequestScope$Propagator$1.call(PerThreadRequestScope.java:75)
        at com.googlesource.gerrit.plugins.replication.PushOne.run(PushOne.java:237)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        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:364)
        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:744)
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: domain. RSA key fingerprint is 31:03:06:88:ee:60:28:87:c8:27:b1:34:0b:e6:ce:8e
        at com.jcraft.jsch.Session.checkHost(Session.java:786)
        at com.jcraft.jsch.Session.connect(Session.java:342)
        at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
        ... 22 more 

Saša Živkov

unread,
Sep 18, 2014, 8:03:35 AM9/18/14
to SeongUk Baek, repo-d...@googlegroups.com
On Thu, Sep 18, 2014 at 2:33 AM, SeongUk Baek <baeks...@gmail.com> wrote:
Hi all.

I'm setting adminUrl section like below.

[remote "test_mirror"]
        url = git://domain:9419/${name}.git
        push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*
        replicationDelay = 5
        mirror = true
        threads = 10
        adminUrl = ssh://gerrit2@domain/home/gerrit2/git/${name}.git

I tested the ssh connection.
It's no problem
$ ssh gerrit2@domain

How were you logged on when you executed this command?

The log in without a password entered. 

I meant the user.. if it was exactly the same user which owns the Gerrit server process.



Do you run Gerrit server under the same user?

Yes, same user. 


More detail logs.

I still think that the Gerrit process is using the .ssh/known_hosts from a different folder
than you expect.

 

--
Reply all
Reply to author
Forward
0 new messages