 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Sherrol McCutcheon
Joined: 12 Nov 2002 Posts: 3
|
|
Error writing to temp file when using MailSend |
|
Has anyone seen the following error message when using the MailSendWithAttachment command "Error writing to temporary file c:\docume~1\smccutch~1\locals~1\Temp\247F.tmp" Here is the sample script I'm using, nothing fancy. It works fine on my windows 98 machine, but keeps giving me the error above on my Windows 2000 machine. I have tried 2 versions of 24x7 (2.4.7 and the demo version of 3.3.8) with the same outcome. Any ideas would be much appreciated. Dim exists boolean //Change directory to C:\SHERROL CD c:\SHERROL //Check if file exists FileExists mpi.txt, exists //IF file exists notify mgd If (exists, NOTIFY, END) NOTIFY: MailSendWithAttachment("is.test", "******", "is.spm@stmmc.org", "test mailing", "hopefully the file is attached", "mpi.txt") END:
|
|
Tue Nov 12, 2002 12:38 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7966
|
|
Re: Error writing to temp file when using MailSend |
|
Check if you have sufficient disk space. Looks like you are using SMTP email interface. When sending attachments, 24x7 creates temporary files so it can encode the attachment(s). Make sure you have at least twice the space taking by "mpi.txt" file. Also, the temporary file name looks suspicious to me. Usually the name is like 247XXXX.tmp. Please clean up your temp directory "c:\docume~1\smccutch~1\locals~1\Temp" and then run check disk utility to verify disk and file consistency. : Has anyone seen the following error : message when using the MailSendWithAttachment command : "Error writing to temporary file : c:\docume~1\smccutch~1\locals~1\Temp\247F.tmp" : Here is the sample script I'm using, nothing fancy. It works fine : on my windows 98 machine, but keeps giving me the error : above on my Windows 2000 machine. I have tried 2 versions : of 24x7 (2.4.7 and the demo version of 3.3.8) with the same outcome. : Any ideas would be much appreciated. : Dim exists boolean : //Change directory to C:\SHERROL : CD c:\SHERROL : //Check if file exists : FileExists mpi.txt, exists : //IF file exists notify mgd : If (exists, NOTIFY, END) : NOTIFY: MailSendWithAttachment("is.test", "******", : "is.spm@stmmc.org", "test mailing", "hopefully : the file is attached", "mpi.txt") : END:
|
|
Tue Nov 12, 2002 12:57 pm |
|
 |
Sherrol McCutcheon
Joined: 12 Nov 2002 Posts: 3
|
|
Re: Error writing to temp file when using MailSend |
|
I have over 7 G for disk space and administrator access to everything. The file I am mailing is 51K. I too think the error message looks strange?? I ran scan disk and everything looked ok. If I go to the directory listed in the error message, I can create files with no problem, any other suggestions? : Check if you have sufficient disk space. : Looks like you are using SMTP email interface. When sending attachments, 24x7 : creates temporary files so it can encode the attachment(s). Make sure you : have at least twice the space taking by "mpi.txt" file. : Also, the temporary file name looks suspicious to me. Usually the name is : like 247XXXX.tmp. Please clean up your temp directory : "c:\docume~1\smccutch~1\locals~1\Temp" and then run check disk : utility to verify disk and file consistency.
|
|
Tue Nov 12, 2002 3:52 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7966
|
|
Re: Error writing to temp file when using MailSend |
|
The error indicates that 24x7 was able to open the file for writing, however open the file for writing but failed to write to the file. This case if very rare and may be caused by the following reasons: 1. Not enough disk space, or at lreas the file system "thinks" it has not free space on device. 2. The specified atatchment file is locked by some process and 24x7 cannot properly read it. I noticed one thing in your script, you have specified name of file to be atatched without the path. May be you have several files with this name and 24x7 finds some other file or perhaps cannot file the file at all. Try either copying the file into 24x7 home directory or specifying the full file name. In the last case don't forget about "Special ASCII characters" like \t. : I have over 7 G for disk space and administrator access to everything. The : file I am mailing is 51K. I too think the error message looks strange?? : I ran scan disk and everything looked ok. If I go to the directory listed in : the error message, I can create files with no problem, any other : suggestions?
|
|
Tue Nov 12, 2002 4:26 pm |
|
 |
