alteredego86
alteredego86

Reputation: 21

Lotus Notes Scheduled agent failed to open database in different server

I have a database in server 1 which refers to multiple databases in server 2 for record validation purposes. When the scheduled agent runs, it encounters an "Object Variable not set" error. However, when I tried to manually run the agent (Right click agent name, click Run) it runs smoothly without error.

I simulated the database setup in 2 virtual servers and was able to reproduce the error. Line by line debugging shows that the error occurred when it tries to open the database in the other server. Since manual run works smoothly, I do not think the code or variables (server & database path) is wrong.

I've check the ACL for all databases to include the signer and server, also tried to schedule run the agent in all 3 security modes (Restricted, Unrestricted and Restricted with Admin Right). I've looked into the server document and security and allowed access to and from both servers. Anything else that I may have missed?

Upvotes: 2

Views: 4355

Answers (1)

Richard Schwartz
Richard Schwartz

Reputation: 14628

Let's call the server where the agent runs "server1", and the server where the database is stored "server2". The problem is that the agent is running under the identity of the user that signed it, and server1 has verified that signature, but server2 has not. Server2 needs to know the signature so that it can enforce the ACL on the database, so server2 must get the signature information from server1. But server1 could theoretically lie to server2, so by default server2 does not trust signature information from server1.

Fortunately, there is a way to tell server2 to trust the signatures on agents that are running on server1. In the Server Document for server2 in the Domino Directory on server2, go to the Security tab, and find the field labeled "Trusted Servers". Enter server1's fully qualified name in this field, and restart server2. (I'm not sure if the restart is really needed.)

That should allow your agent on server1 to read databases on server2.

Upvotes: 7

Related Questions