Monday 28 September 2009

Unsupported trigger on agent after server upgrade to R8.5

For ages we have had agents running called by one central scheduled agent, the "daily scheduled agent launcher" as we call it.
The trigger of these called agents is set to "On event - Agent List selection" and the target is set to "None".
The code used to call the agents from within the "daily scheduled agent launcher" is:
Set agent = db.GetAgent(AgentName)
Call agent.run()


After migrating the server that runs the agents to R8.5, we discovered that one agent in particular was no longer running and produced the "Unsupported trigger and search in background agent" error. In the past we had come across such problems before, where doing the application/server housekeeping like compact & fixup used to help and make the problem go away. But not this time.

Searching the Lotus Developer Domain made me find a response by Julie Kadashevich to look at a troubleshooting agents document in the developer domain. This document gives some clue to the target of the agent being wrong.
This should be set to "None" or "All documents in application (database)" for agents of this event. Which technically means the agent should run as we had set it to "None".
The first attempt to make it run again was resaving the agent. But that still did not make it run. So we changed the target to "All documents in app" and suprise, the agent runs again.
Appearantly "None" is also not a good target for "Agent list" agents.

Any ideas ?

4 comments:

Edwin said...

Hi Tom

I don't think 'None' doesnot works for 'Agent list selection'. Because I can create one based on this setting and it works very well.
When and under which condition you call this agent?

Edwin

Tom Steenbergen said...

Hi Edwin,
The agent is called from another agent that runs scheduled once a day.

The code used to call this agent is:
Set agent = db.GetAgent(AgentName)
Call agent.run()

The same error also appears when running the agent from the server console.

- Tom -

Kevin Pettitt said...

Try renaming the old agent, then creating a brand new agent design element with the same name. Add the appropriate agent settings manually, then copying in all the code from the existing one, section by section starting with Options, then Declarations, then lower level subroutines/functions until you eventually get to Initialize (assuming of course this is even an LS agent).

If it's truly just some fluky thing not related to the agent code, settings, or signer privileges, this might fix it.

Unknown said...

We had a similar problem and found that we had two agents in the DB with the same alias -- one (the one that we thought we were trying to run) was in parentheses and the other (a test agent that someone had created by copying the original) without parentheses. We fixed the problem by removing the alias from the test agent and removing the parentheses from the real agent's alias.