[Dovecot] Cygwin and dovecot-auth problems
Hi all. I'm trying to install Dovecot 1.1.rc13 on Cygwin. I've read the related posts, and I realize that maybe there's no solution at present; since I'm having a different error, though, I'm posting it here.
Compilation succeeds. Starting dovecot from command line results in:
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings Warning: Last died with error (see error log for more information): Auth process died too early - shutting down
Trying to run just dovecot-auth outputs:
dovecot-auth: Fatal: MECHANISMS environment is unset
Now, if I try to set an environment variable called MECHANISMS (say, export MECHANISMS=plain) I get a different error:
dovecot-auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one
This is the output of dovecot -n:
# 1.1.rc13: /usr/local/etc/dovecot.conf Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings log_path: /tmp/logs/dovecot-error.log info_log_path: /tmp/logs/dovecot-other.log listen: 127.0.0.1 ssl_disable: yes ssl_cipher_list: ALL:!LOW:!SSLv2 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login login_user: MyUser login_greeting: Yo, mate. login_process_per_connection: no login_greeting_capability: yes login_process_size: 0 mail_max_userip_connections: 20 verbose_proctitle: yes mail_location: maildir:~/Maildir mail_process_size: 0 auth default: verbose: yes debug: yes process_size: 0 passdb: driver: passwd-file args: /etc/passwd userdb: driver: passwd-file args: /etc/passwd
Any clues or suggestions, anything I could try...? ^__^
Thanks,
Angelo
___________________________________
Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione! http://www.ymailblogit.com/blog/
On Sat, 2008-06-21 at 00:45 +0000, TBlack wrote:
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings Warning: Last died with error (see error log for more information): Auth process died too early - shutting down
Look at the logs for the exact reason why auth process died. http://wiki.dovecot.org/Logging
Trying to run just dovecot-auth outputs:
dovecot-auth: Fatal: MECHANISMS environment is unset
This is normal. You shouldn't try to run dovecot-auth directly.
21/06/2008 3.57 - Timo Sirainen wrote:
On Sat, 2008-06-21 at 00:45 +0000, TBlack wrote:
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings Warning: Last died with error (see error log for more information): Auth process died too early - shutting down
Look at the logs for the exact reason why auth process died. http://wiki.dovecot.org/Logging
The error log, each time I try to start Dovecot from a command line, has these two lines appended:
dovecot: Jun 21 12:16:23 Error: Socket already exists: /usr/local/var/run/dovecot/dict-server dovecot: Jun 21 12:16:24 Fatal: Auth process died too early - shutting down
Following the december 2007 thread between you and Ronny:
http://dovecot.markmail.org/search/?q=cygwin+2nd
...I tried to start dovecot via inetd rather than command line, and now I seem to be stuck at exactly the same point. Dovecot starts, but when I telnet localhost 143 I see:
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Fatal: EOF while reading environment from master Connection closed by foreign host.
By the way, if I restart inetd and try to telnet again I get this (just like Ronny):
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Fatal: write_full(master_fd) failed: Transport endpoint is not connected Connection closed by foreign host.
Cleaning the /usr/local/var/run/dovecot directory works for me, too.
Now, was there anything to try at this point? The old thread just stopped here.. :-(
A.
On Sat, 2008-06-21 at 14:27 +0200, Blacktate wrote:
21/06/2008 3.57 - Timo Sirainen wrote:
On Sat, 2008-06-21 at 00:45 +0000, TBlack wrote:
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings Warning: Last died with error (see error log for more information): Auth process died too early - shutting down
Look at the logs for the exact reason why auth process died. http://wiki.dovecot.org/Logging
The error log, each time I try to start Dovecot from a command line, has these two lines appended:
dovecot: Jun 21 12:16:23 Error: Socket already exists: /usr/local/var/run/dovecot/dict-server dovecot: Jun 21 12:16:24 Fatal: Auth process died too early - shutting down
If you delete the dict-server socket and start Dovecot again, does it then show anything else except the "Auth process died" message?
Following the december 2007 thread between you and Ronny:
http://dovecot.markmail.org/search/?q=cygwin+2nd
...I tried to start dovecot via inetd rather than command line, and now I seem to be stuck at exactly the same point. Dovecot starts, but when I telnet localhost 143 I see:
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Fatal: EOF while reading environment from master Connection closed by foreign host.
I think these are the exact same problems. Dovecot master dies and imap-login sees that.
By the way, if I restart inetd and try to telnet again I get this (just like Ronny):
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Fatal: write_full(master_fd) failed: Transport endpoint is not connected Connection closed by foreign host.
I guess it doesn't figure out that master has died and doesn't try to restart it.
Now, was there anything to try at this point? The old thread just stopped here.. :-(
It sounds like dovecot-auth process dies with exit status 0. See if it logs anything with the attached patch.
21/06/2008 14.37 - Timo Sirainen wrote:
On Sat, 2008-06-21 at 14:27 +0200, Blacktate wrote:
On Sat, 2008-06-21 at 00:45 +0000, TBlack wrote:
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings Warning: Last died with error (see error log for more information): Auth process died too early - shutting down Look at the logs for the exact reason why auth process died. http://wiki.dovecot.org/Logging The error log, each time I try to start Dovecot from a command line, has
21/06/2008 3.57 - Timo Sirainen wrote: these two lines appended:
dovecot: Jun 21 12:16:23 Error: Socket already exists: /usr/local/var/run/dovecot/dict-server dovecot: Jun 21 12:16:24 Fatal: Auth process died too early - shutting down
If you delete the dict-server socket and start Dovecot again, does it then show anything else except the "Auth process died" message?
No, it shows just that: "Auth process died too early - shutting down".
Following the december 2007 thread between you and Ronny:
http://dovecot.markmail.org/search/?q=cygwin+2nd
...I tried to start dovecot via inetd rather than command line, and now I seem to be stuck at exactly the same point. Dovecot starts, but when I telnet localhost 143 I see:
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Fatal: EOF while reading environment from master Connection closed by foreign host.
I think these are the exact same problems. Dovecot master dies and imap-login sees that.
By the way, if I restart inetd and try to telnet again I get this (just like Ronny):
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Fatal: write_full(master_fd) failed: Transport endpoint is not connected Connection closed by foreign host.
I guess it doesn't figure out that master has died and doesn't try to restart it.
Now, was there anything to try at this point? The old thread just stopped here.. :-(
It sounds like dovecot-auth process dies with exit status 0. See if it logs anything with the attached patch.
Patch, make, replace the dovecot-auth executable, start inetd, telnet localhost: just the same error ("EOF while reading..."). The error log shows:
dovecot: Jun 21 15:51:53 Error: child 9904 (auth) returned error 53 dovecot: Jun 21 15:51:53 Fatal: Auth process died too early - shutting down
I can't seem to find the new log statements anywhere. They appear only if I start dovecot-auth directly, ant it fails like this:
Info: starting dovecot-auth dovecot-auth: Fatal: MECHANISMS environment is unset
If it helps, echoing its return value (echo $?) gives 89.
Angelo
On Sat, 2008-06-21 at 16:44 +0200, Blacktate wrote:
Patch, make, replace the dovecot-auth executable, start inetd, telnet localhost: just the same error ("EOF while reading..."). The error log shows:
dovecot: Jun 21 15:51:53 Error: child 9904 (auth) returned error 53
Wasn't this logged before? This is the real reason why it doesn't work. Googling Cygwin 53 exit code shows that it means it can't find some DLL. Maybe because Dovecot drops PATH environment before calling dovecot-auth, or maybe Cygwin needs some other environment variable?
One sure way to test that theory is the attached patch that doesn't clear environment anywhere ever.
21/06/2008 16.51 - Timo Sirainen wrote:
On Sat, 2008-06-21 at 16:44 +0200, Blacktate wrote:
Patch, make, replace the dovecot-auth executable, start inetd, telnet localhost: just the same error ("EOF while reading..."). The error log shows:
dovecot: Jun 21 15:51:53 Error: child 9904 (auth) returned error 53
Wasn't this logged before? This is the real reason why it doesn't work. Googling Cygwin 53 exit code shows that it means it can't find some DLL. Maybe because Dovecot drops PATH environment before calling dovecot-auth, or maybe Cygwin needs some other environment variable?
One sure way to test that theory is the attached patch that doesn't clear environment anywhere ever.
Yep! Almost there. At least, now the "53" error is gone. After looking at another thread between you and Ronny (back to November), I ran cygcheck:
| bash-3.2 > cygcheck.exe /usr/local/libexec/dovecot/dovecot-auth.exe D:\emu\cygwin\usr/local/libexec/dovecot/dovecot-auth.exe D:\emu\cygwin\bin\cygcrypt-0.dll D:\emu\cygwin\bin\cygwin1.dll C:\WINDOWS\system32\ADVAPI32.DLL C:\WINDOWS\system32\ntdll.dll C:\WINDOWS\system32\KERNEL32.dll C:\WINDOWS\system32\RPCRT4.dll C:\WINDOWS\system32\Secur32.dll
Fact is, the Cygwin "bin" directory (containing the first two DLLs) is not in my Windows PATH. If I add it, now the error 53 disappears even without your patch.
Sadly, I can't even login. This is what happens:
- start inetd
- in the mail client (Thunderbird), click on "Inbox" 2a) dovecot's info log shows the "...starting up" message 2b) imap-login process starts to eat cpu indefinitely 2c) thunderbird's debug log says:
0[274ce8]: 4d48a58:127.0.0.1:NA:SetupWithUrl: clearing IMAP_CONNECTION_IS_OPEN 17868[4d98cb0]: ImapThreadMainLoop entering [this=4d48a58] 17868[4d98cb0]: 4d48a58:127.0.0.1:NA:ProcessCurrentURL: entering 17868[4d98cb0]: 4d48a58:127.0.0.1:NA:ProcessCurrentURL:imap://myusername@127.0.0.1:143/select%3E%5EINBOX: = currentUrl
2d) ...and it stays there.
stop inetd
3a) info log shows this (a bit late, isn't it?):
dovecot: Jun 22 00:25:53 Info: auth(default): passwd-file /etc/passwd: Read 26 users
3b) error log shows this (should be the debug message of the first
patch you sent me):
dovecot: Jun 22 00:25:53 Error: auth(default): Info: starting dovecot-auth
3c) imap-login dies
3d) dovecot and dovecot-auth are still alive, but no connections
can be made on port 143
That's it, for now. I'll try to struggle a bit more, in case there's a fault on my part which I don't get right now.
Angelo
On Jun 22, 2008, at 1:47 AM, Blacktate wrote:
Fact is, the Cygwin "bin" directory (containing the first two DLLs) is not in my Windows PATH. If I add it, now the error 53 disappears even without your patch.
Sadly, I can't even login. This is what happens:
- start inetd
What about if you don't use inetd? That code is less tested than
running dovecot directly.
- in the mail client (Thunderbird), click on "Inbox" 2a) dovecot's info log shows the "...starting up" message 2b) imap-login process starts to eat cpu indefinitely 2c) thunderbird's debug log says:
Instead of using a mail client to test, it's better to talk IMAP
directly: http://wiki.dovecot.org/TestInstallation
22/06/2008 1.21 - Timo Sirainen wrote:
What about if you don't use inetd? That code is less tested than running dovecot directly.
| bash-3.2 > /usr/local/sbin/dovecot -F Segmentation fault (core dumped)
The info log says it starts up, and after a couple of seconds the error log gets:
dovecot: Jun 22 01:33:08 Error: auth(default): Info: starting dovecot-auth
I can attach the core dump if you want, but consider that after 20 lines or so it says:
9 [main] dovecot 19936 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)
Instead of using a mail client to test, it's better to talk IMAP directly: http://wiki.dovecot.org/TestInstallation
Same behaviour (obviously starting from inetd):
| bash-3.2 > telnet localhost 143 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.
There's no "* OK Dovecot ready.", and at this point the imap-login process stays at 80-90% cpu. Anything I write is ignored. The log still doesn't say anything about dovecot-auth until I stop the inetd service.
Angelo
participants (3)
-
Blacktate
-
TBlack
-
Timo Sirainen