Control Web Panel

WebPanel => Updates => Topic started by: rhunyady on September 22, 2017, 04:29:09 PM

Title: Pure-FTP update dies!
Post by: rhunyady on September 22, 2017, 04:29:09 PM
there is a pureFTP update that has been in my yum manager for a couple months now everytime i try to update it, the ftp server won't run after that and i have to downgrade it to get ftp running... is this a CWP issue?
Title: Re: Pure-FTP update dies!
Post by: studio4host on September 25, 2017, 01:12:31 PM
have you checked in the logs what is the exact issue ?
Title: Re: Pure-FTP update dies!
Post by: rhunyady on October 18, 2017, 06:04:20 PM
something about exceeding limits or not setting limits
Title: Re: Pure-FTP update dies!
Post by: rhunyady on October 21, 2017, 10:19:57 AM
Job for pure-ftpd.service failed because a configured resource limit was exceeded. See "systemctl status pure-ftpd.service" and "journalctl -xe" for details

Journal says:
Oct 21 06:18:27 ctrl.xfxtechserv.com systemd[1]: PID file /var/run/pure-ftpd.pid not readable (yet?) after start.
Oct 21 06:18:27 ctrl.xfxtechserv.com pure-ftpd[32727]: (?@?) [ERROR] TLS [/etc/pki/tls/certs/server-ftp.crt](308): error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
Oct 21 06:18:27 ctrl.xfxtechserv.com systemd[1]: pure-ftpd.service never wrote its PID file. Failing.
Oct 21 06:18:27 ctrl.xfxtechserv.com systemd[1]: Failed to start Pure-FTPd FTP server.
Title: Re: Pure-FTP update dies!
Post by: become on October 29, 2017, 12:11:00 PM
for me this is SSL cert problem.
Title: Re: Pure-FTP update dies!
Post by: rhunyady on October 29, 2017, 12:43:32 PM
i dunno what the problem is with it, if i install it FTP fails if i downgrade it and reboot the server it works.
Title: Re: Pure-FTP update dies!
Post by: studio4host on October 31, 2017, 01:50:12 PM
you simply need to check the error which your ftp server has and if its related with hostname certificate then save your hostname again from cwp and it will generate all required certificates.
Title: Re: Pure-FTP update dies!
Post by: rhunyady on October 31, 2017, 02:34:32 PM
you simply need to check the error which your ftp server has and if its related with hostname certificate then save your hostname again from cwp and it will generate all required certificates.

are you referring to the error i posted above?. I've checked my SSL settings and see no errors according to CWP
Title: Re: Pure-FTP update dies!
Post by: studio4host on October 31, 2017, 02:56:28 PM
yes, try checking all logs if restart doesn't show any error.
Title: Re: Pure-FTP update dies!
Post by: rhunyady on October 31, 2017, 04:28:48 PM
yes, try checking all logs if restart doesn't show any error.

this is what i get when i update it:
pure-ftpd.service - Pure-FTPd FTP server
   Loaded: loaded (/usr/lib/systemd/system/pure-ftpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: resources) since Tue 2017-10-31 12:21:18 EDT; 35s ago
  Process: 32066 ExecStart=/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 2165 (code=exited, status=0/SUCCESS)

Oct 31 12:21:18 ctrl.xfxtechserv.com systemd[1]: Starting Pure-FTPd FTP server...
Oct 31 12:21:18 ctrl.xfxtechserv.com pure-ftpd[32068]: (?@?) [ERROR] TLS [/etc/pki/tls/certs/server-ftp.crt](308): error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
Oct 31 12:21:18 ctrl.xfxtechserv.com systemd[1]: PID file /var/run/pure-ftpd.pid not readable (yet?) after start.
Oct 31 12:21:18 ctrl.xfxtechserv.com systemd[1]: Failed to start Pure-FTPd FTP server.
Oct 31 12:21:18 ctrl.xfxtechserv.com systemd[1]: Unit pure-ftpd.service entered failed state.
Oct 31 12:21:18 ctrl.xfxtechserv.com systemd[1]: pure-ftpd.service failed.

(from clicking status in cwp)


