› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › fileset-FTP losing messages
After I noticed this, I began saving the SMAT on the outbound connection and comparing that file on a daily basis to the file we are writing on the FTP server. I have discovered each day there are a few messages missing. I cannot see any rhyme or reason as to why these messages are missing. There are no FTP protocol errors that I can see around the times the messages are sent and they seem to be randomly spread throughout the day timewise.
Since there is no reply message coming back from the FTP server to acknowledge the receipt of the message, how do we know the message was received and written on the FTP server end? Has anyone experienced this type of problem?
Do you have a prewrite proc defined?
It takes an argument in the form of:
{NOTIFYLIST “
Change the email address and see if you get alerted during the day.
######################################################################
# Name: ftp_send_fail_argv
# Purpose:
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
# MODE run mode (”start”, “run” or “time”)
# MSGID message handle
# ARGS user-supplied arguments:
#
#
# Returns: tps disposition list:
#
#
proc ftp_send_fail_argv { args } {
keylget args MODE mode
keylget args ARGS.NOTIFYLIST notifylist
global HciSite HciConnName HciSiteDir
set procname [lindex [info level [info level]] 0]
set module “$HciSite/$HciConnName/$procname: ”
set dispList {}
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
keylget args MSGID mh
set fname [msgmetaget $mh DRIVERCTL]
exec echo [msgget $mh] | mail -s “$HciSite – FAILURE Report for file [keylget fname FILESET.OBFILE]” $notifylist
lappend dispList “CONTINUE $mh”
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
default {
error “$module Unknown mode ‘$mode'”
}
}
return $dispList
}
[/img]
I guess my question now is when using protocol fileset-FTP, since no ACK messages comes back from a recieving application, how does the engine know if the message was successfully written on the other end?
I’d put this proc in for your Send Succeed proc
and then compare the process log to both the smat file and output file.
You’ll probably need to up your process log size.
If you don’t need to see the full message, I’d change the proc to something like:
echo $module Sucessful Send: [crange [msgget $mh] 0 200]
or
echo $module Sucessful Send: [lindex [split [msgget $mh] r] 0]
If that doesn’t help, the next thing I would suggest is creating an EO config to enable fset.
Good luck!
-mh
######################################################################
# Name: ftp_send_succeed
# Purpose:
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
# MODE run mode (”start”, “run” or “time”)
# MSGID message handle
# ARGS user-supplied arguments:
#
#
# Returns: tps disposition list:
#
#
proc ftp_send_succeed { args } {
keylget args MODE mode
global HciSite HciConnName HciSiteDir
set procname [lindex [info level [info level]] 0]
set module “$HciSite/$HciConnName/$procname: ”
set dispList {}
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
keylget args MSGID mh
echo $module Sucessful Send: [msgget $mh]
lappend dispList “CONTINUE $mh”
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
default {
error “$module Unknown mode ‘$mode'”
}
}
return $dispList
}
Did you get this resolved?
1. put the file in a folder called in_dir in the ftp server.
2. have a cronjob run and move the file to a directory name dir2.
3. receiving system will get the file from the dir2
I have not seen any messages being lost.
Hope this Helps.
-Reggie
Attached is a neutered process log showing a message as it goes through the outbound thread. The portion you are interested in is really at the bottom.
You’ll see it receives a response from the FTP server that says (in my case) 226 Transfer complete.
I believe that is the answer to your question because it then invokes the send ok procs.
You can also create a custom eo config that includes only fset and pd which should give you enough information to track further.
I’m very interested in your results because I can’t believe that Cloverleaf would loose a message. I’m sure I haven’t lost any.
Let me know what you find,
-mh
What kind of FTP server are you talking to?
The next step I would suggest is to leave the last proc in send ok.
Create a new eo alias for fset/control/debug/1 only.
Enable that eo alias and see what response you are getting for each missing message from that server.
One last thing, the file that you are looking at from the other host;
is that a virgin file or has it been processed by some program by the time you look at it?
-mh
The file is still a virgin when I look at it 🙂
Jim
Results: Each day the file that was being written to the FTP server a record at a time lost some data while the file written on the engine and then FTP’d all at once, never lost data.
The FTP server software on the FTP side is just what came with MS 2000 lite (must I say more?). Moral of the story is to save our data on the engine and then FTP the entire file with a CRON if you want it all to get there.
Thanks for everyone’s help.
Jim