Saslauthd fails to start

Discussion in 'HOWTO-Related Questions' started by Cracklefish, Aug 3, 2011.

  1. Cracklefish

    Cracklefish Member

    Hi,

    set-up is Perfect Server, ISPC3, OpenSuSE 11.1

    All was working fine for a long time then I got a SMTP server log in failed message. On investigation I discovered that saslauthd was not running and would not start on boot or with etc/init.d/saslauthd start (error 7)

    I have tried uninstalling and reinstalling saslauthd using yast to no avail.

    All services, except saslauthd, start at boot up.

    Apache, pop & webmail seem ok
     
  2. Mark_NL

    Mark_NL New Member

    try:

    Code:
    strace /etc/init.d/saslauthd start
     
  3. Cracklefish

    Cracklefish Member

    Hi Mark,

    Thanks for the super prompt reply but I'm going to need some assistance. The output is many screens-full. More than I can read using Putty. I have local access to the server but I don't know how to capture it into a txt file or get that out of the machine.

    regards
    Rick
     
  4. Mark_NL

    Mark_NL New Member

    run:

    Code:
    strace -o saslauthd.txt /etc/init.d/saslauthd start
    attach the file to your next reply and i'll have a look at it.
     
  5. Cracklefish

    Cracklefish Member

    Hi Mark,

    I have attached a file.

    Thanks for the help.

    Rick
     

    Attached Files:

  6. Mark_NL

    Mark_NL New Member

    Hmm, can't make anything of that, just that it failes to start (i forgot to ask to run it with follow childprocs, but let's forget that)

    You said you reinstalled saslauthd, didn't that overwrite some of your configuration settings?

    Also, can you see anything related to the saslauthd process in your log files when you try to start it? If there's not enough info, you can set the debug level up, so you get more information in your log files. I'm not really a suse user, so i'm not sure where those sasl config files are but i guess somewhere in /etc/courier/
     
  7. Cracklefish

    Cracklefish Member

    Don't know if the is progress but...
    There doesn't seem to be any specific config details in the Perfect Server tutorial

    couldn't find a courier log but in "Messages" I got and error

    Code:
    could not chdir to: /var/run/sasl2/
    No such file or Directory
    
    I created that directory but I'm not sure of the permissions or contents it should have but now saslauthd starts

    but
    The smtp server fails auth login with pam-mysql errors
    here's the message log...
    Code:
    Aug  4 11:08:01 Golf1 /usr/sbin/cron[3747]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:09:01 Golf1 /usr/sbin/cron[3776]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:09:30 Golf1 saslauthd[3164]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:30 Golf1 saslauthd[3164]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:30 Golf1 saslauthd[3164]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Aug  4 11:09:30 Golf1 saslauthd[3164]: do_auth         : auth failure: [user=mail] [service=smtp] [realm=crosoer.com] [mech=pam] [reason=PAM auth error]
    Aug  4 11:09:30 Golf1 saslauthd[3161]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:30 Golf1 saslauthd[3161]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:30 Golf1 saslauthd[3161]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Aug  4 11:09:30 Golf1 saslauthd[3161]: do_auth         : auth failure: [user=mail] [service=smtp] [realm=crosoer.com] [mech=pam] [reason=PAM auth error]
    Aug  4 11:09:44 Golf1 saslauthd[3164]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:44 Golf1 saslauthd[3164]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:44 Golf1 saslauthd[3164]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Aug  4 11:09:44 Golf1 saslauthd[3164]: do_auth         : auth failure: [user=mail] [service=smtp] [realm=crosoer.com] [mech=pam] [reason=PAM auth error]
    Aug  4 11:09:44 Golf1 saslauthd[3161]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:44 Golf1 saslauthd[3161]: pam_mysql - SELECT returned no result.
    Aug  4 11:09:44 Golf1 saslauthd[3161]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Aug  4 11:09:44 Golf1 saslauthd[3161]: do_auth         : auth failure: [user=mail] [service=smtp] [realm=crosoer.com] [mech=pam] [reason=PAM auth error]
    Aug  4 11:10:01 Golf1 /usr/sbin/cron[3821]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
    Aug  4 11:10:01 Golf1 /usr/sbin/cron[3826]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:10:03 Golf1 pure-ftpd: (?@__1) [INFO] New connection from __1
    Aug  4 11:10:03 Golf1 pure-ftpd: (?@__1) [INFO] Logout.
    Aug  4 11:11:01 Golf1 /usr/sbin/cron[3886]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:12:01 Golf1 /usr/sbin/cron[3915]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:13:01 Golf1 /usr/sbin/cron[3944]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:14:01 Golf1 /usr/sbin/cron[3973]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:15:01 Golf1 /usr/sbin/cron[4013]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
    Aug  4 11:15:01 Golf1 /usr/sbin/cron[4015]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:15:03 Golf1 pure-ftpd: (?@__1) [INFO] New connection from __1
    Aug  4 11:15:03 Golf1 pure-ftpd: (?@__1) [INFO] Logout.
    Aug  4 11:16:01 Golf1 /usr/sbin/cron[4113]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:17:01 Golf1 /usr/sbin/cron[4142]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:18:01 Golf1 /usr/sbin/cron[4171]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:19:01 Golf1 /usr/sbin/cron[4223]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:20:01 Golf1 /usr/sbin/cron[4263]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
    Aug  4 11:20:01 Golf1 /usr/sbin/cron[4262]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:20:04 Golf1 pure-ftpd: (?@__1) [INFO] New connection from __1
    Aug  4 11:20:04 Golf1 pure-ftpd: (?@__1) [INFO] Logout.
    Aug  4 11:21:01 Golf1 /usr/sbin/cron[4325]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:22:01 Golf1 /usr/sbin/cron[4354]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:23:01 Golf1 /usr/sbin/cron[4384]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:24:01 Golf1 /usr/sbin/cron[4415]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:25:01 Golf1 /usr/sbin/cron[4444]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
    Aug  4 11:25:01 Golf1 /usr/sbin/cron[4448]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:25:03 Golf1 pure-ftpd: (?@__1) [INFO] New connection from __1
    Aug  4 11:25:03 Golf1 pure-ftpd: (?@__1) [INFO] Logout.
    Aug  4 11:26:01 Golf1 /usr/sbin/cron[4505]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    Aug  4 11:27:01 Golf1 /usr/sbin/cron[4534]: (root) CMD (/usr/local/ispconfig/server/server.sh &> /dev/null)
    
    I telnet to it and input <username> & <password> in base64 but it failed the password.
    I have SquirrelMail on the system too. With this I can log in to the mail box with the same details.

    Now where do I go?
     
  8. Mark_NL

    Mark_NL New Member

  9. Cracklefish

    Cracklefish Member

    Hi Mark,

    I started a reinstall of the Postfix etc according to the tutorial but then discovered the cause of the problem. A bad sector on the disk. So I had better replace it. I had started to build a new server uning Suse 11.3 but didn't get as far as commissioning it. Is there any idiots guide to tell me how to migrate all the data from the ISPC3, mail, web, MySQL etc?
     
  10. Mark_NL

    Mark_NL New Member

    That's not that hard .. since all client data etc is in the database it makes it a lot easier nowadays to migrate to another server.

    - Install a new fresh server with ispconfig3
    - Go to the old server ..

    - Make a complete databass dump ..
    Code:
    mysqladmin --all-databases > ~/database.sql
    - Import it on the new server ..
    Code:
    mysql < database.sql
    - Copy /var/www and /var/vmail from the old server to the new server.

    that's about it.

    it's not idiot proof i know, but it's almost weekend! ;-)

    also i don't know if there is already a migrate script.
    Maybe i'll write one some day..
     
  11. Cracklefish

    Cracklefish Member

    Sounds like a breeze, Lets hope I finish before the weekend finishes.
    Thanks for all the help

    Regards
    Rick
     
  12. Mark_NL

    Mark_NL New Member

    Just take it one step at the time, take your time, and try to understand what you're actually doing so you'll learn from it ..

    ow and also, don't forget to grab a cold one now and then, it's weekend!! ;)
     
  13. Cracklefish

    Cracklefish Member

    Hi Mark,
    Monday night and still not finished!

    I have loaded the database from the old setup and all seems ok. How do I set up all the webx clienty user.group entries. I have to have that loaded before I can tar the web and mail data or the user.groups gets messed up.

    Rgds
    Rick
     
  14. Mark_NL

    Mark_NL New Member

    You need to check the following files on the old server:
    /etc/passwd
    /etc/group

    Those contain the web users and groups, you need to copy those to the other server.
    you can simply copy and paste the "web*" lines and paste them into /etc/passwd on the new server.
    The same for /etc/group but then the "client*" lines.

    Next step is to copy all the mailboxes and websites to the new server.
    Tar the dirs and then copy the tarballs to the other server and extract them.

    (I'm assuming you're logged in as root)

    To tar the websites:
    Code:
    tar -pczf websites.tar.gz /var/www/
    To tar the mailboxes:
    Code:
    tar -pczf mailboxes.tar.gz /var/vmail/

    Copy them to your other server:
    Code:
    scp websites.tar.gz newserver:/
    scp mailboxes.tar.gz newserver:/
    log into your new server:
    Code:
    cd /
    tar -zxfv websites.tar.gz
    tar -zxfv mailboxes.tar.gz
    
     
  15. Cracklefish

    Cracklefish Member

    Thanks for that. Too many alligators in this swamp!!!

    Maybe it was an own goal but I updated the OS at the same time and there are some differences between the setup for SuSE11.1 and 11.3
    I'll leave it some time for 11.4 to settle down before upgrading to that.

    Firstly, the websites cannot get data from MySQL I get an error:

    Code:
    Host 'xxx.co.uk' is not allowed to connect to this MySQL server
    otherwise the apache, ispconfig and phpMyAdmin seem OK.

    & secondly, mail seems to be arriving ok but pop3 requests from the email client are not working.

    Squirrel mail is finding the mail.

    I cant see anything obvious in the logs, its lools like the requests are going nowhere.

    At least the SMTP is working which is why I started this whole process.
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Is the MySQL server on the same server as the web sites? If so, you should configure your sites to connect to localhost instead of xxx.co.uk.

    What are the outputs of
    Code:
    netstat -tap
    and
    Code:
    iptables -L
    ?
     
  17. Cracklefish

    Cracklefish Member

    netstst -tap gives:

    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1597/rpcbind        
    tcp        0      0 *:ftp                   *:*                     LISTEN      2348/pure-ftpd (SER 
    tcp        0      0 xxxxxx.c:domain         *:*                     LISTEN      1957/named          
    tcp        0      0 xxxxxx.c:domain         *:*                     LISTEN      1957/named          
    tcp        0      0 localhost:domain        *:*                     LISTEN      1957/named          
    tcp        0      0 *:ssh                   *:*                     LISTEN      1647/sshd           
    tcp        0      0 localhost:ipp           *:*                     LISTEN      2196/cupsd          
    tcp        0      0 *:smtp                  *:*                     LISTEN      2431/master         
    tcp        0      0 localhost:953           *:*                     LISTEN      1957/named          
    tcp        0      0 localhost:10024         *:*                     LISTEN      1769/amavisd (ch19- 
    tcp        0      0 localhost:10025         *:*                     LISTEN      2431/master         
    tcp        0      0 *:mysql                 *:*                     LISTEN      2121/mysqld         
    tcp        0      0 localhost:dyna-access   *:*                     LISTEN      1664/clamd          
    tcp        0      0 xxxxxx.co.u:ssh         192.168.1.38:49365      ESTABLISHED 12784/0             
    tcp        0      0 localhost:mysql         localhost:46246         ESTABLISHED 2121/mysqld         
    tcp        0      0 localhost:46246         localhost:mysql         ESTABLISHED 1864/amavisd (ch6-a 
    tcp        0      0 localhost:36800         localhost:mysql         ESTABLISHED 1769/amavisd (ch19- 
    tcp        0      0 localhost:mysql         localhost:36800         ESTABLISHED 2121/mysqld         
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1597/rpcbind        
    tcp        0      0 *:http-alt              *:*                     LISTEN      8219/httpd2-prefork 
    tcp        0      0 *:www-http              *:*                     LISTEN      8219/httpd2-prefork 
    tcp        0      0 *:sunproxyadmin         *:*                     LISTEN      8219/httpd2-prefork 
    tcp        0      0 *:ftp                   *:*                     LISTEN      2348/pure-ftpd (SER 
    tcp        0      0 *:domain                *:*                     LISTEN      1957/named          
    tcp        0      0 *:ssh                   *:*                     LISTEN      1647/sshd           
    tcp        0      0 localhost:ipp           *:*                     LISTEN      2196/cupsd          
    tcp        0      0 *:smtp                  *:*                     LISTEN      2431/master         
    tcp        0      0 localhost:953           *:*                     LISTEN      1957/named          
    tcp        0      0 *:https                 *:*                     LISTEN      8219/httpd2-prefork 
    tcp        0      0 *:microsoft-ds          *:*                     LISTEN      2367/smbd           
    tcp        0      0 *:netbios-ssn           *:*                     LISTEN      2367/smbd           
    tcp        0      0 xxxxxx:microsoft-ds 77-20-140-17:omnivision ESTABLISHED 12994/smbd 
    iptables -L gives

    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Thanks for the help.
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Your POP3 daemon isn't running. Please start it.
     
  19. Cracklefish

    Cracklefish Member

    Weird, Yast reported that Dovecot was set up for runlevel 3 & 5 but it wasn't running. I started it manually and it it returned "Success" I rebooted the system and it started normally.

    Now netstat -tap
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:imap                  *:*                     LISTEN      2222/dovecot
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1593/rpcbind
    tcp        0      0 *:ftp                   *:*                     LISTEN      2440/pure-ftpd (SER
    tcp        0      0 xxxx.c:domain *:*                     LISTEN      1934/named
    tcp        0      0 xxxx.c:domain *:*                     LISTEN      1934/named
    tcp        0      0 localhost:domain        *:*                     LISTEN      1934/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      1635/sshd
    tcp        0      0 localhost:ipp           *:*                     LISTEN      2176/cupsd
    tcp        0      0 *:smtp                  *:*                     LISTEN      2323/master
    tcp        0      0 localhost:953           *:*                     LISTEN      1934/named
    tcp        0      0 localhost:10024         *:*                     LISTEN      2362/amavisd (maste
    tcp        0      0 localhost:10025         *:*                     LISTEN      2323/master
    tcp        0      0 *:mysql                 *:*                     LISTEN      2115/mysqld
    tcp        0      0 *:pop3                  *:*                     LISTEN      2222/dovecot
    tcp        0      0 localhost:dyna-access   *:*                     LISTEN      1657/clamd
    tcp        0   1204 Golf1.greenway.co.u:ssh host86-130-190-14:50057 ESTABLISHED 2522/0
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1593/rpcbind
    tcp        0      0 *:http-alt              *:*                     LISTEN      2403/httpd2-prefork
    tcp        0      0 *:www-http              *:*                     LISTEN      2403/httpd2-prefork
    tcp        0      0 *:sunproxyadmin         *:*                     LISTEN      2403/httpd2-prefork
    tcp        0      0 *:ftp                   *:*                     LISTEN      2440/pure-ftpd (SER
    tcp        0      0 *:domain                *:*                     LISTEN      1934/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      1635/sshd
    tcp        0      0 localhost:ipp           *:*                     LISTEN      2176/cupsd
    tcp        0      0 *:smtp                  *:*                     LISTEN      2323/master
    tcp        0      0 localhost:953           *:*                     LISTEN      1934/named
    tcp        0      0 *:https                 *:*                     LISTEN      2403/httpd2-prefork
    tcp        0      0 *:microsoft-ds          *:*                     LISTEN      2501/smbd
    tcp        0      0 *:netbios-ssn           *:*                     LISTEN      2501/smbd
    tcp        0      0 localhost:45154         localhost:ftp           TIME_WAIT   -
    tcp        0      0 localhost:39589         localhost:www-http      TIME_WAIT   -
    
    and iptables-L is
    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    but still no pop3 mail delivery.

    Thanks for the help, Falko.
    regards
    Rick
     
  20. falko

    falko Super Moderator ISPConfig Developer

    Are there any errors in your mail log (in the /var/log/ directory)?

    Do you use Maildir or mailbox? Because Dovecot uses Maildir, but if mails arrive in mailbox, Dovecot doesn't find them.
     
: saslauthd

Share This Page