WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
FTP issues (Read 22791 times)
rickp
YaBB Newbies
*
Offline



Posts: 18
FTP issues
Aug 5th, 2008 at 7:08pm
 
I continue to have FTP problems.

I have 1 directory set up as a watch directory.  The task simply looks for any new or changed file like "x*.xls" and sends it to our FTP server.  I also have it setup to email me on problems.

I constantly get the error message:

DONE, Error=30029 (Component was busy while disconnected by the server.)
Date/Time: 8/5/2008 10:52:56 AM
Computer: LCI

whether sending 1 or 100 files.  The task will also stop working randomly (I have it configured to restart on first and subsequent failures in services setup).  It is running on a Windows 2003 server.  If I connect to the FTP server using an FTP client (or even with Windows Explorer) I can ftp with no problems, timeouts or errors.

The task is configured to keep connection open as long as possible, try to connect an unlimited number of times, use the default monitoring method, triggers on filenew and filechg, and delays 10 seconds.

Rick
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #1 - Aug 6th, 2008 at 9:39am
 
Hello Rick,

That error can occur with some FTP servers that don't support NOOP commands. The FTP task send a NOOP command to "keep the line open" every ~60 seconds. You can disable sending NOOPs on the settings window of this task, please uncheck
"Enable Keep Alive (NOOP commands)"

If that option is not on your FTP settings window, please upgrade to the current WatchDirectory version.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #2 - Aug 7th, 2008 at 5:39pm
 
Yet another problem.  I'm looking at the directory that watchdirectory is supposed to be monitoring.  ALL files show a date of 8/7/2008.  Yet all the files on my FTP server are dated yesterday, which means that watchdirectory failed to upload a single file.

The last log entry for watchdirectory is from yesterday (8/6/2008) with a timestamp of 10:21 AM.  That means that not only did it miss the changed files this morning, it also failed to catch the changed files at 3:00 pm yesterday.

I just stopped the task to turn on the debugging info, and when it restarted it did see the changed files and has started the FTP process.  If I have to stop and restart watchdirectory in order to make it work, I don't exactly understand what it is saving me?

This problem of not always detecting the changes has been ongoing, and in fact I've posted previously about it.

Rick
Back to top
 
 
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #3 - Aug 7th, 2008 at 6:39pm
 
Only appeared to be working.  It stopped about 3/4 through the run.  NO error message.  NO email.  NO entry in either Appplication or System event log.

The log shows that it did start the process for x312.xls, but then the log just stops.

Before watchdirectory, we had to manually FTP the files, but we knew they were there.  Now, we not only have to manually upload the files, but also try to figure out why they weren't uploaded.

I'll be happy to provide whatever logs or access you need to troubleshoot this problem.  I've posted about the same type of problems before.  So far, watchdirectory has caused way more problems than it solves, and our customers (and my boss) have about lost patience with me.

Rick
Back to top
 
 
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #4 - Aug 7th, 2008 at 6:48pm
 
More information.  A new file run generated changed files in the watched directory.  Watchdirectory did not detect any changes.  Once I stopped the task and restarted, it did see new changes, but failed to see that the files already generated in this run were newer than the last run, so once again I'm manually uploading files.

Rick
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #5 - Aug 8th, 2008 at 10:37am
 
Rick,

I am not sure what is happening. I would like to see your task settings and history database.
Can you please
stop the task
"right click" it
select the option "Backup selected task"

This will create a ZIP of your task and history. Please email the zip to me.

If you are concerned, you should change the FTP password to some bogus value first.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #6 - Aug 18th, 2008 at 10:36pm
 
Any update on this?  I sent the requested files to you on the 9th.

Rick
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #7 - Aug 19th, 2008 at 8:41am
 
Hello Rick,

I answered your message earlier, but now I see I got this response a few days later
Quote:
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  XXX@YYY.net
    retry timeout exceededThis message was created automatically by mail delivery software.


Here is my original answer to you (I have attached the picture):

I looked at the "history" entries, and see something very strange.... see attached picture.
The line marked with the red arrow, is the last thing the upload does, it seems to "hang". Normally, 1 nanosecond after this, it should start uploading (look at other events before it). Instead it is just "hanging doing nothing". After some time (8:09:33 AM) it disconnects (because you stopped the task).

