Skip to content

Failed incremental indexing with errors in Logs #538

@techana

Description

@techana

Device Information

  • OS: Debian 12.7
  • Deployment: Linux v6.14.5
  • SIST2 Version: 3.4.5
  • Elasticsearch Version: 7.17.29

Describe the bug
Scan task reported as success, but index task never ends. One must terminal sist2 service from the system terminal to end the index task. Logs show lots of errors, such as:

2025-07-06 03:19:23 [DEBUG cli.c] arg batch_size=70
2025-07-06 03:19:23 [DEBUG cli.c] arg force_reset=0
2025-07-06 03:19:23 [INFO elastic.c] Elasticsearch version is 7.17.29 (supported=1, legacy=0)
2025-07-06 03:19:23 [DEBUG database.c] Opening database /sist2-admin/scan-Project Research-2025-07-05 11:37:57.689173.sist2 (0)
2025-07-06 03:19:23 [DEBUG database.c] Closing database /sist2-admin/scan-Project Research-2025-07-05 11:37:57.689173.sist2 (0x61471eeea878)
2025-07-06 03:19:23 [DEBUG main.c] Index version 3.4.4
2025-07-06 03:19:23 [DEBUG database.c] Initializing database /dev/shm/sist2-ipc-3239.sqlite
2025-07-06 03:19:23 [INFO tpool.c] Starting thread pool with 2 threads
2025-07-06 03:19:23 [DEBUG database.c] Opening database /dev/shm/sist2-ipc-3239.sqlite (1)
2025-07-06 03:19:23 [DEBUG database.c] Opening database /dev/shm/sist2-ipc-3239.sqlite (1)
2025-07-06 03:19:23 [DEBUG database.c] Opening database /dev/shm/sist2-ipc-3239.sqlite (2)
2025-07-06 03:19:23 [DEBUG database.c] Opening database /sist2-admin/scan-Project Research-2025-07-05 11:37:57.689173.sist2 (0)
2025-07-06 03:19:24 [ERROR elastic.c] {
	"index":	{
		"_index":	"sist2",
		"_type":	"_doc",
		"_id":	"68690e96.0000000e",
		"status":	400,
		"error":	{
			"type":	"mapper_parsing_exception",
			"reason":	"failed to parse field [exif_datetime] of type [date] in document with id '68690e96.0000000e'. Preview of field's value: '2023:07:30 05:51:39'",
			"caused_by":	{
				"type":	"illegal_argument_exception",
				"reason":	"failed to parse date field [2023:07:30 05:51:39] with format [strict_date_optional_time||epoch_millis]",
				"caused_by":	{
					"type":	"date_time_parse_exception",
					"reason":	"Failed to parse with all enclosed parsers"
				}
			}
		}
	}
}
2025-07-06 03:19:24 [DEBUG elastic.c] Indexed 70 documents (228kB) <200>
2025-07-06 03:19:26 [DEBUG elastic.c] Indexed 70 documents (2699kB) <200>
2025-07-06 03:19:30 [ERROR elastic.c] {
	"index":	{
		"_index":	"sist2",
		"_type":	"_doc",
		"_id":	"68690e96.0000018e",
		"status":	400,
		"error":	{
			"type":	"mapper_parsing_exception",
			"reason":	"failed to parse field [exif_datetime] of type [date] in document with id '68690e96.0000018e'. Preview of field's value: '2019:02:26 19:52:55'",
			"caused_by":	{
				"type":	"illegal_argument_exception",
				"reason":	"failed to parse date field [2019:02:26 19:52:55] with format [strict_date_optional_time||epoch_millis]",
				"caused_by":	{
					"type":	"date_time_parse_exception",
					"reason":	"Failed to parse with all enclosed parsers"
				}
			}
		}
	}
}
2025-07-06 03:19:30 [ERROR elastic.c] {
	"index":	{
		"_index":	"sist2",
		"_type":	"_doc",
		"_id":	"68690e96.00000190",
		"status":	400,
		"error":	{
			"type":	"mapper_parsing_exception",
			"reason":	"failed to parse field [exif_datetime] of type [date] in document with id '68690e96.00000190'. Preview of field's value: '2013:06:15 22:17:49'",
			"caused_by":	{
				"type":	"illegal_argument_exception",
				"reason":	"failed to parse date field [2013:06:15 22:17:49] with format [strict_date_optional_time||epoch_millis]",
				"caused_by":	{
					"type":	"date_time_parse_exception",
					"reason":	"Failed to parse with all enclosed parsers"
				}
			}
		}
	}
}
2025-07-06 03:19:30 [DEBUG elastic.c] Indexed 70 documents (6861kB) <200>

Steps To Reproduce

  1. Go to sist2-admin -> Jobs, and click on a job
  2. Click on the blue button "Index Now"
  3. Goto Tasks page
  4. Open Running task Logs and notice the errors like the ones above
  5. Click on Running task Kill and notice nothing happens

Expected behavior
Indexing should complete successfully. Index task should stop when the user kills it.

Actual Behavior
Sist2 reports error in elastic.c even though elasticsearch is working well and I can search in the Frontend page without any issues. Sist2 should also kill a running index task when asked by the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions