FTP Upload problems **solved**
Posted: Sat Oct 17, 2015 7:05 pm
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.
...
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.