1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

smtp error

Discussion in 'Plesk for Linux - 8.x and Older' started by philburress, Mar 6, 2006.

  1. philburress

    philburress Guest

    Anyone know what this error is:

    xinetd[xxxxx]: service smtp, accept: Invalid argument (errno = 22)

    I see a bunch of them in my logs. I've searched everywhere and can't find anything on it.

  2. ashleym

    ashleym Guest

    I'm having the exact same problem.

    My "/var/log/messages" log file is climbing in size by the minute - currently 1.72 GB - with the same error message you're receiving:

    Mar 16 07:23:04 as xinetd[16448]: service ftp, accept: Invalid argument (errno = 22)
    Mar 16 07:23:04 as xinetd[16448]: service poppassd, accept: Invalid argument (errno = 22)
    Mar 16 07:23:04 as xinetd[16448]: service imap, accept: Invalid argument (errno = 22)

    Also, I can't send or receive email - receiving "unable to connect to smtp server localhost:25"

    I've heard that Watchdog may have been related to the problem so I uninstalled it, but that didn't fix it.

    I've restarted all services and rebooted my server but I'm still stuck.

    Please help..
  3. wagnerch

    wagnerch Guest

    Run these commands and dump the output here:

    ps fuxwa |grep inet
    cat /etc/xinetd.conf
    ls -l /etc/xinetd.d/
    grep "^service" /etc/xinetd.d/*

    Also you may want to restart xinetd, to rule that out. I am wondering if you are a) running in a VPS, b) recently upgraded xinetd (patches applied?), c) if there is anything funky in /etc/xinetd.conf, or d) is xinetd simply running twice.
  4. ashleym

    ashleym Guest

    a) VPS is installed
    b) Last week my hoster mediatemple.net did apply some upgrades & patches
    c) see below
    d) no clue

    Here's the out from the commands:

    [root@as root]# ps fuxwa |grep inet
    root 11507 0.0 0.0 1504 452 pts/0 S 20:04 0:00 \_ grep inet
    root 17948 0.0 0.0 2004 892 ? S 19:31 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid

    [root@as root]# cat /etc/xinetd.conf
    # Simple configuration file for xinetd
    # Some defaults, and include /etc/xinetd.d/

    instances = 60
    log_type = SYSLOG authpriv
    log_on_success = HOST PID
    log_on_failure = HOST
    cps = 25 30

    includedir /etc/xinetd.d

    [root@as root]# ls -l /etc/xinetd.d/
    total 25
    -rw-r--r-- 1 root root 563 May 19 2004 chargen
    -rw-r--r-- 1 root root 580 May 19 2004 chargen-udp
    -rw-r--r-- 1 root root 364 Mar 16 19:19 courier-imapd
    -rw-r--r-- 1 root root 294 Mar 16 19:19 courier-imapds
    -rw-r--r-- 1 root root 364 Mar 16 19:19 courier-pop3d
    -rw-r--r-- 1 root root 294 Mar 16 19:19 courier-pop3ds
    -rw-r--r-- 1 root root 419 May 19 2004 daytime
    -rw-r--r-- 1 root root 438 May 19 2004 daytime-udp
    -rw-r--r-- 1 root root 341 May 19 2004 echo
    -rw-r--r-- 1 root root 360 May 19 2004 echo-udp
    -rw-r--r-- 1 root root 318 Aug 8 2005 finger
    -rw-r--r-- 1 root root 286 Aug 24 2005 ftp_psa
    -rw-r--r-- 1 root root 275 Aug 8 2005 ntalk
    -rw-r--r-- 1 root root 355 Aug 30 2005 popa3d.rpmsave
    -rw-r--r-- 1 root root 334 Aug 30 2005 popa3ds.rpmsave
    -rw-r--r-- 1 root root 206 Mar 8 01:13 poppassd_psa
    -rw-r--r-- 1 root root 317 Jan 14 2004 rsync
    -rw-r--r-- 1 root root 314 May 19 2004 services
    -rw-r--r-- 1 root root 392 Jan 31 2003 sgi_fam
    -rw-r--r-- 1 root root 421 Mar 8 01:16 smtp.psa
    -rw-r--r-- 1 root root 422 Mar 8 01:16 smtps.psa
    -rw-r--r-- 1 root root 363 Jan 16 2004 swat
    -rw-r--r-- 1 root root 263 Aug 8 2005 talk
    -rw-r--r-- 1 root root 497 May 19 2004 time
    -rw-r--r-- 1 root root 518 May 19 2004 time-udp

    [root@as root]# grep "^service" /etc/xinetd.d/*
    /etc/xinetd.d/chargen:service chargen
    /etc/xinetd.d/chargen-udp:service chargen
    /etc/xinetd.d/courier-imapd:service imap
    /etc/xinetd.d/courier-imapds:service imaps
    /etc/xinetd.d/courier-pop3d:service pop3
    /etc/xinetd.d/courier-pop3ds:service pop3s
    /etc/xinetd.d/daytime:service daytime
    /etc/xinetd.d/daytime-udp:service daytime
    /etc/xinetd.d/echo:service echo
    /etc/xinetd.d/echo-udp:service echo
    /etc/xinetd.d/finger:service finger
    /etc/xinetd.d/ftp_psa:service ftp
    /etc/xinetd.d/ntalk:service ntalk
    /etc/xinetd.d/popa3d.rpmsave:service pop3
    /etc/xinetd.d/popa3ds.rpmsave:service pop3s
    /etc/xinetd.d/poppassd_psa:service poppassd
    /etc/xinetd.d/rsync:service rsync
    /etc/xinetd.d/services:service services
    /etc/xinetd.d/sgi_fam:service sgi_fam
    /etc/xinetd.d/smtp.psa:service smtp
    /etc/xinetd.d/smtps.psa:service smtps
    /etc/xinetd.d/swat:service swat
    /etc/xinetd.d/talk:service talk
    /etc/xinetd.d/time:service time
    /etc/xinetd.d/time-udp:service time

    I just stopped/started xinetd and I'm still having the same problem.

    Also, when I run "/var/qmail/bin/qmail-qstat" it says the following:

    messages in queue: 47
    messages in queue but not yet preprocessed: 6

    Thank you in advance for any help you can provide!! My hoster is saying that everything is fine..
  5. wagnerch

    wagnerch Guest

    Something is not quite right there... The pid of xinetd is 17948, but your errors were coming from another copy running as 16448. Try this:

    ps w -p 16448
    ls -l /proc/16448

    Let's see what that process is. Did you reboot or anything like that?
  6. wagnerch

    wagnerch Guest

    Another thing that jumps out at me is courier imap/pop/et.al is running from xinetd. I am not sure which OS you are using, but mine runs as a backend daemon. What OS are you using?

    Check if you have courier-imap in /etc/rc.d/init.d

    and if you are using an RPM based OS then check this:

    rpm -qa |grep courier
  7. ashleym

    ashleym Guest

    Yes, I did reboot about an hour ago. I'm running RHEL 3.

    I do have "/etc/rc.d/init.d/courier-imap" and it was updated when my host did the patches last week.

    Here's the output:

    [root@as root]# rpm -qa |grep courier

    The process 16448 currently isn't running as far as I can tell.

    Another interesting thing is that the Plesk Admin panel won't let me stop or restart the "SMTP Server (QMail)" service.
  8. ashleym

    ashleym Guest

    I don't want to speak to soon, but I think I fixed my problem.

    From what I can tell, the latest Plesk upgrades that my host installed renamed the following files:




    By renaming them back and rebooting, I can now send/receive.

    Only drawback is that I now have 43 emails in queue "/var/qmail/bin/qmail-qstat" that seem to be stuck.

    Any ideas on how to get them?
  9. wagnerch

    wagnerch Guest

    I would also *move* the files courier* out of /etc/xinetd.d and then do a "service xinetd reload". Verify that courier-imap is running by doing "service courier-imap status", it should say it is running. If it isn't then do "service courier-imap start" and "chkconfig courier-imap on".
  10. ashleym

    ashleym Guest

    1. I moved the files out of the directory
    2. ran "service xinetd reload" successfully
    3. ran "service courier-imap status" and it wasn't running
    4. ran "service courier-imap start" and it wouldn't start
    5. ran "chkconfig courier-imap on" gave "ok"

    Any thoughts on how to get my queued emailed?

    "/var/qmail/bin/qmail-qstat" shows 52 messages in queue.

    Thanks again for your help!
  11. wagnerch

    wagnerch Guest

    Hmm, sounds like your ISP humped up a few things -- sounds like imap/pop3/etc may be screwed up?

    You may need to reinstall the qmail package, do a forced installation.

    service qmail stop
    rpm -ivh /var/psa/PSA_7.5.4/rpm_FedoraCore_2/base/psa-qmail-1.03-fc2.build75050824.12.i586.rpm --force
    service qmail start

    And see what happens. It could always be worse ;).
  12. ashleym

    ashleym Guest

    Is that the correct rpm for RHEL3?

    By doing this, is there a chance that things could get worse?
  13. wagnerch

    wagnerch Guest

    You shouldn't need to do the drweb-qmail part, just psa-qmail. My path was an example, you may have to look around for it or download it from SWsoft. In any event it is documented below:


    Normally when qmail just stops functioning it is related to the queue structures. There is a queue-fix tool, but the above is the easiest solution.