You are not logged in.

#1 2011-05-06 00:51:17

w7nz7k
Member
Registered: 2010-08-18
Posts: 13

courier-imap ERROR: authdaemond is not running

I recently upgraded the system and rebooted my server. On squirrelmail, I get a 

Error connecting to IMAP server: localhost.
111 : Connection refused

I get:

[root ~]: /etc/rc.d/courier-imap start
ERROR: authdaemond is not running

authdaemod seems to be running which makes everything spooky.

This is what I have installed an running at the moment.

DAEMONS=(syslog-ng network netfs crond sshd ntpd httpd spamd mysqld postfix rpcbind fam authdaemond courier-imap)

I know I am not giving a lot of info, please request, I'll post everything. Any hints, clues, anything will be greatly appreciated

w7zn7k

Offline

#2 2011-05-06 04:57:40

Cagnulein
Member
From: Modena, Italy
Registered: 2006-04-03
Posts: 260
Website

Re: courier-imap ERROR: authdaemond is not running

same issue here

Offline

#3 2011-05-06 05:43:51

Cagnulein
Member
From: Modena, Italy
Registered: 2006-04-03
Posts: 260
Website

Re: courier-imap ERROR: authdaemond is not running

I've resolved the issue. It's in the /etc/rc.d/courier-imap script.
You need to change this line

    if [ ! -f /var/run/daemons/authdaemond ]; then

with this line

    if [ ! -f /var/run/authdaemond.pid ]; then

The full modified script:

#!/bin/bash

CI_DAEMONS=
[ -f /etc/conf.d/courier-imap ] && . /etc/conf.d/courier-imap
[ -z $AUTO_AUTHDAEMON_LAG ]   && AUTO_AUTHDAEMON_LAG=2
[ -z $AUTO_AUTHDAEMON ]       && AUTO_AUTHDAEMON="false"

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)

    [ -d /var/run/courier ] || mkdir -p /var/run/courier
    chown courier:courier /var/run/courier

    if [ "$AUTO_AUTHDAEMON" == "true" ]; then
      /etc/rc.d/authdaemond start
      sleep ${AUTO_AUTHDAEMON_LAG}
    fi
    if [ ! -f /var/run/authdaemond.pid ]; then
      echo "ERROR: authdaemond is not running"
      stat_fail
      exit 1
    fi
    for daemon in $CI_DAEMONS; do
      stat_busy "Starting Courier ${daemon}"
      /usr/lib/courier-imap/${daemon}.rc start
      if [ $? -gt 0 ]; then
        stat_fail
      else
        add_daemon $daemon
        stat_done
      fi
    done
    ;;
  stop)
    for daemon in $CI_DAEMONS; do
      stat_busy "Stopping Courier ${daemon}"
      /usr/lib/courier-imap/$daemon.rc stop > /dev/null
      if [ $? -gt 0 ]; then
        stat_fail
      else
        rm_daemon $daemon
        stat_done
      fi
    done
    if [ "$AUTO_AUTHDAEMON" == "true" ]; then
      /etc/rc.d/authdaemond stop
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0
~                                                                                                                                                         
~         

Offline

#4 2011-05-13 08:20:14

herve18
Member
Registered: 2010-12-02
Posts: 5

Re: courier-imap ERROR: authdaemond is not running

I had the same issue on a production server, along with famd and rcpbind (same resolution by editing the rc script).

That's the first time I am disappointed about Archlinux.

Offline

#5 2011-05-20 09:13:00

herve18
Member
Registered: 2010-12-02
Posts: 5

Re: courier-imap ERROR: authdaemond is not running

Anyone knows what happened? No news was published about changes in rc scripts.

The only thing that may be related is the new rc.d binary but not a word about rc scripts needing to be changed.

Offline

#6 2011-07-15 00:36:00

smv
Member
From: Galați, România
Registered: 2011-02-27
Posts: 2
Website

Re: courier-imap ERROR: authdaemond is not running

The fix is not needed, unless you screwed /etc/rc.d/authdaemond, which does

ln -s /var/spool/authdaemon/pid /var/run/authdaemond.pid
add_daemon authdaemond

where add_daemon is taken from /etc/rc.d/functions and it creates /var/run/daemons/authdaemond
Here it works fine without the fix and all files are in place.

ls -al /var/spool/authdaemon/pid
-rw-r--r-- 1 root root 5 iul 14 18:01 /var/spool/authdaemon/pid

ls -al /var/run/authdaemond.pid
lrwxrwxrwx 1 root root 25 iul 14 18:01 /var/run/authdaemond.pid -> /var/spool/authdaemon/pid

ls -al /var/run/daemons/authdaemond
-rw-r--r-- 1 root root 0 iul 14 18:01 /var/run/daemons/authdaemond

Also, please keep in mind that /etc/rc.d/courier-imap is to be deprecated.

Offline

#7 2011-08-07 12:28:29

tuxfusion
Member
Registered: 2007-12-31
Posts: 98

Re: courier-imap ERROR: authdaemond is not running

ls -al /var/run/daemons/authdaemond
ls: cannot access /var/run/daemons/authdaemond: No such file or directory

someone should file a bug report , 4/5 people in this thread have this effect


EDIT:

it's a bug i the rc.script  new folder for daemons is  /run/daemons/ :


ls -al /run/daemons/
drwxr-xr-x 2 root root 4096 Aug  7 14:24 .
drwxr-xr-x 3 root root 4096 May 15 12:12 ..
-rw-r--r-- 1 root root    0 Aug  7 14:24 authdaemond



EDIT 2:


my bug report:

https://bugs.archlinux.org/task/25434


Edit 3:
my temporary fix this :

rm -r /var/run/daemons/
ln -s /run/daemons/ /var/run/

Result ->

rc.d start pop3d pop3d-ssl imapd imapd-ssl 
:: Starting Courier pop3d                                                           [DONE] 
:: Starting Courier pop3d-ssl                                         [DONE] 
:: Starting Courier imapd                           [DONE] 
:: Starting Courier imapd-ssl                     [DONE] 

Last edited by tuxfusion (2011-08-07 12:59:59)

Offline

Board footer

Powered by FluxBB