As WD will only allow 1 upload at a time, it will wait until its complete. Obviously, if it is "hanging" like above, the upload never completes, so other uploads are never started. If I look at previous "runs" of this task, it is always the last upload, and it hangs at the same spot.

Can you find out (ask your FTP administrator) if at that time (8/8/2008 7:33:27 AM) there are errors reported in the FTP server logs?
Back to top
 

rick.png (10 KB | )
rick.png

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #8 - Aug 24th, 2008 at 4:59am
 
I continue to have problems.  In your last message, you said that WD hangs.  Shouldn't that be handled by watchdirectory?  It seems like if the connection bounces or the server goes away watchdir should gracefully recover, not hang forever.  I've got another log that I'll send with a similar problem.  I've got calls in to the FTP provider, but so far have not been called back.  However, I again go back to the fact that every other ftp client I try will transfer all files with out incident.  I've even started transfers on multiple machines to the FTP server, NO problem using any of several other clients.

As I said earlier, the ONLY reason I purchased watchdir was to handle these ftp uploads.  Right now I'm out $125 for a piece of software that does not work.

Rick
Back to top
 
 
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #9 - Aug 24th, 2008 at 5:06am
 
The last error message emailed to me, when I shut down the server to force watch dir to restart:

TaskCaller: terminating thread as it didn't respond within 10 seconds to stop request.
Date/Time: 8/23/2008 8:42:50 PM
Computer: LCI


Again, why does the task hang?  If it is still trying to ftp the file, why?  Certainly there should be a way to detect it is stuck?  Or give me a setting so I can set a timeout.