Sherrol McCutcheon
Joined: 12 Nov 2002 Posts: 3
|
|
Re: Error writing to temp file when using MailSend |
|
Thanx so much, both of the suggestions provided worked. I was under the impression, if I moved to the directory that contained the file to be mailed in my script, then that's where it is looking for the attachment file specified in the MailSendWithAttachment. At least that's how it worked with Windows 98, Now I know better. Thanx for all your support. Sherrol : The error indicates that 24x7 was able to open the file for writing, however : open the file for writing but failed to write to the file. This case if : very rare and may be caused by the following reasons: 1. Not enough disk : space, or at lreas the file system "thinks" it has not free : space on device. : 2. The specified atatchment file is locked by some process and 24x7 cannot : properly read it. : I noticed one thing in your script, you have specified name of file to be : atatched without the path. May be you have several files with this name : and 24x7 finds some other file or perhaps cannot file the file at all. : Try either copying the file into 24x7 home directory or specifying the full : file name. In the last case don't forget about "Special ASCII : characters" like \t.
|
|
Wed Nov 13, 2002 11:13 am |
|
 |
Jim Maxwell
Joined: 12 Feb 2004 Posts: 73
|
|
Re: Error writing to temp file when using MailSend |
|
Hi, I'm getting tis error as well - "Error writting to temporary file C:\WINNT\247BB.tmp" How do I ensure my jobs use a "proper"/alternative temporary directory ? Also the file exists but I cannot access it until I shut down 24x7 and then I can open it - but it's empty ? JIm : Has anyone seen the following error : message when using the MailSendWithAttachment command : "Error writing to temporary file : c:\docume~1\smccutch~1\locals~1\Temp\247F.tmp" : Here is the sample script I'm using, nothing fancy. It works fine : on my windows 98 machine, but keeps giving me the error : above on my Windows 2000 machine. I have tried 2 versions : of 24x7 (2.4.7 and the demo version of 3.3.8) with the same outcome. : Any ideas would be much appreciated. : Dim exists boolean : //Change directory to C:\SHERROL : CD c:\SHERROL : //Check if file exists : FileExists mpi.txt, exists : //IF file exists notify mgd : If (exists, NOTIFY, END) : NOTIFY: MailSendWithAttachment("is.test", "******", : "is.spm@stmmc.org", "test mailing", "hopefully : the file is attached", "mpi.txt") : END:
|
|
Fri Feb 18, 2005 1:35 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7966
|
|
Re: Error writing to temp file when using MailSend |
|
The other problem was caused by attempts to send SMTP email messages without message text. Are you getting this error while sending emails? If not please find out when this is happening so I can point to the cause. : Hi, : I'm getting tis error as well - : "Error writting to temporary file C:\WINNT\247BB.tmp" : How do I ensure my jobs use a "proper"/alternative temporary : directory ? : Also the file exists but I cannot access it until I shut down 24x7 and then : I can open it - but it's empty ? : JIm
|
|
Fri Feb 18, 2005 2:02 pm |
|
 |
Jim Maxwell
Joined: 12 Feb 2004 Posts: 73
|
|
Re: Error writing to temp file when using MailSend |
|
Error occcurs on followingline :- MailSend( "SYSBDC 24x7 Job Scheduler", "", "jim.maxwell@british-energy.com", & "V: Drive Master KPI Data Successfully Backed Up", LastError ) And yes I am using SMTP email but I have tesetd this syntax in Isolation using the following code fragment and it works O.K. in interactive mode : ##################################################### Start: // Dim LastError, string Set ( Lasterror, "Status OK" ) // MailSend( "", "", "jim.maxwell@british-energy.com", & "Test of Mailsend JAL Command :", LastError ) Exit Finish: ################################################ Any Ideas ? : The other problem was caused by attempts to send SMTP email messages without : message text. : Are you getting this error while sending emails? If not please find out when : this is happening so I can point to the cause.
|
|
Fri Feb 18, 2005 2:14 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7966
|
|
Re: Error writing to temp file when using MailSend |
|
I just copied and run your script without errors. Did you get my message? I bet if you run it not from service then everything would be fine. MailSend looks for the default temp directory as specified in the %TEMP% environment variable. If there is no such variable then it attempts to create a temp file in the current directory. For Windows services current directory is C:\WINNT, not where the service is started. To control the temp location either create a system level or service account level %TEMP% variable and then restart the service. : Error occcurs on followingline :- : MailSend( "SYSBDC 24x7 Job Scheduler", "", : "jim.maxwell@british-energy.com", & : "V: Drive Master KPI Data Successfully Backed Up", LastError ) : And yes I am using SMTP email but I have tesetd this syntax in Isolation : using the following code fragment and it works O.K. in interactive mode : : ##################################################### : Start: // : Dim LastError, string : Set ( Lasterror, "Status OK" ) : // : MailSend( "", "", : "jim.maxwell@british-energy.com", & : "Test of Mailsend JAL Command :", LastError ) : Exit : Finish: ################################################ : Any Ideas ?
|
|
Fri Feb 18, 2005 2:33 pm |
|
 |
