"ProFTPD FTP Server" can not be started on "CentOS Linux 7.2.1511"

Hi, I have installed virtualmin on two servers with "CentOS Linux 7.2.1511". "ProFTPD FTP Server" can not be started on both. If i click to start, it says: Failed to start service : "Job for proftpd.service failed because the control process exited with error code. See "systemctl status proftpd.service" and "journalctl -xe" for details." Although it works very well on CentOS 6.x. Attaching screenshot. Link below also seems related to this bug. https://www.virtualmin.com/node/39377 Thanks

Status: 
Active

Comments

Howdy -- what error shows up in the logs when that occurs?

The two commands mentioned in the error output above may also have some useful input into the issue that you're seeing there.

Agreed, running journalctl -xe should tell you why the startup failed.

Proftpd dosnt works on Debian 8 new installs (virtualmin)

It occurred on "CentOS Linux 7.2.1511" with every install, and it seems as a bug.

Result for command "systemctl status proftpd.service" returned as below:
[root@sd-89088 ~]# systemctl status proftpd.service
● proftpd.service - ProFTPD FTP Server
Loaded: loaded (/usr/lib/systemd/system/proftpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-02-23 04:11:38 CET; 19s ago
Process: 28073 ExecStart=/usr/sbin/proftpd $PROFTPD_OPTIONS (code=exited, status=1/FAILURE)

Feb 23 04:11:38 sd-89088 systemd[1]: Starting ProFTPD FTP Server...
Feb 23 04:11:38 sd-89088 proftpd[28073]: 2016-02-23 04:11:38,030 sd-89088 pr...'
Feb 23 04:11:38 sd-89088 systemd[1]: proftpd.service: control process exite...=1
Feb 23 04:11:38 sd-89088 systemd[1]: Failed to start ProFTPD FTP Server.
Feb 23 04:11:38 sd-89088 systemd[1]: Unit proftpd.service entered failed state.
Feb 23 04:11:38 sd-89088 systemd[1]: proftpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
---------------------------------------------------------------------------------------
Result for command "journalctl -xe" returned as below:
[root@sd-89088 ~]# journalctl -xe
--
-- Unit session-1509.scope has begun starting up.
Feb 23 04:15:01 sd-89088 CROND[28457]: (root) CMD (/etc/webmin/status/monitor.pl
Feb 23 04:15:01 sd-89088 suexec[28459]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:02 sd-89088 suexec[28476]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:02 sd-89088 su[28477]: (to postgres) root on none
Feb 23 04:15:02 sd-89088 su[28477]: pam_unix(su:session): session opened for use
Feb 23 04:15:02 sd-89088 su[28477]: pam_lastlog(su:session): corruption detected
Feb 23 04:15:02 sd-89088 su[28477]: pam_unix(su:session): session closed for use
Feb 23 04:15:05 sd-89088 suexec[28487]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:09 sd-89088 suexec[28491]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:12 sd-89088 suexec[28496]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:15 sd-89088 suexec[28564]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:17 sd-89088 suexec[28567]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:17 sd-89088 suexec[28569]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:18 sd-89088 suexec[28572]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:20 sd-89088 suexec[28574]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:22 sd-89088 suexec[28576]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:25 sd-89088 suexec[28578]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:27 sd-89088 suexec[28580]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:30 sd-89088 suexec[28582]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:32 sd-89088 suexec[28584]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:
Feb 23 04:15:34 sd-89088 suexec[28587]: uid: (501/zemtvs) gid: (501/zemtvs) cmd:

I opened and edited
Webmin>Others>File Manager>etc>proftpd.conf>lines 435,436 say
"SFTPHostKey /etc/ssh/ssh_host_rsa_key"
"SFTPHostKey /etc/ssh/ssh_host_dsa_key"
Replaced them with
"#SFTPHostKey /etc/ssh/ssh_host_rsa_key"
"#SFTPHostKey /etc/ssh/ssh_host_dsa_key"
ProFTPD FTP Server seems working.
------------------------------------------------------------
After that i had to face "ProFTPD FTP Server" problem in "Backup Virtual Server"
I came over the problem by reading "andreychek" comment at:
https://www.virtualmin.com/comment/730534#comment-730534
I must need more comments from "andreychek" and "joe443" please.

That's the right workaround for the time being -- we're looking into why that issue is occurring, and how to prevent it in the future.

I'm having the same Problem, And I've done both the CHMOD, and File Edit to Comment out.... I've tried to Un-Install and Re-Install, It said it was needed by Virtualmin... And I just tried the Edit Virtual Server -> Enabled Features, that "IP-based virtual FTP enabled" and got:

Deleting FTP virtual server .. .. done Updating Webmin user .. .. done

Updating Webmin user .. .. done

Saving server details .. .. done

Applying FTP server configuration .. .. failed :

Job for proftpd.service failed because the control process exited with error code. See "systemctl status proftpd.service" and "journalctl -xe" for details. Re-loading Webmin .. .. done

and when I do: systemctl status proftpd.service i getr the same info as above....

No MATTER what I try with proftpd, I get this error.....

Is there any other suggestions?!??! Or is there a way I can Un-Install it (Without breaking Virtualmin) from my CentOs 7.2 Server Install?

Thanks for any help....

Mike

UPDATE: Sorry I commented the wrong line, I went to Boot/Shutdown I was able to see the WHOLE error, It started now.....

The best fix for the moment, is to edit /etc/proftpd.conf, and at the end, to comment out the various SFTP related lines. After that, you should be able to restart ProFTPd.

Diabolico's picture
Submitted by Diabolico on Sun, 07/17/2016 - 20:18

On Centos 7 the problem is with SSH keys because by default its missing "/etc/ssh/ssh_host_dsa_key" (not sure if that or *rsa_key) and this bug can be easily solved by recreating the keys before Vmin installation.

First go to "/etc/ssh/" and delete all *_key and *_key.pub files, after that run this commands:

# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
# ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
# systemctl restart sshd

Dont use passphrase for the keys, just leave it empty and press "enter" (i think you must press "enter" twice). Once done proceed with Vmin installation.

The problem is with that missing key file and during the Vmin installation it will cut the end of the file "/etc/proftpd.conf" and leave unfinished entries for SFTP. You can even check for this error if you take a look at Vmin install log.

Would there be a way to fix this after the Install? I have all my Certs from LetsEncrypt in and running (Copied).. I'm not using FTP but it'd be nice to just "Have it Working"....

Could I just Add the last 4 Lines mentioned to the right directory/files?

Thanks

Mike

Diabolic's fix above would work after an install, I believe.

Note though that if you aren't using FTP, the simplest way to fix that is to just comment out all the "sftp" related lines at the bottom of the proftpd.conf file.

Personally, I think it's simpler to use SFTP on port 22 using the SSH service.

Ok, Ya, Seems simpler, No don't plan on using it either, Putty, Winscp, All Work great, So I'll just wait for an update..

Thanks,

Mike

@Diabolico Thanks a lot, your suggestion is working:)

@Diabolico Thanks a lot ! Your suggestion is working :)