from ssh console using status command:
~$ systemctl status pure-ftpd.service
● pure-ftpd.service - Pure-FTPd FTP server
   Loaded: loaded (/usr/lib/systemd/system/pure-ftpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: resources) since Tue 2017-10-31 12:27:22 EDT; 19s ago
  Process: 4983 ExecStart=/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 2165 (code=exited, status=0/SUCCESS)
Oct 31 12:27:22 ctrl.xfxtechserv.com systemd[1]: Starting Pure-FTPd FTP server...
Oct 31 12:27:22 ctrl.xfxtechserv.com systemd[1]: PID file /var/run/pure-ftpd.pid not readable (yet?) after start.
Oct 31 12:27:22 ctrl.xfxtechserv.com pure-ftpd[4984]: (?@?) [ERROR] TLS [/etc/pki/tls/certs/server-ftp.crt](308): error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
Oct 31 12:27:22 ctrl.xfxtechserv.com systemd[1]: pure-ftpd.service never wrote its PID file. Failing.
Oct 31 12:27:22 ctrl.xfxtechserv.com systemd[1]: Failed to start Pure-FTPd FTP server.
Oct 31 12:27:22 ctrl.xfxtechserv.com systemd[1]: Unit pure-ftpd.service entered failed state.
Oct 31 12:27:22 ctrl.xfxtechserv.com systemd[1]: pure-ftpd.service failed.

I have no idea what's wrong with this, if i downgrade it to the previous version it works fine!
Title: Re: Pure-FTP update dies!
Post by: studio4host on November 01, 2017, 09:22:20 PM
you should check your file /etc/pki/tls/certs/server-ftp.crt in it you would have certificate and key which doesn't match and copy content of the certificate/key you are using for your hostname to that file.

Title: Re: Pure-FTP update dies!
Post by: rhunyady on November 01, 2017, 10:24:14 PM
you should check your file /etc/pki/tls/certs/server-ftp.crt in it you would have certificate and key which doesn't match and copy content of the certificate/key you are using for your hostname to that file.

speaking greek to me...lol
Title: Re: Pure-FTP update dies!
Post by: studio4host on November 01, 2017, 10:50:48 PM
simply run this and restart your pure-ftpd service

Code: [Select]
cat /etc/pki/tls/private/hostname.key > /etc/pki/tls/certs/server-ftp.crt
cat /etc/pki/tls/certs/hostname.crt >> /etc/pki/tls/certs/server-ftp.crt
service pure-ftpd restart
Title: Re: Pure-FTP update dies!
Post by: rhunyady on November 01, 2017, 11:32:16 PM
simply run this and restart your pure-ftpd service

Code: [Select]
cat /etc/pki/tls/private/hostname.key > /etc/pki/tls/certs/server-ftp.crt
cat /etc/pki/tls/certs/hostname.crt >> /etc/pki/tls/certs/server-ftp.crt
service pure-ftpd restart

Yeah... that didn't work!
Title: Re: Pure-FTP update dies!
Post by: Jamshed Datori on May 04, 2018, 01:10:46 PM
simply run this and restart your pure-ftpd service

Code: [Select]
cat /etc/pki/tls/private/hostname.key > /etc/pki/tls/certs/server-ftp.crt
cat /etc/pki/tls/certs/hostname.crt >> /etc/pki/tls/certs/server-ftp.crt
service pure-ftpd restart

This worked for me.

However, don't forget to change the "hostname" with your own hostname like cp.yourdomain.com

So, if my hostname is cp.mydomain.com then the commands will be

cat /etc/pki/tls/private/cp.mydomain.com.key > /etc/pki/tls/certs/server-ftp.crt
cat /etc/pki/tls/certs/cp.mydomain.com.crt >> /etc/pki/tls/certs/server-ftp.crt
service pure-ftpd restart
Title: Re: Pure-FTP update dies!
Post by: adxp on May 08, 2018, 01:34:13 PM
Thanks @jamshed_206 this worked like a charm!

I wonder how CWP will surprise when the hostname certificate will have to be renewed.
Title: Re: Pure-FTP update dies!
Post by: Jamshed Datori on May 08, 2018, 05:12:39 PM
Thanks @jamshed_206 this worked like a charm!

I wonder how CWP will surprise when the hostname certificate will have to be renewed.

You are welcome