[Dovecot] Solved: startup failures "net_listen_unix(...) failed: Invalid argument"

C. Mills dovecot at pyropus.ca
Thu Aug 29 03:27:14 EEST 2013


I ran into this and had a bit of trouble tracking a diagnosis down, so here it
is for the archives in case anyone else runs into this.

A new installation of dovecot was failing to start, with these messages:

  $ ./sbin/dovecot 
  Error: service(imap-urlauth):
    net_listen_unix(.../var/run/dovecot/token-login/imap-urlauth) failed: 
    Invalid argument
  Error: service(auth):
    net_listen_unix(.../var/run/dovecot/token-login/tokenlogin) failed: Invalid
    argument
  Fatal: Failed to start listeners

Some of the other processes seemed to be starting up fine, and they created
sockets in the expected dir, but the above two wouldn't.  stracing the
processes didn't show a lot, but eventually I checked the length of the
installation path, and found the above two socket paths were exceeding the
maximum path length limit for Unix sockets -- 108 chars on my Linux boxen.  I
haven't checked SuS or Posix to see what the standards say the actual minimum
required size for the maximum path length is -- it might be shorter yet on
other systems.

Moving the installation to a less deeply nested hierarchy fixed the problem.
I hope this saves someone else a headache someday.

C.
C.
-- 
-----------------------------------------------------------------------
C. Mills

-----------------------------------------------------------------------


More information about the dovecot mailing list