On 04/21/16 16:36, Knute Johnson wrote:> On 4/21/2016 12:01, Timo Sirainen wrote:
>> On 21 Apr 2016, at 19:51, Knute Johnson <dovecot at
knutejohnson.com>
>> wrote:
>>> On 4/21/2016 04:33, Aropalo Tommi wrote:
>>>>> I'm trying to set up replication between two servers
and I've hit a
>>>>> snag. I have two users and am using mbox files. If
anybody has a
>>>>> sample config file for a simple system like mine I would
really be
>>>>> grateful to see it.
>>>>> Thanks,
>>>>> The error I'm getting is:
>>>>> Mar 23 14:07:31 knute2 dovecot:
doveadm(192.168.3.100,nobody): Error:
>>>>> user nobody: Initialization failed: Namespace '':
>>>>> mkdir(/nonexistent/mail) failed: Permission denied
>>>>> (euid=65534(nobody)
>>>>> egid=65534(nogroup))
>>>>> Mar 23 14:07:31 knute2 dovecot:
doveadm(192.168.3.100,nobody): Error:
>>>>> dsync-server: User init failed
>>>>> Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error:
sync:
>>>>> Failed >to
>>>>> start dsync-server command: 75
>>>>> knute at knute2:/etc/dovecot/conf.d $ sudo doveadm user
'*'
>>>>> nobody
>>>>> knute
>>>>> penny
>>>> You can add to conf.d/10-mail.conf
>>>>
>>>> first_valid_uid = 1000
>>>> last_valid_uid = 2000
>>>>
>>>> You have nobody uid 65534 so make last_valid_uid less than you
have in
>>>> your /etc/passwd. Same thing with the first_valid_uid just pick
first
>>>> uid after users start in your /etc/passwd
>>>>
>>>>> I don't know why the user 'nobody' shows up
here? nobody is in the
>>>>> /etc/passwd file but he has no group.
>>> I really appreciate the response to my post as it is the only one I
>>> have gotten but that doesn't really solve the problem, in fact
it
>>> generates even more errors:
>>>
>>> Apr 21 09:44:19 knute5 dovecot: doveadm(nobody): Error: sync:
Failed
>>> to start dsync-server command: 75
>>> Apr 21 09:44:34 knute5 dovecot: doveadm(216.240.58.140,nobody):
>>> Error: user nobody: Mail access for users with UID 65534 not
>>> permitted (see first_valid_uid in config file, uid from userdb
lookup).
>>> Apr 21 09:44:34 knute5 dovecot: doveadm(216.240.58.140,nobody):
>>> Error: dsync-server: User init failed
>>>
>>> Do you know if there is a guide somewhere on how to set up
>>> replication? I would really like to get this to work.
>> Replication attempts to replicate all the users returned by userdb
>> iteration. So you need to make sure that:
>>
>> doveadm user '*'
>>
>> doesn't return any extra users you don't want replicated, such
has
>> "nobody". Setting the first_valid_uid and last_valid_uid to
exclude
>> the unwanted users should have solved this problem (verify that the
>> above command doesn't return "nobody"). I think the
problem you have
>> now is simply that replicator already remembered the "nobody"
user
>> and doesn't get rid of it automatically. So remove it with:
>>
>> doveadm replicator remove nobody
>
> Thanks, running doveadm replicator remove after setting the first/last
> uid did solve that issue. Maybe you would take a look at the other
> errors I'm getting? Nothing has changed in the configurations from
> the previous posts in this thread. If you need any more information
> please let me know. Thanks!
>
> dovecot version 2.2.13
>
> Apr 21 14:30:19 knute5 dovecot: dsync-server(penny): Panic: file
> mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type ==
> F_RDLCK || mbox->mbox_lock_type != F_RDLCK)
> Apr 21 14:30:19 knute5 dovecot: dsync-server(penny): Fatal: master:
> service(doveadm): child 2417 killed with signal 6 (core dumps disabled)
> Apr 21 14:30:58 knute5 dovecot: dsync-local(knute): Error:
> read(knutejohnson.com) failed: Connection reset by peer
> Apr 21 14:30:59 knute5 dovecot: dsync-local(penny): Panic: file
> mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type ==
> F_RDLCK || mbox->mbox_lock_type != F_RDLCK)
> Apr 21 14:30:59 knute5 dovecot: dsync-local(penny): Fatal: master:
> service(doveadm): child 2424 killed with signal 6 (core dumps disabled)
>
http://wiki.dovecot.org/MboxLocking
> dovecot version 2.2.9
>
> Apr 21 14:30:58 knutejohnson dovecot: dsync-server(knute): Fatal:
> master: service(doveadm): child 6631 killed with signal 6 (core dumped)
> Apr 21 14:30:59 knutejohnson dovecot: dsync-server(penny): Error:
> read(knute5.frazmtn.com) failed: EOF
> Apr 21 14:32:45 knutejohnson dovecot: imap-login: Login:
user=<knute>,
> method=PLAIN, rip=192.168.3.5, lip=216.240.58.140, mpid=6667, TLS,
> session=<x955cwUxdQDAqAMF>
> Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Panic: file
> mbox-lock.c: line 799 (mbox_lock): assertion failed: (lock_type ==
> F_RDLCK || mbox->mbox_lock_type != F_RDLCK)
> Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Error: Raw
> backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x5e271) [0x7fc04f02c271]
> -> /usr/lib/dovecot/libdovecot.so.0(+0x5e34e) [0x7fc04f02c34e] ->
> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fc04efe7a9e] ->
> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_lock+0xcf)
> [0x7fc04f2e2c2f] ->
> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_save_begin+0x5f8)
> [0x7fc04f2e45b8] ->
> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_begin+0x43)
> [0x7fc04f307813] ->
> /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_copy+0x69)
> [0x7fc04f2ff979] ->
> /usr/lib/dovecot/modules/lib15_notify_plugin.so(+0x22ae)
> [0x7fc04e8032ae] ->
> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_copy+0x54)
> [0x7fc04f3078d4] ->
> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_move+0x15)
> [0x7fc04f307985] -> dovecot/doveadm-server(+0x20e4f) [0x7fc04f7e6e4f]
> -> dovecot/doveadm-server(+0x2181b) [0x7fc04f7e781b] ->
> dovecot/doveadm-server(dsync_mailbox_import_changes_finish+0x172)
> [0x7fc04f7e9802] ->
> dovecot/doveadm-server(dsync_brain_sync_mails+0x6bd) [0x7fc04f7e5add]
> -> dovecot/doveadm-server(dsync_brain_run+0x523) [0x7fc04f7e1f93] ->
> dovecot/doveadm-server(+0x1c270) [0x7fc04f7e2270] ->
> dovecot/doveadm-server(+0x2de60) [0x7fc04f7f3e60] ->
> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27)
> [0x7fc04f03c247] -> /usr/lib
> dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7fc04f03cfd7] ->
> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fc04f03bde8] ->
> dovecot/doveadm-server(+0x198fd) [0x7fc04f7df8fd] ->
> dovecot/doveadm-server(+0xebeb) [0x7fc04f7d4beb] ->
> dovecot/doveadm-server(+0x184d3) [0x7fc04f7de4d3] ->
> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27)
> [0x7fc04f03c247] ->
> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7)
> [0x7fc04f03cfd7] -> /usr/lib/dovecot/libdoveco .so.0(io_loop_run+0x38)
> [0x7fc04f03bde8] ->
> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
> [0x7fc04efecc93] -> dovecot/doveadm-server(main+0x11b) [0x7fc04f7d494b]
> Apr 21 14:32:46 knutejohnson dovecot: dsync-local(knute): Fatal:
> master: service(doveadm): child 6668 killed with signal 6 (core dumped)
>