Strang behavior FTP within Meteohub

Discussion of the Meteohub software package

Moderator: Mattk

thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Strang behavior FTP within Meteohub

Post by thommyse »

Been testing WD-live data FTP to my Webserver
No problems when FTP-ing to my WindowsPC emvironment ( NofeelFTPserver + Abyss Webserver)But when using my "QNAP Ts109Pro II" as FTP-server
no data is beeing uploaded and system logs says:

ncftpput /data/uploads/clientraw.txt: server said: clientraw.txt: No such file or directory
ncftpput /data/uploads/clientrawdaily.txt: server said: clientrawdaily.txt: No such file or directory
ncftpput /data/uploads/clientrawextra.txt: server said: clientrawextra.txt: No such file or directory
ncftpput /data/uploads/clientrawhour.txt: server said: clientrawhour.txt: No such file or directory
Jul 27 16:25:36 (none) daemon.info thttpd[1041]: spawned CGI process 15143 for file 'cgi-bin/meteohub.cgi'

Anyone else here beeing using "QNAP-NAS" and Meteohub FTP ?
wfpost
Platinum Boarder
Platinum Boarder
Posts: 591
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re:Strang behavior FTP within Meteohub

Post by wfpost »

with 2.6 there seems to be a problem with WD-live and CRON.
If I click save with wd-live selected in graph uploads this error occurs:
Ungültige CRON Zeitangabe "" für Upload "WD-live"
Invalid CRON schedule "" for Upload "WD-live"


Image
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7879
Joined: Mon Oct 01, 2007 10:51 pm

Re:Strang behavior FTP within Meteohub

Post by admin »

@wfpost: Please download and install 2.6b again. You have got a preliminary version I have just swapped by a working one.

@thommyse: Have you tested the ftp-upload with the "save & test" option on the "push services" page. I doubt that it is a WD-Live specific problem.
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strang behavior FTP within Meteohub

Post by thommyse »

Installed V2.6b
Tested "setup push services" hit "Save and Test"
got this error message at the top the meteohub-page

Error on system call: /usr/bin/ncftpput -V -u oregon100 -p nogero -P 21 192.168.1.5 Qweb/tsuploads/ /home/meteohub/meteohub-upload.test >>/var/log/messages 2>>/var/log/messages
Error: Test file "meteohub-upload.test" has not been uploaded (Return Code 768: Unknown Error).


systemlogfile says:

