Solved

Cannot detach temp files on the server

Posted on 2001-07-31
14
868 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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