Solved

Cannot detach temp files on the server

Posted on 2001-07-31
14
872 Views
Last Modified: 2013-12-18
I have an agent that detaches files in a temporary directory (using Environ("Temp")). The problem is that the agent runs fine locally when called manually, but does not run when scheduled to run on the server. I have done a lot of testing, and the agent starts but the detach part fails.

Could this be an Operating System (Win NT) related problem?

Any ideas? Please help.

Thanks.
0
Comment
Question by:cyberzork
  • 4
  • 4
  • 3
  • +2
14 Comments
 
LVL 10

Expert Comment

by:zvonko
ID: 6337025
put into your agent, before detach, some monito lines; like this:

TempDir = Environ("Temp")
msgbox "actual TempDir: " & TempDir

(msgbox produce simply console print line ;-)

Your detach path has to have be absolute and not relative. You can not assume notes\data as working directory.

By the way, I am dooing detaching of distribution files on S/390 without OS problems. So it should be not an OS problem on NT ;-)

Good luck,
zvonko
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6337029
perhaps is a good idea for you to place this parameters into notes.ini and lookup them with:
GetEnvironmentString/SetEnvironmentString

Look into NotesDesignerHelp for examples...
0
 
LVL 4

Expert Comment

by:martijnmulder
ID: 6337043
check whether you have used any UI object variables(e.g. NotesUIWorkspace, NotesUIDocument ? If so remove them, a scheduled agent will not run with them included...
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 4

Expert Comment

by:martijnmulder
ID: 6337049
also check whether you have rights to run unrestricted agents on the server...
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6337610
Does the directory (please test as zvonko suggested) exist on the server?

If not, make sure you either create it, or change the environment var. to a dir. that does exist!

Running the code on the server would mean that you retrieve the environment var from the server's notes.ini and that the specified dir. should be available on the server....
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6337620
...and if you decide to create a dir (like dirA\dirB\dirC), make sure you create dirA first (if nesseccary), then create dirB (if nesseccary), then create dirC (if nesseccary)
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6337636
Make sure you have sufficient privileges to!
Your agent (the signer) needs "unrestriced access"!
0
 

Author Comment

by:cyberzork
ID: 6337680
I followed zvonko's instructions and set up the agent to write some monitoring info right before and after the detach statement:

  Call AgentLog.LogAction("before " & TempFilePath)
  Call obj.ExtractFile(TempFilePath)
  Call AgentLog.LogAction("after " & TempFilePath)

Guess what. Only the "before" line is printed:

  "before D:\TEMP\temp_uf.aaa"

And yes, the server document indicates that I have unrestricted access to run agents, but can I confirm that?

Please help!
0
 

Author Comment

by:cyberzork
ID: 6338038
I have been looking for a solution at the wrong place. The error message returned from the server is:

(4005) Notes error: You must supply the bulk decryption key in order to extract this file object. (D:\TEMP\temp.aaa)

Some fields in the document are encrypted, but the ones that contain the attachments are not. Now I really have now idea what to do!
0
 
LVL 4

Expert Comment

by:sloeber
ID: 6339417
May be a little remark.
I've got the same problem.
In my code I used also a temporary directory.
Like c:\Test
When I run it manually everything was fine, but when I run it on the server it wouldn't work.

The reason was that if you run the agent from the server he's looking to the servers C drive and not into your local/personnel machine.
So, verfiy this and check also, if you've enough access rights to the servers harddisks.

Greets,
Sloeber
0
 
LVL 10

Accepted Solution

by:
zvonko earned 100 total points
ID: 6342416
look here:
http://support.lotus.com/sims2.nsf/802ee480bdd32d0b852566fa005acf8d/2a835671324c11e385256655004fe04a?OpenDocument
http://support.lotus.com/sims2.nsf/802ee480bdd32d0b852566fa005acf8d/42c21a4b8c7871b485256a1b0051bc19?OpenDocument

Reading above articles it seams there is no workaround for you,
but try this:
In NotesClinet open document property dialog.
In the tab with the key is the bottom field with publick encryption keys.
If there is enything in, than open the content dialog for this field by pressing the blue person icon.
Remove all entries

Additionaly look in LotusDesigner for the form definition.
If in the form enywhere is a field named "SecretEncryptionKey", then remove it.

The only database I have tested with encryption was userreg.nsf  which is invisible on your client there.
I created a wonderfull application on the server in spite the info was telling not to do so.
And there I had to fight with this encryption...

So above proposals are not from my experiance but only my assumptions ;-))

Good luck,
zvonko
0
 

Author Comment

by:cyberzork
ID: 6352794
thanks zvonko
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6376357
Hello cyberzork,

thanks for the points <|;-)
but can you please state wath your final solution was (deleting some vars/items, resaving or wath?).

Thanks anyway.

Regards,
zvonko
0
 

Author Comment

by:cyberzork
ID: 6376875
I decrypted my documents, and for the attachments that could not be detached we decided to re-attach them manually from the old documents into the new ones. We only had about 180 attachments, and I didn't have the strength or time to deal with this any longer.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question