Monit says: Proftpd "Execution failed"

Discussion in 'Server Operation' started by Hans, Dec 17, 2006.

Thread Status:
Not open for further replies.
  1. Hans

    Hans Moderator ISPConfig Developer

    Since a quiet long time i use Monit as my system monitor.
    Since yetserday Monit says that the status for Proftpd is "Execution failed".

    I wonder how this is possible, because uploading/downloading files via ProFTP is no problem at all and is going quiet fast.
    What could be the reason for this?

    I have restarted Proftpd and monit as well, but this makes no difference.
     

    Attached Files:

  2. falko

    falko Super Moderator ISPConfig Developer

    Can you post the Proftpd part of your monitrc file?
     
  3. Hans

    Hans Moderator ISPConfig Developer

    Within the attachement you find the output of the file.
     

    Attached Files:

  4. falko

    falko Super Moderator ISPConfig Developer

    What are the outputs of
    Code:
    ls -la /var/run/proftpd.pid
    and
    Code:
    netstat -tap
    ?
     
  5. Hans

    Hans Moderator ISPConfig Developer

    no pid file found

    Falko,

    I think the problem is that the pid-file can not be found, because the output of ls -la /var/run/proftpd.pid is: no such file or directory

    :confused:

    How can this be solved?

    netstat -tap has a line like this:

    tcp 0 0 *:2812 *:* LISTEN 18237/monit
     
    Last edited: Dec 19, 2006
  6. falko

    falko Super Moderator ISPConfig Developer

    If you are absolutely sure that Proftpd is running, run
    Code:
    updatedb
    locate proftpd.pid
    What's the output?

    Also, check /etc/init.d/proftpd. Maybe the pid file is named differently.
     
  7. Hans

    Hans Moderator ISPConfig Developer

    I had to restore the .pid-file for proftpd

    The strange thing was that i had no pid file.
    I do not know if i made a good decision;
    i supercopied (scp) the backup of this file from my backup-server via SSH to the /var/run/ directory again on the production server.

    The output of ls -la /var/run/proftpd.pid now is:

    -rw-r--r-- 1 root root 5 2006-12-21 11:29 /var/run/proftpd.pid


    Monit still gives the failure.
    What can i do now?
     
  8. Hans

    Hans Moderator ISPConfig Developer

    When i do an: ps aux | grep ftp
    The result is:

    nobody 7923 0.0 0.7 4772 2292 ? Ss Dec18 0:00 proftpd: (accepting connections)
    root 3141 0.0 0.2 3112 600 pts/0 S+ 19:57 0:00 grep ftp

    And using FTP goes fast indeed.
    However monit still now that the process Proftpd "does not excists".
    I guess this is because Proftpd is not creating any pid files when the process is started again.

    I really do not understand this :confused: , any one knows a solution?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/init.d/proftpd, and what's the output of
    Code:
    ls -la /var/run
    ?
     
  10. Hans

    Hans Moderator ISPConfig Developer

    The requested info:

    Falko,

    within the attachment you find the proftpd file.

    The output of ls -la /var/run is:

    server1:/home/admin# ls -la /var/run
    total 108
    drwxr-xr-x 15 root root 4096 2006-12-21 19:51 .
    drwxr-xr-x 16 root root 4096 2006-06-07 20:14 ..
    drwxr-xr-x 2 root root 4096 2006-12-21 12:47 apache2
    -rw-r--r-- 1 root root 6 2006-12-21 12:47 apache2.pid
    -rw-r--r-- 1 root root 5 2006-12-12 21:57 atd.pid
    drwxr-xr-x 3 root root 4096 2006-03-31 11:14 bind
    drwxr-xr-x 3 daemon daemon 4096 2006-12-12 21:57 courier
    -rw-r--r-- 1 root root 6 2006-12-18 20:48 crond.pid
    ---------- 1 root root 0 2006-12-12 21:57 crond.reboot
    drwxr-xr-x 2 dcc dcc 4096 2006-12-12 22:49 dcc
    drwxr-x--- 2 Debian-exim Debian-exim 4096 2006-03-31 11:26 exim4
    drwx------ 2 fetchmail nogroup 4096 2006-03-31 11:08 fetchmail
    drwxr-xr-x 2 identd nogroup 4096 2006-03-31 10:02 identd
    -rw-r--r-- 1 root root 5 2006-12-12 21:57 inetd.pid
    -rw-r--r-- 1 root root 5 2006-12-12 21:57 klogd.pid
    -rw-r--r-- 1 root root 5 2006-12-12 21:57 mdadm.pid
    -rw-r--r-- 1 root root 5 2006-12-21 19:51 monit.pid
    drwxr-xr-x 2 munin root 4096 2006-12-23 00:35 munin
    drwxr-xr-x 2 mysql root 4096 2006-12-18 20:36 mysqld
    drwxr-xr-x 2 root root 4096 2006-12-23 00:37 proftpd
    drwx--x--- 2 root sasl 4096 2006-09-28 00:01 saslauthd
    -rw-r--r-- 1 root root 6 2006-12-12 23:03 spamd.pid
    drwxr-xr-x 2 root root 4096 2004-11-29 13:51 sshd
    -rw-r--r-- 1 root root 5 2006-12-12 21:57 sshd.pid
    -rw-r--r-- 1 root root 5 2006-12-12 21:57 syslogd.pid
    drwxr-xr-x 2 root root 4096 2005-04-07 18:37 usb
    -rw-rw-r-- 1 root utmp 7680 2006-12-23 00:29 utmp

    You see, there is no proftpd.pid file :(
     

    Attached Files:

  11. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/default/proftpd? What's the output of
    Code:
    grep -i 'pidfile' /etc/proftpd.conf | sed -e 's/pidfile[\t ]\+//i'
    ?

    What's the output of
    Code:
    ls -la /var/run/proftpd
    ?
     
  12. Hans

    Hans Moderator ISPConfig Developer

    Falko, thank you for your reply.

    The output of ls -la /var/run/proftpd is:

    drwxr-xr-x 2 root root 4096 2006-12-23 16:55 .
    drwxr-xr-x 15 root root 4096 2006-12-21 19:51 ..
    -rw-r--r-- 1 root root 4288 2006-12-23 16:55 proftpd.delay
    -rw-r--r-- 1 root root 32 2006-12-23 16:55 proftpd.scoreboard


    And the output of

    grep -i 'pidfile' /etc/proftpd.conf | sed -e 's/pidfile[\t ]\+//i'

    is ... nothing !?

    :confused:
     
  13. Hans

    Hans Moderator ISPConfig Developer

    I did it

    Monit can monitor proftp again.
    The proftpd.pid file was missing indeed.
    What i did was:

    netstat -tap

    tcp 0 0 *:ftp *:* LISTEN 0292/proftpd: (acce

    Where i could see the process number (0292) of Proftpd.
    After that i created a new /var/run/proftpd.pid file with 0292 as process number.

    After that i started Proftpd again within Monit and form that moment on, Monit is monitoring Proftpd again.

    I still do not know why i had to miss my /var/run/proftpd.pid, but i've noticed that i was missing it since i've updated to the last stable proftpd-version provided by Debian, which is: proftpd-common_1.2.10-15sarge3_amd64.deb
     

    Attached Files:

    Last edited: Dec 24, 2006
Thread Status:
Not open for further replies.

Share This Page