Error on import with Python and Eland

I am using Python and Eland to loop through 2757 json files that I have created and import them into Elasticsearch. With my code I am able to import the majority of them, only 5 of them do not import and throw the same error. The error I get is not very descriptive. Is there anyway to find out more details as to what the error is, or what part of the file might be causing the error? Is there something I can edit in my code to get additional output on the errors for eland or the Elasticsearch.helpers.BulkIndexError it mentions in the exception?

A quick google turns up similar errors, but they typically have additional information after the documents failed to index, as to why.

Elasticsearch Version 8.2.0
OS: Debian 11
Python: 3.9.3
Python modules:
elastic-transport 8.1.2
Elasticsearch 8.2.0


import os
from elasticsearch import Elasticsearch
import json
import eland as ed
import pandas as pd

filename = './json/nessus.2053.7875.1636196619.json'
index = "asset_nessus"

client = Elasticsearch(
    basic_auth = (os.environ.get('ES_USER'), os.environ.get('ES_PASSWORD'),),

f = open(filename, "r")
data =
x = json.loads(data)

df = pd.json_normalize(x)
df['Date'] = pd.to_datetime(df['Date'])

    es_client = client,
    es_dest_index = index,
        "IPv4Address": "ip",
        "Vuln-Synopsis": "text",
        "Vuln-Description": "text",
        "Vuln-Solution": "text",
        "Vuln-PluginOutput": "text",
        "Vuln-CVSSScore": "float"
    es_if_exists = "append",


Traceback (most recent call last):
  File "/home/bryan/Nessus/", line 31, in <module>
  File "/home/bryan/.local/lib/python3.9/site-packages/eland/", line 215, in pandas_to_eland
  File "/home/bryan/.local/lib/python3.9/site-packages/elasticsearch/helpers/", line 598, in parallel_bulk
    for result in pool.imap(
  File "/usr/lib/python3.9/multiprocessing/", line 870, in next
    raise value
  File "/usr/lib/python3.9/multiprocessing/", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/bryan/.local/lib/python3.9/site-packages/elasticsearch/helpers/", line 599, in <lambda>
    lambda bulk_chunk: list(
  File "/home/bryan/.local/lib/python3.9/site-packages/elasticsearch/helpers/", line 355, in _process_bulk_chunk
    yield from gen
  File "/home/bryan/.local/lib/python3.9/site-packages/elasticsearch/helpers/", line 274, in _process_bulk_chunk_success
    raise BulkIndexError(f"{len(errors)} document(s) failed to index.", errors)
elasticsearch.helpers.BulkIndexError: 1 document(s) failed to index.

Any help would be greatly appreciated. Thanks!

Any Eland users that might have some suggestions?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.