Solar Guppy - All Things Solar Forum

It is currently Thu Apr 18, 2024 11:32 am GMT EthGMT

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: FTP problem, related to new router?
PostPosted: Thu Oct 28, 2010 5:59 am GMT EthGMT 
Offline
Fish Eggs
Fish Eggs

Joined: Fri Jul 24, 2009 1:10 am GMT EthGMT
Posts: 7
Hello, I have been using SG-View without trouble for several months. A few days ago, I switched our old USR router for a new Belkin one. For some reason, I think it's affected the upload of the daily logs with SG-View, they have failed three days in a row now. And the image upload for the png files is also not working a lot of the time.

I can FTP just fine from my desktop using Filezilla. So I suspect it's some interaction effect between the new router's security settings, and the way SG-View invokes FTP? But when regular FTP with Filezilla works, I don't understand exactly what would be different about SG-View.

Here is a transcript of the log when attempting to upload a png:

FTP_MESSAGES
Transfer complete
Disconnecting.
Disconnected.
Sending file failed
Attempting to connect
Resolving hostname ftp.yourturn.ca.
Connecting to 69.90.72.37.
Connected.
Connection established
Sending Changedir command
Set mode to binary
Sending upload command
Starting FTP transfer
Transfer complete
Disconnecting.
Disconnected.
Sending file failed
Attempting to connect
Resolving hostname ftp.yourturn.ca.
.....

And so on, it's like that over and over. When the log files fail to go, there is no trace of them on the server, no zero byte files, nothing.

I'm wondering if the router is preventing SG-View from answering an ident request that the server is making? (port 113?) Or maybe a standard ping? But again, Filezilla works, so really, I'm just taking wild guesses at this point. The router is quite secure though, it locks up everything by default quite well. If that is the issue, then the question is what to open up?

Any pointers would be much appreciated, particularly if you know exactly what SG-View might be expecting from the server, and not finding/receiving.

Thanks!

--Julian


Top
 Profile  
 
 Post subject: Re: FTP problem, related to new router?
PostPosted: Thu Oct 28, 2010 12:29 pm GMT EthGMT 
Offline
Red Cobra Delta Guppy
Red Cobra Delta Guppy
User avatar

Joined: Sun Jun 02, 2002 1:01 am GMT EndGMT
Posts: 1159
Location: Lakeland Florida
FTP is pretty straight forward, it uses ports 20/21 so make sure those are properly forwarded to the sever/pc running SG-View in your new router

Also, check to see if there are any special restrictive rules on the firewall, for example, some routers require an outgoing connection before allowing receiving connection, since FTP uses separate port numbers for control and data that could cause and issue. In cicso language, it would be called a dynamic ACL, no clue what it would be for a Belkin


Top
 Profile  
 
 Post subject: Re: FTP problem, related to new router?
PostPosted: Thu Jan 06, 2011 3:42 pm GMT EthGMT 
Offline
Fish Eggs
Fish Eggs

Joined: Fri Jul 24, 2009 1:10 am GMT EthGMT
Posts: 7
Just an update on this...no obvious solutions in the router's control panel...it must just be some security stuff it's running on all the packets or who knows what, that is interrupting the interaction with the server, and due to timing or delays or ???? SG-View is dumping the connection.

Anyway, DOS batch scripting to the rescue, and Windows XP scheduled tasks. The main thing is getting the daily log file up to the server once a day for the server to process and create the graphs, etc. So I made a DOS batch file that looks like this:

@echo off
cd c:\path\to\SG-View\
For /F "tokens=1,2,3 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set Year=%%C
)
echo user username> ftpcmd.dat
echo password>> ftpcmd.dat
echo cd /remote/directory/on/server/>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put "SGTData Data Log %Month%-%Day%-%Year%.xls">> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.serverdomain.com
del ftpcmd.dat

And then I setup a scheduled task in XP (Start Menu->Accessories->System Tools->Scheduled Tasks) and it runs once a day after SG-View is supposed to have sent the file, as a backup in case the transfer fails, which it usually does.

Note that the grabbing the current date will be dependent on your locale settings. So you may have to change the token numbers and the order of the variable assignments. I have that computer set to provide the date in day/month/year structure, so the tokens are 1, 2 and 3, and the variable assignments are in accordance with that. If you have month/day/year, or a different delimiter string (delims), then you would need to make adjustments.

Obviously, the paths and username, password, server name, etc, would have to change to match your own setup if you're going to use this.

Good luck one and all with your systems.

--Julian
Solar Powered in Toronto - www.yourturn.ca/solar


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000 - 2020 phpBB Group

phpBB SEO

© SGT 2002 - 2020 Solar Guppy