Solved

Cannot detach temp files on the server

Posted on 2001-07-31
14
877 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
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…

615 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