In looking at the current log, I do see where watchdir did continue to detect the file changes as new files were created, but did NOT try to FTP the file (because it was hung?).  The other side of that is that, since it did detect the changes, when I forced a server restart, watchdir did not process the changed files (I know I can force it on startup, but I shouldn't have to).  I had to touch each file so watchdir would ftp it (assuming it actually does ftp them).

Rick
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #10 - Aug 26th, 2008 at 7:49am
 
Hello Rick,

The point I was trying to make in my reply, is that it always hangs at the same spot (marked on the picture with a red arrow).
The command it hangs on (setting the transfer mode to Binary or Ascii) normally returns "immediately", but when I looked in your history database, I saw that "when it hangs", it was always hanging at that call.

Quote:
Right now I'm out $125 for a piece of software that does not work.

Please contact us with your order number and we will gladly refund you.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #11 - Oct 28th, 2008 at 7:47pm
 
I've continued to try and work with the FTP problems, and may have found a solution.  I'm running on a Win2003 server, and have had problems pretty much since I installed (tasks stopping randomly, FTP stopping, can't stop the task using the Stop button, various other errors).  I created a virtual server on the same computer and installed Win2000 server (which is what I originally tested Watchdirectory on).  It's still too early to say it is fixed, but since moving the install to the virtual Win2K server, Watchdirectory seems to work significantly better.  When I stop the task, it stops right away.  When sending files, I get 1 message per file on the task history (on 2003 I would get 20-30 messages per file).  Note that I am still sending to the same FTP server, and using the same hardware, so it would appear that the problem is running under Win2003 server?  Nothing else has changed, I'm monitoring the same directory with the same file mask, and while the virtual server does provide a virtual NIC, ultimately I'm still running through the same network interface, router, and internet connection.

I'll continue to monitor and will let you know, but it would appear there is a problem running under W2k3 server...

Rick
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #12 - Oct 29th, 2008 at 9:26am
 
I would be very interested to know if it works better.

There are several customers who use the FTP plugin on w2k3, however....

Could it be that a virus-scanner or firewall is blocking the FTP access at some point?

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #13 - Oct 31st, 2008 at 7:34am
 
Rick,

How is the "Passive" option set for this task? Can you clear that option and see if it works better on your w2k3 server?

Dirk (German support) is doing some tests on Windows 2003, and even FileZilla seems to misbehave if Passive mode is selected (some files upload fine, then it blocks with a timeout). This can obviously be caused by the specific settings (firewall, virus-scanner blocking ports) of this 2003 server, but thus far clearing the Passive option seems to work.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 658
South Germany
Re: FTP issues
Reply #14 - Oct 31st, 2008 at 9:44am
 
Rick ,

please also try to enable/disable the option "keep connection open as long as possible" in conjunction with "active mode".

In my testing I got problems when this options was disabled.
Back to top
 

Viele Grüße / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
sotic
YaBB Newbies
*
Offline



Posts: 9
Re: FTP issues
Reply #15 - Nov 3rd, 2008 at 1:20pm
 
We have had similar problems on a 2003 box, I am thinking it is related to the number of ftp jobs.  We have approx 80+ going to 5 different servers, two different routes (so different firewalls) what appears to happen is some just lock up.  If we reduce the number of live ftp jobs things are better.  Is there a limit to the number of ftp tasks that can be run at once, could this be a limit in 2003 ?

Secondly some error with "CoInitialize has not been called" do you know what this is ?

Regards


Leo
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #16 - Nov 4th, 2008 at 6:04am
 
Well, that doesn't seem to be related to 2003 *specifically*. It has probably more to do with the number of connections available. My guess would be that you run into the same troubles if these tasks run on, for example, Win2000.

Some background info....

For an FTP upload, you need 2 connections (sockets):
One is used to send commands (upload this file), this is commonly a socket on port 21.
Another socket is used for the data-transfer (here is byte 1-2048 of that file). The port used for this socket is dynamically chosen, and is often a port higher than 1024. See (*) for some more info on the data-socket.

There are 2 issues here:
* The number of available sockets on the client side (used by WatchDirectory)
* The number of available sockets on the server side (the FTP server software)

So connecting to an FTP server uses 1 socket at the client side and one at the server side. To upload a file, you need 2 more (an extra socket at each side for the upload).

The number of available sockets on the client side (Windows) is normally several thousands, but it may be limited by an administrator (firewall etcetera).
Some admins think that limiting the number of "open ports" will help security - it will actually limit the number of sockets available for FTP programs.
Also, all processes running on the box share this pool of sockets - for example, a webbrowser will also use several of them.

On the server side (often Unix) there are also several limits. Not only on the number of sockets available, but also how many users can be connected at the same time.
For example, one of our sites is hosted with GoDaddy, and I can not have 2 FTP connections to them open at the same time.

One other issue is how TCP/IP works. When a program (WatchDirectory, FileZilla...) closes a socket it uses, the operating system at both sides (Windows + Unix)
will keep these "closed" sockets open for quite a while (often about 2 minutes). I believe it is called the "linger period" or something like that.


(*) the data socket / The Passive or Active setting
The data socket is used to transfer the bytes of a file to the FTP server. If you configure a WatchDirectory upload task to use a "Passive connection", it is WatchDirectory's responsibility to open this data-socket to the FTP server: an outgoing connection (Windows -> Unix).
If you do not check the "Passive" option, it is called an Active connection. In this case the FTP server will open the data-socket: an incoming connection (Unix -> Windows).
Unless properly setup, firewalls often block incoming connections, so Active mode will not work.

Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #17 - Nov 4th, 2008 at 6:06am
 
sotic wrote on Nov 3rd, 2008 at 1:20pm:
Secondly some error with "CoInitialize has not been called" do you know what this is ?


oops, missed that.
Is this error happening when you run 87 tasks? You may very well be running into operating system limitations, I will need to check this.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
sotic
YaBB Newbies
*
Offline



Posts: 9
Re: FTP issues
Reply #18 - Nov 4th, 2008 at 8:25am
 
Thank you for your reply, however as stated i am ftping to 5 different servers thought two different firewalls.  It does not matter which set of jobs I run last they will not connect and just hang.  So the problem appears to either be a limit with 2003 or a limit with WD, hopefully just a setting change somewhere.

Thanks


Leo
Back to top
 
 
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #19 - Nov 4th, 2008 at 11:23pm
 
A followup to my earlier post.  Since moving to Win2000 Server WatchDirectory has worked flawlessly.  Under 2003, I had CONSTANT problems, where it would simply die in the middle of tasks, errors trying to terminate tasks, errors while FTPing.

Under Win2000, if I terminate a task it actually stops.  I received my first error message from an FTP task today, and even in that case it simply reconnected and continued sending the files.  The error was "Could not upload file, will reconnect and retry", and amazingly, it did exactly that.  Under 2003 if it stopped, that was the end and I had to either terminate the task (assuming the task would even respond) or reboot the server (my users were NOT happy).

Note that I'm running WD on a virtual server on the same machine and under the same 2003 it was running on before, so it's using exactly the same NIC and route as before, so that would seem to rule out hardware, both on my end and on the FTP server end.  There are typically 100-150 files that change every couple hours, and since the move (over a week now) when the files change, they show up on the FTP server.

Rick
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #20 - Nov 5th, 2008 at 8:58am
 
Hello Rick,

Nice it is working ok on Win2k. Did you try my (and Dirk's) suggestion on the "previous page" of this forum thread?

Basically (on Win2k3):
* toggle the "Passive" option
* enable "keep connection open as long as possible"

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
rickp
YaBB Newbies
*
Offline



Posts: 18
Re: FTP issues
Reply #21 - Nov 5th, 2008 at 1:13pm
 
Gert wrote on Nov 5th, 2008 at 8:58am:
Hello Rick,

Nice it is working ok on Win2k. Did you try my (and Dirk's) suggestion on the "previous page" of this forum thread?

Basically (on Win2k3):
* toggle the "Passive" option
* enable "keep connection open as long as possible"



I tried virtually every setting available to change.  Specifically, I did try both the passive and connection settings in all combinations with no improvement.  The problem was that it would work for a while no matter how it was set.  But with or without passive, with or without keeping the connection open, it would die.  It would typically run a couple days, just long enough for me to start thinking it was working.

As I also said, trying to terminate the task would fail more than not, and I'm not sure what that has to do with the connection type.  When I set it up under Win2k, I simply copied the settings directly from the 2003 server, which was to not keep the connection open and passive.  I did later change to keep the connection open, but it works with either of those settings under Win2k.

One final note - when I initially tested WD it was using Win2k.  It worked perfectly for the entire trial period.  The server was upgraded to 2003 right at the end of the trial period, right about the time we purchased WD.  Since it worked initially (it would work for 1-5 days no matter what we tried) we didn't associate the problems with the upgrade.

I can try changing a few things on the virtual server to see what affect some of the settings may do under Win2k, but after fighting all the problems for months, I'm not too inclined to make too many changes, as it is working now.

Rick

Back to top
 
 
IP Logged
 
sotic
YaBB Newbies
*
Offline



Posts: 9
Re: FTP issues
Reply #22 - Nov 5th, 2008 at 2:21pm
 
very similar story here it  does not matter if we turn on or off the noop settings or the passive or the keep alive, if we start up more than approx 80 ftp tasks they eventually l start locking up.

In the end we have written a simple batch job just to copy in a file to the directories so we can see what ones are locked up and need to be restarted (not ideal).

My guess is the server is running out of something (ports, sessions etc etc).

Regards


Leo
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #23 - Nov 6th, 2008 at 6:44am
 
Quote:
very similar story here


Leo, I think it is NOT a similar story.

The issue you describe is clearly caused by the number of tasks running, exhausting some O/S resources. If I understand Rick correctly, his issue also occurs when running only a few FTP tasks and only on Win200
3
.

Your best bet is to reduce the number of tasks (80 tasks is a lot!) or to spread them over multiple computers.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: FTP issues
Reply #24 - Nov 6th, 2008 at 6:53am
 
rickp wrote on Nov 5th, 2008 at 1:13pm:
... but after fighting all the problems for months, I'm not too inclined to make too many changes, as it is working now.


I understand completely. We will do further testing ourself to see if we can fix this issue. However, as stated earlier:

Quote:
Dirk (German support) is doing some tests on Windows 2003, and even FileZilla seems to misbehave if Passive mode is selected (some files upload fine, then it blocks with a timeout). This can obviously be caused by the specific settings (firewall, virus-scanner blocking ports) of this 2003 server, but thus far clearing the Passive option seems to work.


As FileZilla is showing the same problem, it certainly looks like it is an Operating-System issue. Can you try FileZilla on the 2003 server to see if it behaves correctly?
If you do this test, make sure it resembles how WD would upload files: allow only one upload at a time ("maximum number of connections" set to 1 on the "transfer settings").

I will ask Dirk again, I seem to remember his 2003 server was also an upgraded 2000 server. Perhaps this issue only manifests itself on upgraded servers.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1