FTP Error uploading to website

85 views
Skip to first unread message

chris op

unread,
Apr 14, 2020, 12:06:06 PM4/14/20
to weewx-user
Hi!

All was working fine with uploading the weewx weather data to my website. However, this suddenly stopped a couple of weeks ago. I was realizing one day, that the website was not updated anymore.

Looking into the syslog what happens and I found the following errors:
Apr 14 17:46:03 raspberrypi weewx[27105]: ftpupload: Attempt #1. Failed uploading /home/www/xyz.de/daywind.png to sxyz.xyzserver.host. Reason: 425 Unable to build data connection: Operation not permitted
This changes during to process into:
Apr 14 17:46:13 raspberrypi weewx[27105]: ftpupload: Attempt #3. Failed uploading /home/www/xyz.de/neowx/daywind.png to sxyz.xyzserver.host. Reason: 200 Type set to I
or
Apr 14 17:51:20 raspberrypi weewx[27105]: ftpupload: Attempt #1. Failed uploading /home/www/xyz.de/belchertown/graphs/index.html to sxyz.xyzserver.host. Reason: 550 /home/www/xyz.de/belchertown/graphs: File exists

I have tried to play around in the file weewx.conf and changed the parameters there but this only led to other error messages like 550 or 500.

My configuration looks as follows:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp
       
        # If you wish to use FTP, uncomment and fill out the next four lines.
        # Use quotes around passwords to guard against parsing errors.
        user = web83

        password = 'xyz'
        server = sxyz.xyzserver.host
        path = /home/www/xyz.de/
       
        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
         secure_ftp = True
       
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        # HTML_ROOT = /var/www/html/weewx
       
        # Most FTP servers use port 21
        port = 21
       
        # Set to 1 to use passive mode, zero for active mode
        passive = 1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Can anyone help? I am a rooky but trying hard to become better with linux and this kind of software and programming.

Thank you!

Greg from Oz

unread,
Apr 14, 2020, 7:39:02 PM4/14/20
to weewx-user
See if ftp works manually.

from a terminal:

ftp  sxyz.xyzserver.host

when name prompt comes back enter in your user web83
then type in the password

assuming this works type pwd to see what folder you are in 

change to /home/www/xyz.de by typing cd /home/www/xyz.de

you can put a local file into /home/www/xyz.de by typing put <filename of a local file>

or you can get files from /home/www/xyz.de by typing get <filename of remote file>

If all of that works then the weex in theory should work.
Message has been deleted

chris op

unread,
Apr 15, 2020, 3:43:35 AM4/15/20
to weewx-user
Can I edit my posts here?

Thanks, Greg!

I was able to connect to the ftp server and to place the correct index.html there. However, I connected from my linux ubuntu terminal. And after installing ftp on the raspberry I was also able to the same from there. The upload from weewx does still not work, unfortunaltey.

Can you or anyone comment on the type of FTP errors I receive?

<s>Should I also be able to connect to the raspberry pi with shh and connect to the ftp server from there? Because when I try this I get the error message that the ftp command is unknown.</s>


Greg from Oz

unread,
Apr 15, 2020, 3:50:36 AM4/15/20
to weewx-user

Greg from Oz

unread,
Apr 15, 2020, 6:20:17 AM4/15/20
to weewx-user
This shows python ftp. http://makble.com/upload-new-files-to-ftp-server-with-python
It also says about 550 errors.

weewx is using /usr/share/weewx/weeutil/ftpupload.py

So hopefully someone who knows python might help you...I don't know python.

Good luck


On Wednesday, 15 April 2020 02:06:06 UTC+10, chris op wrote:

Thomas Keffer

unread,
Apr 15, 2020, 7:55:20 AM4/15/20
to weewx-user
The RPi generally does not come with a copy of the client "ftp". However, you can install it

sudo apt install ftp

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a3397bc8-224a-41be-b85a-f0aa55aa73f0%40googlegroups.com.

chris op

unread,
Apr 17, 2020, 5:11:40 AM4/17/20
to weewx-user
Thanks everyone for the help!

I did play around, it was a simple error and it does work now:

I commented out the port line and changed secure_ftp to false:

        secure_ftp = False
        # port = 21

Actually, I thought I have tested this before without success. Anyway, thanks again!
Reply all
Reply to author
Forward
0 new messages