docintelapp / DocIntel

Open Source Platform for storing, organizing, and searching documents related to cyber threats
https://docintel.org
Other
154 stars 24 forks source link

Cannot subtract infinite timestamps while indexing tags #80

Closed ancailliau closed 1 year ago

ancailliau commented 1 year ago
Npgsql.PostgresException (0x80004005): 22008: cannot subtract infinite timestamps
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|234_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.Read(Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlDataReader.Read()
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
  Exception data:
    Severity: ERROR
    SqlState: 22008
    MessageText: cannot subtract infinite timestamps
    File: timestamp.c
    Line: 2687
    Routine: timestamp_mi
Unhandled exception. Npgsql.PostgresException (0x80004005): 22008: cannot subtract infinite timestamps
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|234_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.Read(Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlDataReader.Read()
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at DocIntel.Core.Repositories.EFCore.TagEFRepository.GetAllAsync(AmbientContext ambientContext, Func`2 query)+MoveNext() in /src/DocIntel.Core/Repositories/EFCore/TagEFRepository.cs:line 289
   at DocIntel.Core.Repositories.EFCore.TagEFRepository.GetAllAsync(AmbientContext ambientContext, Func`2 query)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
   at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
   at DocIntel.Services.TagIndexer.TagIndexerTimedConsumer.DoWork(Object state) in /src/DocIntel.Services.TagIndexer/TagIndexerTimedConsumer.cs:line 90
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
  Exception data:
    Severity: ERROR
    SqlState: 22008
    MessageText: cannot subtract infinite timestamps
    File: timestamp.c
    Line: 2687
    Routine: timestamp_mi
ancailliau commented 1 year ago

Should be fixed. If you still encounter the issue, you should re-index your tags after upgrading to the latest version

docker exec -it docintel-webapp /cli/DocIntel.AdminConsole index tags