Jim Maxwell
Joined: 12 Feb 2004 Posts: 73
|
|
Re: Error writing to temp file when using MailSend |
|
Hi - don't know if I got your message (yet) I'm not at work anymore - gone home :) (UK Time) Will check on monday - unless you can try again with jim.maxwell@tiscali.co.uk ? Do you think that my setting up a %TEMP% location I will be able to run from service O.K. ? Jim : I just copied and run your script without errors. Did you get my message? : I bet if you run it not from service then everything would be fine. : MailSend looks for the default temp directory as specified in the %TEMP% : environment variable. If there is no such variable then it attempts to : create a temp file in the current directory. For Windows services current : directory is C:\WINNT, not where the service is started. : To control the temp location either create a system level or service account : level %TEMP% variable and then restart the service.
|
|
Fri Feb 18, 2005 7:48 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7966
|
|
Re: Error writing to temp file when using MailSend |
|
Not sure if the problem is caused by the temp path location. If the referenced file is created then temp path is not a problem. You still may want to use temp dir for temp files rather then system dir. Check if the created file is zero size. If it is then the problem is in the message text. I believe more recent versions don't mind when the size is zero. Older version fail with "Cannot create temp file" errors. : Hi - don't know if I got your message (yet) I'm not at work anymore - gone : home :) (UK Time) : Will check on monday - unless you can try again with : jim.maxwell@tiscali.co.uk ? : Do you think that my setting up a %TEMP% location I will be able to run from : service O.K. ? : Jim
|
|
Fri Feb 18, 2005 8:22 pm |
|
 |
Jim Maxwell
Joined: 12 Feb 2004 Posts: 73
|
|
Re: Error writing to temp file when using MailSend |
|
Aha ! I'm using the output from LastError as the meassage text parameter !!! so if no errors then it should be a NULL string value. Looks like I need to upgrade (not very likely at present) or modify my script to concat. a non-blank ASCII string to the value ? Jim : Not sure if the problem is caused by the temp path location. If the : referenced file is created then temp path is not a problem. You still may : want to use temp dir for temp files rather then system dir. Check if the : created file is zero size. If it is then the problem is in the message : text. I believe more recent versions don't mind when the size is zero. : Older version fail with "Cannot create temp file" errors.
|
|
Fri Feb 18, 2005 8:34 pm |
|
 |
Jim Maxwell
Joined: 12 Feb 2004 Posts: 73
|
|
Re: Error writing to temp file when using MailSend |
|
Hi Again - forgot to ask on my previous response - why should it work interactively but not as a service if it's a "null string" issue ? Jim : Not sure if the problem is caused by the temp path location. If the : referenced file is created then temp path is not a problem. You still may : want to use temp dir for temp files rather then system dir. Check if the : created file is zero size. If it is then the problem is in the message : text. I believe more recent versions don't mind when the size is zero. : Older version fail with "Cannot create temp file" errors.
|
|
Fri Feb 18, 2005 8:36 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7966
|
|
Re: Error writing to temp file when using MailSend |
|
It shouldn't matter if it runs as service or interactive. Try sending some hardcoded string as a message text to see if it works ok. : Hi Again - forgot to ask on my previous response - why should it work : interactively but not as a service if it's a "null string" issue : ? : Jim
|
|
Fri Feb 18, 2005 8:47 pm |
|
 |
|
|
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 vote in polls in this forum
|
|
|