Page 1 of 2

Problem with Build 3220 Upgrade

Posted: Wed 04 Jan 2023 5:21 am
by apple8
I tried to upgrade from build 3191 to build 3220 without success. the MXdiags reports Error connecting ftp - The remote certificate is invalid according to the validation procedure.

I changed back to build 3191 and it all works ok. Have I made an error in the upgrade?

Re: Problem with Build 3220 Upgrade

Posted: Wed 04 Jan 2023 7:47 am
by flort
This was included in the release notes for 3202 -
If You Use FTPS
Previous releases were hard coded to ignore any certificate errors when making FTPS connections (not FTP). This really was not good practice, so from this release certificate checking will be enabled by default.

The issue is that some hosting companies do not appear to have their FTPS certificates sorted out and ask you to use a server FQDN that does not match the hosts certificate :(
If you encounter this issue then you should ask your hosting company to sort out the problem! In the meantime you can get the FTPS process working again by enabling the option:
> Internet Settings | Web/FTP Site | Advanced Settings | Ignore certificate errors
Regards,
Trevor

Re: Problem with Build 3220 Upgrade

Posted: Wed 04 Jan 2023 10:12 am
by apple8
Thanks Trevor, I used the workaround to get up and running.

I did contact my host provider but couldn’t understand the response for a solution.
Unfortunately, that error is something that most FTP clients get when connecting to a service. The error reported back will always be a bit different depending on the software.

This behavior is actually by design, as the FTP client leaves it up to the users if they want to trust the certificate.

There is not anything we can do about this as it comes down to the FTP client/software. But the SSLs on those servers are defiantly valid.

Re: Problem with Build 3220 Upgrade

Posted: Wed 04 Jan 2023 11:34 am
by mcrossley
You are connecting to the FTP server via an IP address.
Many certificates do not contain the IP address, only the host name.

Any reason you are using an IP address rather than the host name?

Re: Problem with Build 3220 Upgrade

Posted: Wed 04 Jan 2023 12:53 pm
by apple8
mcrossley wrote: Wed 04 Jan 2023 11:34 am You are connecting to the FTP server via an IP address.
Many certificates do not contain the IP address, only the host name.

Any reason you are using an IP address rather than the host name?
Yes, back in April’22 the host provider stopped allowing unsecured FTP and I had problems connecting after changing to MX and it was their suggestion to do so.
viewtopic.php?p=163359#p163359

Re: Problem with Build 3220 Upgrade

Posted: Wed 04 Jan 2023 4:58 pm
by mcrossley
If you ping the FTP hostname does it resolve to the same IP address?

I'd try using the hostname again and see if it works now. There is not real reason it shouldn't if everything is configured correctly on the server, it is what most people use after all.

If it does work with cert checking off, try switching that back on again and see if it still works.

If it doesn't work in either case, then you could switch on FTP logging and post the ftplog.txt file, that should give us a clue.

Re: Problem with Build 3220 Upgrade

Posted: Thu 05 Jan 2023 12:50 am
by apple8
I changed to the host name and the realtimegauges file uploaded successfully but only with certificate checking off.

However using the hostname another problem popped up on the 5 minute upload of JSON files. So I need to resolved that first I guess.
Error while uploading the file to the server. See InnerException for more info.
2023-01-05 11:00:21.850 FTP[Int]: Inner Exception: Unknown command

Re: Problem with Build 3220 Upgrade

Posted: Thu 05 Jan 2023 1:50 am
by flort
Someone had that issue recently and here was their solution -
"Unkown command" error was because of EPSV, disabled EPSV in settings and it is working now.
Regards,
Trevor

Re: Problem with Build 3220 Upgrade

Posted: Thu 05 Jan 2023 2:33 am
by apple8
flort wrote: Thu 05 Jan 2023 1:50 am Someone had that issue recently and here was their solution -
"Unkown command" error was because of EPSV, disabled EPSV in settings and it is working now.
Regards,
Trevor
Thanks,I gave that a go but no luck.

Re: Problem with Build 3220 Upgrade

Posted: Thu 05 Jan 2023 10:42 am
by mcrossley
We need to see the ftplog.txt file please.

Re: Problem with Build 3220 Upgrade

Posted: Thu 05 Jan 2023 11:13 am
by apple8
Thanks Mark, ftpLog attached, towards the end there is with host name with and without certificate checking.

Re: Problem with Build 3220 Upgrade

Posted: Thu 05 Jan 2023 2:57 pm
by mcrossley
OK, really weird, it is the same commands that work for some files come back with "unknown command for others. e.g.

Code: Select all

Command:  SIZE /public_html/weatherMX/availabledata.jsontmp
Response: 550 Can't check for file existence

// That is OK, the file does not exist.
// But...

Command:  SIZE /public_html/weatherMX/tempdata.jsontmp
Response: 500 Unknown command
All the commands returning "unknown command" are ones that have worked for other files, so it must be something about the files it is querying - maybe zero size, or permissions.

First thing I'd try is to look if any "*.*tmp" files (like tempdata.jsontmp) exist on your server folder, if they do, delete them. Then see what happens.

Re: Problem with Build 3220 Upgrade

Posted: Fri 06 Jan 2023 12:23 am
by apple8
Ok, there are no .tmp files in the folder only .html, .txt and .json files.

Today I ran for a while using the server name instead of the IP address with cert checking off. Whilst there are the json file errors at each interval they are being updated as I can see that in the folder.

Edit: Seems I was a bit premature in my observations. The errors are appearing randomly as are the folder files updating. When there are errors a tempdata.jsontmp appears until the next successful upload.

Re: Problem with Build 3220 Upgrade

Posted: Fri 06 Jan 2023 9:37 am
by mcrossley
I think you need to look at the FTP server logs at the other end to see what is happening. The problem appears to be there and the clues will be there as well. All CMX is setting is that the server has an error.

Re: Problem with Build 3220 Upgrade

Posted: Fri 06 Jan 2023 11:05 am
by apple8
mcrossley wrote: Fri 06 Jan 2023 9:37 am I think you need to look at the FTP server logs at the other end to see what is happening. The problem appears to be there and the clues will be there as well. All CMX is setting is that the server has an error.
Ok, how do I do that. I had a look in cpanel but don't know where to find FTP server logs.