Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cannot detach temp files on the server

Posted on 2001-07-31
14
Medium Priority
?
881 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 400 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

670 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