[Dovecot] 1.0beta8 won't start: Fatal: Protocol imaps given more than once
Greetings -
I've just built Dovecot 1.0beta8 and find it refuses to start. This under Solaris 10 on an Intel-based Sun system. The error message Dovecot displays (on standard error) in response to /usr/local/sbin/dovecot is Fatal: Protocol imaps given more than once
I've checked through my configuration file and the only mention of "imaps" is here:
# Protocols we want to be serving:
# imap imaps pop3 pop3s
protocols = imap imaps
The same settings file worked OK with 1.0beta7. I've also tried using the standard dovecot-example.conf that comes with 1.0beta8 which has the "protocols" line commented out and, after adding appropriate settings for "ssl_cert_file" and "ssl_key_file", still have the same problem.
I popped a few dubugging i_info() calls into src/master/main.c to try and see what was going on and the output was as follows:
Info: set->protocols = >imap imaps<
Info: imap: *fd = -1
Info: imaps: *fd = 0
Fatal: Protocol imaps given more than once
The first line is displaying the value of the keywords in set->protocols
The second and third are within the if/then/else sequence: the first for the "imap" keyword and the second for the "imaps" keyword.
Then comes the fatal error, caused by the "fd" variable not being equal to -1 (it is "0" for "imaps") above.
Changing the dovecot.conf file to read protocols = imap lets Dovecot start up OK. Changing it to protcols = imaps causes it to fail in the same way as before(!).
Seems to be a problem with the initialisation of set->ssl_listen_fd therefore, as this should apparently be -1? Is this likely to be something I've got wrong (wouldn't have thought so as 1.0beta7 is happy with the same config file) or is there a problem in 1.0beta8?
Cheers, Mike B-)
-- The Computing Service, University of York, Heslington, York Yo10 5DD, UK Tel:+44-1904-433811 FAX:+44-1904-433740
- Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
Footnote...
--On 12 May 2006 13:29:10 +0100 Mike Brudenell <pmb1@york.ac.uk> wrote:
Seems to be a problem with the initialisation of set->ssl_listen_fd therefore, as this should apparently be -1? Is this likely to be something I've got wrong (wouldn't have thought so as 1.0beta7 is happy with the same config file) or is there a problem in 1.0beta8?
Looks like my problem may lie in src/master/main.c here:
#ifdef HAVE_SSL set->ssl_listen_port = set->protocol == MAIL_PROTOCOL_IMAP ? 993 : 995; #else set->ssl_listen_port = 0; #endif
Yet HAVE_SSL is definitely defined in config.h -- I've just checked yet again!
If anyone has any ideas I'd be grateful, otherwise I'll pursue it further after lunch.
Cheers, Mike B-)
-- The Computing Service, University of York, Heslington, York Yo10 5DD, UK Tel:+44-1904-433811 FAX:+44-1904-433740
- Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
On Fri, 2006-05-12 at 13:29 +0100, Mike Brudenell wrote:
Info: set->protocols = >imap imaps< Info: imap: *fd = -1 Info: imaps: *fd = 0 Fatal: Protocol imaps given more than once
OK, I guess you didn't compile with C99-compatible C compiler. The problem is that Dovecot fallbacks to old way of initializing structs, and looks like I've been lazy and not keeping them working properly.
Attached patch should fix it.
Greetings -
--On 12 May 2006 16:00:31 +0300 Timo Sirainen <tss@iki.fi> wrote:
OK, I guess you didn't compile with C99-compatible C compiler.
If it's any help I'm using a quite up to date copy of Sun's WSpro C compiler (don't know if there's a more up to date product name: they change it every now and then)...
% cc -V
cc: Sun C 5.8 Patch 121016-02 2006/03/31
Its man page mentions a "-xc99" command line option which I've just tried using to build the (unpatched) source ... which then runs fine.
The problem is that Dovecot fallbacks to old way of initializing structs, and looks like I've been lazy and not keeping them working properly.
Attached patch should fix it.
I then applied your patch and rebuilt Dovecot *without* the "-xc99" compiler option ... and that, too, works fine.
Many thanks!
Mike B-)
-- The Computing Service, University of York, Heslington, York Yo10 5DD, UK Tel:+44-1904-433811 FAX:+44-1904-433740
- Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
On Fri, May 12, 2006 at 02:28:25PM +0100, Mike Brudenell wrote:
Greetings -
--On 12 May 2006 16:00:31 +0300 Timo Sirainen <tss@iki.fi> wrote:
OK, I guess you didn't compile with C99-compatible C compiler.
If it's any help I'm using a quite up to date copy of Sun's WSpro C compiler (don't know if there's a more up to date product name: they change it every now and then)...
% cc -V cc: Sun C 5.8 Patch 121016-02 2006/03/31
Its man page mentions a "-xc99" command line option which I've just tried using to build the (unpatched) source ... which then runs fine.
The problem is that Dovecot fallbacks to old way of initializing structs, and looks like I've been lazy and not keeping them working properly.
Attached patch should fix it.
I then applied your patch and rebuilt Dovecot *without* the "-xc99" compiler option ... and that, too, works fine.
Timo, Mike,
I wonder if this has something to do with the occasional crashing problem I'm observing on Solaris?... I am using
# /opt/SUNWspro/bin/cc -V cc: Sun C 5.7 Patch 117837-04 2005/05/11
I'll give this a try later today.
grant.
Timo,
I installed beta8 plus your patch on Solaris 10 sparc, and it seems to be working so far...
Jeff Earickson Colby College
On Sat, 13 May 2006, grant beattie wrote:
Date: Sat, 13 May 2006 10:52:01 +1000 From: grant beattie <grant@grunta.com> To: Mike Brudenell <pmb1@york.ac.uk> Cc: Timo Sirainen <tss@iki.fi>, dovecot@dovecot.org Subject: Re: [Dovecot] 1.0beta8 won't start: Fatal: Protocol imaps given more than once
On Fri, May 12, 2006 at 02:28:25PM +0100, Mike Brudenell wrote:
Greetings -
--On 12 May 2006 16:00:31 +0300 Timo Sirainen <tss@iki.fi> wrote:
OK, I guess you didn't compile with C99-compatible C compiler.
If it's any help I'm using a quite up to date copy of Sun's WSpro C compiler (don't know if there's a more up to date product name: they change it every now and then)...
% cc -V cc: Sun C 5.8 Patch 121016-02 2006/03/31
Its man page mentions a "-xc99" command line option which I've just tried using to build the (unpatched) source ... which then runs fine.
The problem is that Dovecot fallbacks to old way of initializing structs, and looks like I've been lazy and not keeping them working properly.
Attached patch should fix it.
I then applied your patch and rebuilt Dovecot *without* the "-xc99" compiler option ... and that, too, works fine.
Timo, Mike,
I wonder if this has something to do with the occasional crashing problem I'm observing on Solaris?... I am using
# /opt/SUNWspro/bin/cc -V cc: Sun C 5.7 Patch 117837-04 2005/05/11
I'll give this a try later today.
grant.
participants (4)
-
grant beattie
-
Jeff A. Earickson
-
Mike Brudenell
-
Timo Sirainen