FTP Upload problems **solved**

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
sts
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Sun Oct 11, 2015 4:00 am

FTP Upload problems **solved**

Post by sts »

I am having issues with the FTP uploads using meteohub v5.0k on Raspberry Pi. I am getting errors related to renaming the uploaded files and errors related to UTIME. The errors do not seem to occur on every upload. The errors happen periodically, but often. The error messages in the meteohub system log look like this.

...
Oct 17 12:30:41 meteohub-rpi logger: 2015-10-17 12:30:41 Could not rename windrain2day.png.tmp to windrain2day.png: could not rename remote file.
Oct 17 12:30:41 meteohub-rpi logger: 2015-10-17 12:30:41 Could not preserve times for windrain2day.png: UTIME failed.
Oct 17 12:30:41 meteohub-rpi logger: 2015-10-17 12:30:41 ncftpput /var/run/meteohub/uploads/windrain2day.png: could not rename remote file.
Oct 17 12:39:38 meteohub-rpi logger: 2015-10-17 12:39:38 Could not rename clientraw.txt.tmp to clientraw.txt: could not rename remote file.
...

Here is the output of the ncftpput from a log file created with the -d option:
2015-10-17 12:39:37 227: Entering Passive Mode (192,168,1,200,217,14)
2015-10-17 12:39:37 Cmd: STOR clientraw.txt.tmp
2015-10-17 12:39:37 150: Opening BINARY mode data connection for 'clientraw.txt.tmp'.
2015-10-17 12:39:38 226: Transfer complete.
2015-10-17 12:39:38 Cmd: RNFR clientraw.txt.tmp
2015-10-17 12:39:38 350: File exists, ready for destination name.
2015-10-17 12:39:38 Cmd: RNTO clientraw.txt
2015-10-17 12:39:38 550: rename: No such file or directory.
2015-10-17 12:39:38 Cmd: DELE clientraw.txt
2015-10-17 12:39:38 250: DELE command successful.
2015-10-17 12:39:38 Cmd: RNFR clientraw.txt.tmp
2015-10-17 12:39:38 550: clientraw.txt.tmp: No such file or directory.
2015-10-17 12:39:38 Could not rename clientraw.txt.tmp to clientraw.txt: could not rename remote file.
2015-10-17 12:39:38 Cmd: MFMT 20151017163902 clientraw.txt
2015-10-17 12:39:38 550: clientraw.txt: No such file or directory
2015-10-17 12:39:38 Could not preserve times for clientraw.txt: UTIME failed.
2015-10-17 12:39:38 ncftpput /var/run/meteohub/uploads/clientraw.txt: could not rename remote file.
2015-10-17 12:39:38 Cmd: PASV
2015-10-17 12:39:38 227: Entering Passive Mode (192,168,1,200,217,15)
2015-10-17 12:39:38 Cmd: STOR clientrawhour.txt.tmp
2015-10-17 12:39:38 150: Opening BINARY mode data connection for 'clientrawhour.txt.tmp'.
2015-10-17 12:39:38 226: Transfer complete.
2015-10-17 12:39:38 Cmd: RNFR clientrawhour.txt.tmp
2015-10-17 12:39:38 350: File exists, ready for destination name.
2015-10-17 12:39:38 Cmd: RNTO clientrawhour.txt
2015-10-17 12:39:38 250: RNTO command successful.
2015-10-17 12:39:38 Cmd: MFMT 20151017163915 clientrawhour.txt
2015-10-17 12:39:38 213: Modify=20151017163915; clientrawhour.txt
2015-10-17 12:39:38 Cmd: QUIT
2015-10-17 12:39:38 221: Goodbye. You uploaded 2.61 KB and downloaded 0 bytes.


Does anybody have suggestions on how to fix this?
Adding the error logging to a file with the -d option reduced the frequency of the errors to about once every 10-15 minutes.
Last edited by sts on Wed Oct 21, 2015 8:43 pm, edited 1 time in total.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7878
Joined: Mon Oct 01, 2007 10:51 pm

Re: FTP Upload problems

Post by admin »

Meteohub uploads a file with a temporary name and then renames the file to the destination file name. This has the advantage that there are no half uploaded files on the system at any time. But it requires the FTP server to be able to handle these rename operation. 99% do, but the one you are facing seems to be limited on this feature.
sts
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Sun Oct 11, 2015 4:00 am

Re: FTP Upload problems

Post by sts »

Thank you for the reply, Boris.

I located and fixed the problem. I just upgraded and transferred my meteohub license from an old iConnect to a new RPI 2. The old iConnect was deactivated, but was still trying to upload files to the same FTP server on the same schedule. This caused lots of strange behavior.
Post Reply