ftpupload: Failed to upload files

81 views
Skip to first unread message

Georgios Voulgarakis

unread,
Mar 1, 2018, 1:50:27 AM3/1/18
to weewx-user
Hi to all, almost new to weewx(I was using wvieweather before).
It seems weewx data can't get uploaded to remote server via ftp while working localy it works ok
my server info is
username: myusername
password: mypassword
server: (https) hovik.georgios-voulgarakis.info
path: is the root of the user (jailed via vsftpd)

the /etc/weewx/weewx.conf is set like that

  
  [[FTP]]
       
# 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.
      user
= musername
      password
= mypassword
      server
= hovik.georgios-voulgarakis.info
      path
=

       
# Set to True for an FTP over TLS (FTPS) connection. Not all servers
       
# support this.
      secure_ftp
= False

       
# 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




and the /var/log/syslog (debug=1)

Mar  1 07:35:15 weewx rsyslogd-2007: action 'action 11' suspended, next retry is Thu Mar  1 07:35:45 2018 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Mar  1 07:35:15 weewx systemd[1]: Created slice User Slice of blades.
Mar  1 07:35:15 weewx systemd[1]: Starting User Manager for UID 1001...
Mar  1 07:35:15 weewx systemd[1]: Started Session c1 of user blades.
Mar  1 07:35:15 weewx systemd[447]: Reached target Timers.
Mar  1 07:35:15 weewx systemd[447]: Reached target Sockets.
Mar  1 07:35:15 weewx systemd[447]: Reached target Paths.
Mar  1 07:35:15 weewx systemd[447]: Reached target Basic System.
Mar  1 07:35:15 weewx systemd[447]: Reached target Default.
Mar  1 07:35:15 weewx systemd[447]: Startup finished in 50ms.
Mar  1 07:35:15 weewx systemd[1]: Started User Manager for UID 1001.
Mar  1 07:35:17 weewx weewx[430]: manager: Added record 2018-03-01 07:35:00 CET (1519886100) to database 'weewx.sdb'
Mar  1 07:35:17 weewx weewx[430]: manager: Added record 2018-03-01 07:35:00 CET (1519886100) to daily summary in 'weewx.sdb'
Mar  1 07:35:17 weewx weewx[430]: reportengine: Running reports for latest time in the database.
Mar  1 07:35:17 weewx weewx[430]: reportengine: Running report StandardReport
Mar  1 07:35:17 weewx weewx[430]: reportengine: Found configuration file /etc/weewx/skins/Standard/skin.conf for report StandardReport
Mar  1 07:35:18 weewx weewx[430]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.c
cheetahgenerator.Extras'
]
Mar  1 07:35:18 weewx weewx[430]: manager: Daily summary version is 2.0
Mar  1 07:35:20 weewx weewx[430]: cheetahgenerator: Generated 14 files for report StandardReport in 1.84 seconds
Mar  1 07:35:20 weewx weewx[430]: manager: Daily summary version is 2.0
Mar  1 07:35:20 weewx weewx[430]: imagegenerator: Generated 12 images for StandardReport in 0.34 seconds
Mar  1 07:35:20 weewx weewx[430]: copygenerator: copied 9 files to /var/www/html/weewx
Mar  1 07:35:20 weewx weewx[430]: reportengine: Running report SteelSeries
Mar  1 07:35:20 weewx weewx[430]: reportengine: Found configuration file /etc/weewx/skins/ss/skin.conf for report SteelSeries
Mar  1 07:35:20 weewx weewx[430]: copygenerator: copied 6 files to /var/www/html/weewx/ss
Mar  1 07:35:20 weewx weewx[430]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
Mar  1 07:35:20 weewx weewx[430]: manager: Daily summary version is 2.0
Mar  1 07:35:20 weewx weewx[430]: cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>'
Mar  1 07:35:20 weewx weewx[430]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/ss/index.html.tmpl
Mar  1 07:35:20 weewx weewx[430]: cheetahgenerator: **** Reason: 'ascii' codec can't decode byte 0xc3 in position 427: ordinal not in range(128)
Mar  1 07:35:20 weewx weewx[430]: ****  Traceback (most recent call last):
Mar  1 07:35:20 weewx weewx[430]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 328, in generate
Mar  1 07:35:20 weewx weewx[430]: ****      filtersLib=weewx.cheetahgenerator)
Mar  1 07:35:20 weewx weewx[430]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in __init__
Mar  1 07:35:20 weewx weewx[430]: ****      self._compile(source, file, compilerSettings=compilerSettings)
Mar  1 07:35:20 weewx weewx[430]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in _compile
Mar  1 07:35:20 weewx weewx[430]: ****      keepRefToGeneratedCode=True)
Mar  1 07:35:20 weewx weewx[430]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
Mar  1 07:35:20 weewx weewx[430]: ****      settings=(compilerSettings or {}))
Mar  1 07:35:20 weewx weewx[430]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in __init__
Mar  1 07:35:20 weewx weewx[430]: ****      source = unicode(source)
Mar  1 07:35:20 weewx weewx[430]: ****  UnicodeDecodeError: '
asci
i
' codec can't decode byte 0xc3 in position 427: ordinal not in range(128)
Mar  1 07:35:21 weewx weewx[430]: cheetahgenerator: Generated 1 files for report SteelSeries in 0.31 seconds
Mar  1 07:35:21 weewx weewx[430]: manager: Daily summary version is 2.0
Mar  1 07:35:21 weewx weewx[430]: imagegenerator: Generated 11 images for SteelSeries in 0.34 seconds
Mar  1 07:35:21 weewx weewx[430]: reportengine: Running report FTP
Mar  1 07:35:21 weewx weewx[430]: reportengine: Found configuration file /etc/weewx/skins/Ftp/skin.conf for report FTP
Mar  1 07:35:21 weewx weewx[430]: ftpupload: Attempting connection to hovik.georgios-voulgarakis.info
Mar  1 07:35:22 weewx weewx[430]: ftpupload: Connected to hovik.georgios-voulgarakis.info
Mar  1 07:35:42 weewx weewx[430]: ftpupload: Attempt #1. Failed uploading ./daybarometer.png to hovik.georgios-voulgarakis.info. Reason: timed out
Mar  1 07:35:53 weewx rsyslogd-2007: action 'action 11' suspended, next retry is Thu Mar  1 07:36:23 2018 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Mar  1 07:36:02 weewx weewx[430]: ftpupload: Attempt #2. Failed uploading ./daybarometer.png to hovik.georgios-voulgarakis.info. Reason: timed out
Mar  1 07:36:22 weewx weewx[430]: ftpupload: Attempt #3. Failed uploading ./daybarometer.png to hovik.georgios-voulgarakis.info. Reason: timed out
Mar  1 07:36:22 weewx weewx[430]: ftpupload: Failed to upload file ./daybarometer.png
Mar  1 07:36:42 weewx weewx[430]: ftpupload: Attempt #1. Failed uploading ./daytempdew.png to hovik.georgios-voulgarakis.info. Reason: timed out



