dsync error: Received unexpected input d != N
Hi,
I'm trying to set up replication with dsync, and I'm getting errors like this:
dsync-local(david@mandelberg.org)<...>: Error: dsync(...): Received unexpected input d != N
I tried the doveadm -D sync
command from
https://doc.dovecot.org/configuration_manual/replication/#administration
and its output looked like:
... dsync-local(david@mandelberg.org)<...>: Debug: brain M: Locking done by remote (local hostname=..., remote hostname=...) dsync-local(david@mandelberg.org)<...>: Debug: brain M: Local mailbox tree: ... [line above repeated many times for different mailboxes] dsync-local(david@mandelberg.org)<...>: Error: dsync(...): Received unexpected input d != N dsync-local(david@mandelberg.org)<...>: Error: dsync(...): Received unexpected input d != N dsync-local(david@mandelberg.org)<...>: Debug: auth-master: conn unix:/run/dovecot/auth-userdb (pid=47097,uid=0): Disconnected: Connection closed (fd=8)
I'm a bit stuck. Does anybody have any ideas what's going on? The output
of doveconf -n
is attached.
Op 02-11-2021 om 22:43 schreef David Mandelberg:
Hi,
I'm trying to set up replication with dsync, and I'm getting errors like this:
I figured it out :)
dsync-local(david@mandelberg.org)<...>: Error: dsync(...): Received unexpected input d != N
To debug this, I changed dsync_remote_cmd to a script with these contents:
#!/bin/sh tee /tmp/tmp.MsfWIQCvNk/outbound.log | nc.openbsd -U /run/dovecot/dovecot-replication-client | tee /tmp/tmp.MsfWIQCvNk/inbound.log
Then looking at the inbound.log file, the lines that seemed to be causing the "d != N" errors looked like this:
dsync-remote(david@mandelberg.org)<...>: Error: dsync(local): Remote dsync doesn't use compatible protocol
I had written a wrapper script in python that did this:
username = sys.stdin.readline().rstrip('\n') os.execvp('doveadm', ('doveadm', 'dsync-server', '-u', username))
Apparently sys.stdin.readline() reads more than just the one line from stdin, so it was consuming the VERSION line.
The actual issue was totally my fault for the wrapper script, but is there any chance dovecot could log the "Remote dsync doesn't use compatible protocol" lines instead of (or in addition to) sending them to the other end? That would have saved some debugging effort.
participants (1)
-
David Mandelberg