System Tasks - reports run, processes don't

It seems that my BPM error is a false positive. I’m finding that I can run reports, but scheduled processes do not run. Here is the error message from Event Viewer on the AppServer for Process MRP. We have no custom BPMs attached to the MRP process. Fortunately this is happening in our development system only, but we have to insure that it’s not in custom code so it does expand to the testing and production environments. If anyone could provide guidance, I would be grateful. Here is the error text:

bb

EpicorERP: An error occurred trying to run task ID 482458 for agent SystemTaskAgent on the application server (User: Bryan Bussey, Task Description: Process MRP).
Error Detail:
Business Logic Error
Business Layer Exception
BLException
Description: SysTask record was not found
Program: Ice.Services.Lib.RunTask.dll
Method: SetTaskStatus
Line Number: 691
Column Number: 29
Server Trace Stack: at Ice.Services.Lib.RunTaskSvc.SetTaskStatus(String status, Int64 taskNumber) in c:_Releases\ICE\3.1.600.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 691
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in c:_Releases\ICE\3.1.600.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 337
at Ice.Services.Lib.RunTaskSvcFacade.RunTask(Int64 ipTaskNum) in c:_Releases\ICE\3.1.600.0\Source\Server\Services\Lib\RunTask\RunTaskSvcFacade.cs:line 87
at SyncInvokeRunTask(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func’2 func) in C:_Releases\ICE\3.1.600.20\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func’2 func) in C:_Releases\ICE\3.1.600.20\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:_Releases\ICE\3.1.600.20\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SecurityChannelListener’1.ReceiveItemAndVerifySecurityAsyncResult’2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

This is certainly a problem. Not that I’ve seen this before, but I would go in to the System Agent and delete the MRP job task and recreate/resubmit it and see what happens. I’ve had a similar problem after upgrading where the reports will run but the job will not process, and we just had to forcibly restart the SysAgentTask on the server (not just use the GUI to stop/start the agent but actually stop/start the service at the OS level)

Mike,

I will try that. We’ve already deleted and recreated the task agent service, but we haven’t tried to stir the service from Windows Services. I will try that as well. It’s happening on all process tasks, but I know that our MRP task has no BPMs so it is straight Epicor.

No luck. Tried to stop the ICE Task Agent in Windows Services but it hung. Rebooted the server, then submitted a new test task to a process. Still got the error.

EpicorERP: An error occurred trying to run task ID 482506 for agent SystemTaskAgent on the application server (User: Bryan Bussey, Task Description: Sample plugin).
Error Detail:
Business Logic Error
Business Layer Exception
BLException
Description: SysTask record was not found
Program: Ice.Services.Lib.RunTask.dll
Method: SetTaskStatus
Line Number: 691
Column Number: 29
Server Trace Stack: at Ice.Services.Lib.RunTaskSvc.SetTaskStatus(String status, Int64 taskNumber) in c:_Releases\ICE\3.1.600.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 691
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in c:_Releases\ICE\3.1.600.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 337
at Ice.Services.Lib.RunTaskSvcFacade.RunTask(Int64 ipTaskNum) in c:_Releases\ICE\3.1.600.0\Source\Server\Services\Lib\RunTask\RunTaskSvcFacade.cs:line 87
at SyncInvokeRunTask(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func’2 func) in C:_Releases\ICE\3.1.600.20\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func’2 func) in C:_Releases\ICE\3.1.600.20\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:_Releases\ICE\3.1.600.20\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.Message

ok… you say ‘all tasks’ have this problem but not reports. I would say perhaps that you need to delete and recreate the task for MRP to make sure the systask record exists properly.

But I also realized that you need to make sure the username than the Task Agent connects to the appserver with has the ‘impersonate’ checkbox check in User Account maintenance.

1 Like

It’s not just specific to MRP, I just used that as the example because it has no BPMs attached.

Tried a new process, still get the error. Verified that the Task Agent user account has the impersonate checkbox checked.

Found the problem. The database was refreshed from a production database and the task agent rules were pointing to the production app servers. Deleted these records and the background processes started working again.

1 Like

Glad you figured it out!

1 Like

Had me scratching my head for a while too. You saved me a bit of time. Thanks.