I don't know what Iam doing wrong, the weewx seems to connect to server but fails to upload files. At the server side I have checked there are no permission/ownership problems



gjr80

unread,
Mar 1, 2018, 2:59:45 AM3/1/18
to weewx-user
Hi,

Ok, let's start with the obvious one. Is your ftp username really 'myusername', if so is user = musername a typo, bad copying and pasting or an error?

Gary

Georgios Voulgarakis

unread,
Mar 1, 2018, 3:06:47 AM3/1/18
to weewx-user
well it's just a typo, all right credentials are copy/pasted correct in real client/server

gjr80

unread,
Mar 1, 2018, 3:25:34 AM3/1/18
to weewx-user
Any non-alphanumerics in your password? If so have you put the password in quotes?

Gary

George Blades Voulgarakis

unread,
Mar 1, 2018, 4:47:23 AM3/1/18
to weewx...@googlegroups.com
no alphanumerics, I think the connection is being established but there is an error uploading things

Mar  1 07:35:21 weewx weewx[430]: ftpupload: Attempting connection to hovik.georgios-voulgarakis.info
Mar  1 07:35:22 weewx weewx[430]: ftpupload: Connected to hovik.georgios-voulgarakis.info
Mar  1 07:35:42 weewx weewx[430]: ftpupload: Attempt #1. Failed uploading ./daybarometer.png to hovik.georgios-voulgarakis.info. Reason: timed out

I also tried sending some files with "ncftpput" and works ok so there is no permission/ownership issues at the server side.

On Thu, Mar 1, 2018 at 9:25 AM, gjr80 <gjrod...@gmail.com> wrote:
Any non-alphanumerics in your password? If so have you put the password in quotes?

Gary

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/baEBB5mHgPU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
hilsen,
Georgios Voulgarakis



 

gjr80

unread,
Mar 1, 2018, 4:59:45 AM3/1/18
to weewx-user
Last idea I have, are you uploading to WU using rapidfire? I seem to remember a post where a user was using RF and getting FTP timeouts, turning off RF fixed the FTP timeout problem. If not using RF then you will have to wait a few hours for Tom.

Gary

George Blades Voulgarakis