Jul 27 18:48:02 (none) cron.info /USR/SBIN/CRON[1743]: (root) CMD (sleep 1; /srv/www/meteohtml.cgi /home/meteohub/clientraw.conf >/data/graphs/clientraw.out; /srv/www/meteohtml.cgi /home/meteohub/clientrawhour.conf >/data/graphs/clientrawhour.out; cp /data/graphs/clientraw.out /data/myweb/uploads/clientraw.txt; cp /data/graphs/clientrawhour.out /data/myweb/uploads/clientrawhour.txt; mv /data/graphs/clientraw.out /data/uploads/clientraw.txt; mv /data/graphs/clientrawhour.out /data/uploads/clientrawhour.txt; [ -n "`/bin/pidof /usr/bin/ncftpput`" ] || /usr/bin/ncftpput -R -V -DD -u oregon100 -p nogero -P 21 192.168.1.5 Qweb/tsuploads/ /data/uploads/* >>/var/log/messages 2>>/var/log/messages)
Jul 27 18:48:02 (none) cron.info /USR/SBIN/CRON[1747]: (root) CMD (/bin/cat /proc/uptime >/home/meteohub/alive)
Jul 27 18:48:02 (none) cron.info /USR/SBIN/CRON[1745]: (root) CMD (/usr/bin/nice /home/meteohub/wmr928eval -x -c min1 -t -3600 -w /data/weather/ -s /home/meteohub/wmr928eval.conf -e /home/meteohub/wswin.conf -E /home/meteohub/wd.conf)
Jul 27 18:48:02 (none) cron.info /USR/SBIN/CRON[1749]: (root) CMD (/bin/pidof wswinimport || /usr/bin/nice /home/meteohub/wswinimport 2>>/data/log/messages)
Jul 27 18:48:10 (none) daemon.info thttpd[1051]: spawned CGI process 1757 for file 'cgi-bin/meteohub.cgi'
Jul 27 18:48:16 (none) daemon.info thttpd[1051]: spawned CGI process 1781 for file 'cgi-bin/meteohub.cgi'
ncftpput /home/meteohub/meteohub-upload.test: server said: meteohub-upload.test: No such file or directory
ncftpput /data/uploads/clientraw.txt: server said: clientraw.txt: No such file or directory
ncftpput /data/uploads/clientrawdaily.txt: server said: clientrawdaily.txt: No such file or directory
ncftpput /data/uploads/clientrawextra.txt: server said: clientrawextra.txt: No such file or directory
ncftpput /data/uploads/clientrawhour.txt: server said: clientrawhour.txt: No such file or directory
Jul 27 18:48:29 (none) daemon.info thttpd[1051]: spawned CGI process 1810 for file 'cgi-bin/meteohub.cgi'
Jul 27 18:48:34 (none) daemon.info thttpd[1051]: spawned CGI process 1834 for file 'cgi-bin/meteohub.cgi'


tommy
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strang behavior FTP within Meteohub

Post by thommyse »

forgotten to say, after this test with "Qnap FTP-server"
I switched back to my windows "Nofeel FTP-server" and everything works OK

Tommy
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7879
Joined: Mon Oct 01, 2007 10:51 pm

Re:Strang behavior FTP within Meteohub

Post by admin »

This very much looks to me like a problem with the directory specified on the "push services" page regarding FTP.

Please try with modifications of the path "Qweb/tsuploads/" you have specified so far:
"tsuploads/"
"/Qweb/tsuploads/"
...
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strange behavior FTP within Meteohub

Post by thommyse »

Hi !

This morning I updated my QNAP TS109 ProII with the latest version from QNAP

Tested a number of combination for specifying the directories
/Qweb/tsuploads
/Qweb/tsuploads/
/tsuploads
/tsuploads/
tsuploads/

everyone fails (errors as described yesterday)

displaying the TS109-log only give:
192.168.1.4 LoginOK
192.168.1.4 Logoff

A look in the manual for TS109 have this information about Accessing NAS from Linux

In addition to Microsoft and Mac OS, the NAS also supports Linux systems through the
NFS service:
1. In Linux, run the following command:
mount -t nfs <NAS IP address>:/<Network Share Name> <Directory to
Mount>
For example, if the IP address of your NAS is 192.168.0.1 and you want to link the
network share folder “public” under the /mnt/pub directory, use the following
command:
mount -t nfs 192.168.0.1:/public /mnt/pub
Note: You must login as “root” user to initiate the above command.
2. Login as the user ID you define, you can use the mounted directory to access your
network share files.


Tommy
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strang behavior FTP within Meteohub

Post by thommyse »

Hi
Thsi morning I upgraded my TS109 QNAP-NAS to the latest version
Run a number of tests specifying different combinations of directory for uploads
/Qweb/tsuploads
/Qweb/tsuploads/
Qweb/tsuploads/
Qweb/tsupload/
/tsuploads
/tsuploads/
tsuploads/

the same kind of errormessages reported from Meteohub

displaying logfile QNAP-Nas only showing
192.168.1.4 Login OK
192.168.1.4 Logout


Reading the QNAP-NAS manual which says:

In addition to Microsoft and Mac OS, the NAS also supports Linux systems through the
NFS service:
1. In Linux, run the following command:
mount -t nfs <NAS IP address>:/<Network Share Name> <Directory to
Mount>
For example, if the IP address of your NAS is 192.168.0.1 and you want to link the
network share folder “public” under the /mnt/pub directory, use the following
command:
mount -t nfs 192.168.0.1:/public /mnt/pub
Note: You must login as “root” user to initiate the above command.
2. Login as the user ID you define, you can use the mounted directory to access your
network share files.


Tommy
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strang behavior FTP within Meteohub

Post by thommyse »

No reply from Admin yet ?

any suggestions how to go on to solve my problem ?
should i contact QNAP and ask if they have suggestions/problem reported/known limitations ?

tommy
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7879
Joined: Mon Oct 01, 2007 10:51 pm

Re:Strang behavior FTP within Meteohub

Post by admin »

sorry, no idea what is going wrong with your Qnap. Have you tried ftp transfer to it from your windows machine?

I still think your FTP settings are wrong. Did you try to connect from another linux machine? If so what are the exact ftp parameters you provide with this? We can then compare this with the ncftpput parameters Meteohub is issuing.

Meteohub does not act as an NFS-server. That approach will not work.
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strang behavior FTP within Meteohub

Post by thommyse »

Finally some good ( and some not so good ) news !

The reason for not beeing able to FTP-ing up to my "QNAP Ts109" was caused by me not giving the right permissions for the user , defined for FTP-jobs from Meteohub.
Now the transfer works, but :

It only works if the files dont exists already.
As soon as i delete the files manually (clientraw.txt a.s.o ) next scheduled transfer works, but then nothing happens until i have deleted the files manually again.

Is there any way to specify the NCFTPPUT to first deleting the files and then transfer the new ones ?
Or maybe adding a command that deletes the files before FTP-ing them ?

tommy
PS! my knowledge in Linux is not very good, mostly working with MS-Windows, so if my question is very basic , please excuse me !
sevenless
Gold Boarder
Gold Boarder
Posts: 160
Joined: Wed Jul 02, 2008 7:35 pm
Location: Seattle WA, USA

Re:Strang behavior FTP within Meteohub

Post by sevenless »

That still sounds like a problem with the QNAP configuration.

NCFTPPUT overwrites all of my PNG graph files and text files with no problem every time I upload new images to my web server, so the settings on Meteohub are correct as long as the remote server is configured properly.

Check your user permissions once again -- you might need to go up one level in the folder hierarchy to make sure the FTP user has read/write permission there as well. Perhaps although the user can write to the folder, the newly created files are being set "read" instead of "read/write".

You also might have better luck troubleshooting this in the QNAP forums...
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7879
Joined: Mon Oct 01, 2007 10:51 pm

Re:Strang behavior FTP within Meteohub

Post by admin »

That seems to be a very special implementation of the ftp-server on the qnap. normally ftp servers do overwrite old files when retrieving new ones. ncftpput does not provide any special "delete target file" options. Can it be, that the ftp user on the qnap is not enabled for deleting files?

I guess there might be a set of security options for the qnap which prevent from accidentally deleting files. Any chance to change the behavior of the qnap?
thommyse
Junior Boarder
Junior Boarder
Posts: 21
Joined: Sun Mar 16, 2008 5:35 pm

Re:Strang behavior FTP within Meteohub

Post by thommyse »

Thx for your replies !
Been having a discussion with QNAP about this behavior, they say that there will be support for Linux-clients ASAP.
What ASAP means I dont know, but pleased they took my problem seriously.

include a copy of information sent to QNAP
Image
terrax
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: Fri Aug 08, 2008 10:12 am

Re:Strang behavior FTP within Meteohub

Post by terrax »

just a thought... I see that you do a chgrp. that can result in bringing the files into a group the ftp-server program has no delete permissions for.

The error might disappear when you leave ownership and group-membership of the files generated by the ftp-server untouched.
Post Reply