dsync dovecot / Failed connection refused

Thierry lenaigst at maelenn.org
Mon Jan 23 16:58:09 UTC 2017


Dear all,

I am using VMWare and I  have cloned my emails server.
Now I do have two identicals servers, both running the same version of dovecot (2.2.13) and imap.
Let's call them: server1.domain.ltd  and server2.domain.ltd.
I would  like to sync both server using dsync.

Dovecot is working well except concerning  the sync.

dsync config server1.domain.ltd

# Enable the replication plugin globally
mail_plugins = $mail_plugins notify replication

# The mail processes need to have access to the replication-notify fifo and socket.
service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
    mode = 0666
  }
  unix_listener replication-notify {
    user = vmail
    mode = 0666
  }
}

# Enable doveadm replicator commands
service replicator {
  unix_listener replicator-doveadm {
    mode = 0666
  }
}

# Create a listener for doveadm-server
service doveadm {
  user = vmail
  inet_listener {
    port = 12345
  }
}

# configure how many dsyncs can be run in parallel (10 by default)
replication_max_conns = 10

# tell doveadm client to use this port by default
doveadm_port = 4711

#Both the client and the server also need to have a shared secret
doveadm_password = {SHA512-CRYPT}$6$rou....................
# use tcp:hostname as the dsync target
plugin {
  #mail_replica = tcp:server2.domain.ltd # use doveadm_port
  mail_replica = tcp:server2.domain.ltd:12345 # use port 12345 explicitly
}

service config {
  unix_listener config {
    user = vmail
  }
}

***************************************************************************************

dsync config server2.domain.ltd

# Enable the replication plugin globally
mail_plugins = $mail_plugins notify replication

# The mail processes need to have access to the replication-notify fifo and socket.
service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
    mode = 0666
  }
  unix_listener replication-notify {
    user = vmail
    mode = 0666
  }
}

# Enable doveadm replicator commands
service replicator {
  unix_listener replicator-doveadm {
    mode = 0666
  }
}

# Create a listener for doveadm-server
service doveadm {
  user = vmail
  inet_listener {
    port = 12345
  }
}

# configure how many dsyncs can be run in parallel (10 by default)
replication_max_conns = 10

# tell doveadm client to use this port by default
doveadm_port = 4711

#Both the client and the server also need to have a shared secret
doveadm_password = {SHA512-CRYPT}$6$ro.............
# use tcp:hostname as the dsync target
plugin {
  #mail_replica = tcp:server1.domain.ltd # use doveadm_port
  mail_replica = tcp:server1.domain.ltd:12345 # use port 12345 explicitly
}

service config {
  unix_listener config {
    user = vmail
  }
}

To test both port   I have open on  my both servers port 12345 and 4711 :

Iptables server1: ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:4711
                  ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:12345

Iptables server2: ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:4711
                  ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:12345


doveadm replicator  status '*'
username                                                                            priority fast sync full sync failed
user1 at domain.ltd                                                                none     00:01:21  11:25:40  y
user3 at domain.ltd                                                                none     07:31:16  11:25:41  -
user2 at domain.ltd                                                                none     00:01:21  11:25:40  y
user4 at domain.ltd                                                                none     11:25:41  11:25:41  -
user5 at domain.ltd                                                                none     02:17:03  11:25:41  -
user6 at domain.ltd                                                                none     11:25:40  11:25:40  -
user4 at domain.ltd                                                                none     00:00:51  11:25:40  y

When  doing, from server1:   "doveadm sync -u user1 at domain.ltd remote:server2.domain.ltd"

doveadm(user1 at domain.ltd): Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused
doveadm(user1 at domain.ltd): Fatal: /var/run/dovecot/auth-userdb: passdb lookup failed (to see if user is proxied, because doveadm_port is set)
dsync-local(user1 at domain.ltd): Error: read(server2.domain.ltd) failed: EOF (version not received)

Thx for your help.
  

-- 
Cordialement,
 Thierry                          e-mail : lenaigst at maelenn.org  
 PGP Key: 0xB7E3B9CD



More information about the dovecot mailing list