Recently we had production machines operating system patched. After the patching, we had a production deployment of new code. When the AOS were brought back up, some of the application processes started throwing errors. These included AIF/workflow batch jobs, printing of some reports etc. The error message was as follows
Infolog for job AIF (5641187121)
Infolog for task AifInboundProcessingService (5651730951)
Cannot read a record in AifResponse (AifResponse).
The corresponding AOS validation failed.
AifInboundProcessingService-run
Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)
at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.DeleteAll(IntPtr table)
at Dynamics.Ax.Application.AifResponse.deleteExpiredResponses() in AifResponse.deleteExpiredResponses.xpp:line 7
at Dynamics.Ax.Application.AifInboundProcessingService.Run() in AifInboundProcessingService.run.xpp:line 35
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)
Infolog for task AifGatewayReceiveService (5651730959)
Cannot create a record in Gateway queue (AifGatewayQueue).
The corresponding AOS validation failed.
Cannot create a record in Gateway queue (AifGatewayQueue).
The corresponding AOS validation failed.
Cannot create a record in Gateway queue (AifGatewayQueue).
The corresponding AOS validation failed.
Cannot create a record in Gateway queue (AifGatewayQueue).
The corresponding AOS validation failed.
Cannot create a record in Gateway queue (AifGatewayQueue).
The corresponding AOS validation failed.
Infolog for job Workflow message processing (5641359370)
Infolog for task Workflow message processing task (5652234909)
User 'BatchUser' is not authorized to update a record in table 'SYSWORKFLOWTABLE'. Request denied.
Cannot edit a record in SysWorkflowTable (SysWorkflowTable).
Access Denied: You do not have sufficient authorization to modify data in database.
User 'BatchUser' is not authorized to update a record in table 'SYSWORKFLOWTABLE'. Request denied.
Cannot edit a record in SysWorkflowTable (SysWorkflowTable).
Access Denied: You do not have sufficient authorization to modify data in database.
SysWorkflowQueue-activate
SysWorkflow-lock
SysWorkflow-fault
SysWorkflow-internalFault
SysWorkflow-faultWorkflowInstance
Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)
at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.update(IntPtr table)
at Dynamics.Ax.Application.SysWorkflow.faultWorkflowInstance(SysWorkflowTable _workflowTable, String _user, String _faultMessage) in SysWorkflow.faultWorkflowInstance.xpp:line 66
at Dynamics.Ax.Application.SysWorkflow.internalFault(WorkflowContext _workflowContext, String _user, String _faultMessage) in SysWorkflow.internalFault.xpp:line 56
at Dynamics.Ax.Application.SysWorkflow.fault(WorkflowContext _workflowContext, String _user, String _faultMessage) in SysWorkflow.fault.xpp:line 32
at Dynamics.Ax.Application.SysWorkflowQueue.dispatch(Guid _affinity) in SysWorkflowQueue.dispatch.xpp:line 185
at Dynamics.Ax.Application.SysWorkflowQueueTask.Run() in SysWorkflowQueueTask.run.xpp:line 13
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)
The error message showed that user does not have access to the tables. However even granting System Administrator was not fixing the issue. The only workaround we could find was to deactivate an AIF port. This somehow fixed the issue.
We opened a case with Microsoft and solution provided by MS engineer was to make sure that the SID in the following registry key was that of the account running AOS service. In our case the SID was that of the user who installed the AOS on these machines.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dynamics\6.0\Setup\Dynamics
Server\setupuser
After changing the registry key on all AOS (while the AOS service was not running), the error disappeared. Please take a backup before modifying registry.
This posting is provided "AS IS" with no warranties. Use code at your own risk.