unread,
Mar 1, 2018, 5:57:51 AM3/1/18
to weewx...@googlegroups.com
Iam not uploading to WU or elsewhere,just localy and trying to ftp to a remote server.
Do you think would be ok to use ncftp (cli ftp client) to upload the directory recursively to the remote using cron like every 5 minutes?

On Thu, Mar 1, 2018 at 10:59 AM, gjr80 <gjrod...@gmail.com> wrote:
Last idea I have, are you uploading to WU using rapidfire? I seem to remember a post where a user was using RF and getting FTP timeouts, turning off RF fixed the FTP timeout problem. If not using RF then you will have to wait a few hours for Tom.

Gary

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/baEBB5mHgPU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
hilsen,
Georgios Voulgarakis



 

gjr80

unread,
Mar 1, 2018, 6:04:53 AM3/1/18
to weewx-user
You could, but I would not be giving up yet. I am by no means a FTP guru, just picking up on some of the past FTP issues that have come up here. My advice is to wait for Tom.

Gary


On Thursday, 1 March 2018 20:57:51 UTC+10, Georgios Voulgarakis wrote:
Iam not uploading to WU or elsewhere,just localy and trying to ftp to a remote server.
Do you think would be ok to use ncftp (cli ftp client) to upload the directory recursively to the remote using cron like every 5 minutes?
On Thu, Mar 1, 2018 at 10:59 AM, gjr80 <gjrod...@gmail.com> wrote:
Last idea I have, are you uploading to WU using rapidfire? I seem to remember a post where a user was using RF and getting FTP timeouts, turning off RF fixed the FTP timeout problem. If not using RF then you will have to wait a few hours for Tom.

Gary

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/baEBB5mHgPU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
hilsen,
Georgios Voulgarakis



 

George Blades Voulgarakis

unread,
Mar 1, 2018, 6:40:12 AM3/1/18
to weewx...@googlegroups.com
I will wait, thank you for your time gjr80

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
hilsen,
Georgios Voulgarakis



 

Thomas Keffer

unread,
Mar 1, 2018, 8:56:18 AM3/1/18
to weewx-user
Two things to try:

1. Does you password include the character '#'? If so, it will be interpreted as the start of a comment by the configuration parser.
2. Are you using passive or active FTP mode? See the User's Guide for the difference. Whichever one you are using, try the other.

-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+unsubscribe@googlegroups.com.

George Blades Voulgarakis

unread,
Mar 1, 2018, 11:14:51 AM3/1/18
to weewx...@googlegroups.com
Hello!
1. pass does not contain "#"
2. I tried active mode but no success uploading files - 550 Permission denied. While it was able to upload just the directories empty: backgrounds/  NOAA/  RSS/  smartphone/  ss/

using passive mode, not files nor directories getting uploaded.

Thomas Keffer

unread,
Mar 1, 2018, 11:28:11 AM3/1/18
to weewx-user
OK.

Other things to check:

Make sure your FTP server is running and will accept incoming connections that are not secure. I noticed that when I click on your link http://hovik.georgios-voulgarakis.info/ it immediately switches to an https connection.

Make sure that permissions are correct for the directories of the incoming files.

If all else fails, feel free to send me your password information and I'll try it on my end.

-tk

--

Georgios Voulgarakis

unread,
Mar 1, 2018, 2:53:21 PM3/1/18
to weewx-user
Tom, do you have any private channel other than gmail to send you username and pass;

Thomas Keffer

unread,
Mar 1, 2018, 3:01:50 PM3/1/18
to weewx-user
No. However, gmail is encrypted end-to-end. If you're concerned, you could change your password temporarily, then set it back after we are done.

-tk

On Thu, Mar 1, 2018 at 11:53 AM, Georgios Voulgarakis <gvou...@gmail.com> wrote:
Tom, do you have any private channel other than gmail to send you username and pass;

George Blades Voulgarakis

unread,
Mar 2, 2018, 3:20:07 AM3/2/18
to weewx...@googlegroups.com
gmail is not encrypted end2end, anyway thank you for your efforts, just check your email for further info.
Only thing I can think of is that the weewx is running in a linux container but that shouldn't be a problem.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/baEBB5mHgPU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
hilsen,
Georgios Voulgarakis



 

Georgios Voulgarakis

unread,
Mar 3, 2018, 1:45:37 AM3/3/18
to weewx-user
Thanx again all, at this moment I don't have much time to figure this out and I will be uploading the weather data from local to remote with a cron-script every 10' (data are generated every 5' but I will be sending every 10').

upload.sh
ncftpput -R -u username -p password domain-or-IP /destination/directory /source/directory


crontab -e
1,11,21,31,41,51 * * * * /home/user/upload.sh
Reply all
Reply to author
Forward
0 new messages