Troubleshoot : Sync stopped after upgrade on-premise agent tool
Have you installed a new version of OP Agent in your system by upgrading your old version ? If you just did an update and you see all your data sync is not working properly, there might be a situation that the databases are not patched correctly.
The first thing that is recommended to execute before running a sync operation is to run our Migration tool. If you haven’t executed it, please do execute before working on it.
Scenarios
There are a number of scenario which might indicate this error. Let us consider the scenarios one by one.
Scenario 1
You started the auto-sync and executed it overnight. The very next day you notice, you haven’t received a Morning Sync summary report, even though you were receiving it before migrating the agent. While investigating the case, you tried to look into the logs generated during the time period you receive the report. Finally, you notice something like the one below:
Reason is System.AggregateException: One or more errors occurred. —> System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at InSync.eConnect.Core.Helper.EmailNotifier.<SendReport>d__2.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at InSync.eConnect.AutoRunner.Jobs.MorningReportJob.SendEmailNotification(IJobExecutionContext context)
at InSync.eConnect.AutoRunner.Jobs.MorningReportJob.Execute(IJobExecutionContext context)
—> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at InSync.eConnect.Core.Helper.EmailNotifier.<SendReport>d__2.MoveNext()<—VGVjaG5pY2FsIEluZm8gOiBbRXhlY3V0ZSAtIDEwMCAtIE1vcm5pbmdSZXBvcnRKb2Jd
This kind of error indicates that there is some issue with the morning report generation and it might sometimes occur due to database patching incomplete. You need to execute the migration tool which can be found inside the application installation directory to fix this issue.
Scenario 2
Another scenario might be, you see an error “Object reference not set to an instance of an object” during login.
There could be 100 reasons for this kind of scenario, but one of the reason could be this too.
Scenario 3
Another scenario could be you see an SQL Exception happening in the logs and your sync operation is stopped after upgrading the agent. The error you see is similar to the one below:
For Query : Select TransactionId, SourceId, DestinationId, TransactionTS, CreatedAtTs, Actualmessage, Additionaljson, TrackData, Processnow, Tries, Status, WorkflowId, TransactionGuid, WorkFlowEngineId From [347162ec-bc7a-4db6-a90b-e03e3915e7ad] WHERE SourceId IN () ORDER BY TransactionTS DESC ~ error is :code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error or missing database no such column: CreatedAtTs at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) at System.Data.SQLite.SQLiteCommand.BuildNextCommand() at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index) at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at InSync.eConnect.APPSeCONNECT.Storage.SQLFactory.<ExecuteTableAsync>d__22.MoveNext() ~ ConnectionString is : Data Source=C:\ProgramData\APPSeCONNECT\con_3751c213ce3646e1a04d078f72a04422.db;Version=3;DateTimeFormat=CurrentCulture; For Query : Select TransactionId, SourceId, DestinationId, TransactionTS, CreatedAtTs, Actualmessage, Additionaljson, TrackData, Processnow, Tries, Status, WorkflowId, TransactionGuid, WorkFlowEngineId From [347162ec-bc7a-4db6-a90b-e03e3915e7ad] WHERE SourceId IN () ORDER BY TransactionTS DESC ~ error is :code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error or missing database no such column: CreatedAtTs at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) at System.Data.SQLite.SQLiteCommand.BuildNextCommand() at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index) at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at InSync.eConnect.APPSeCONNECT.Storage.SQLFactory.<ExecuteTableAsync>d__22.MoveNext() ~ ConnectionString is : Data Source=C:\ProgramData\APPSeCONNECT\con_3751c213ce3646e1a04d078f72a04422.db;Version=3;DateTimeFormat=CurrentCulture; VGVjaG5pY2FsIEluZm8gOiBbR2V0TWVzc2FnZSAtIDE2NiAtIExvZ2dlcl0=
Why this happens?
When you upgrade an Agent, we ensure all your data which were present in your local databases are kept intact such that the sync settings could be automatically merged with the new agent. But as you know upgrade means new code, which might have some dependencies on these data schemas, and patching of these schemas are required to fix them. With the installer, we do not touch any data in your database for security reason, and we want you to execute the migration tool yourself after backing up the databases correctly.
Conclusion
You should have a common practice to execute the Migration tool correctly before executing any sync operation such that these kind of errors never be encountered on your environment.
Hope this will help.
Leave a reply