Skip to content

"influxdb2client E! Write error: json: cannot unmarshal string into Go struct field Error.Err of type error" in logs #376

Open
@ajb

Description

@ajb

Specifications

  • Client Version: Telegraf 1.25.2
  • InfluxDB Version: InfluxDB v2.6.1
  • Platform: Debian 11

Steps to reproduce

We are writing like this:

		influxClient := influxdb2.NewClient(w.url, w.authString)
		writeAPI := influxClient.WriteAPI("", "")

		for {
			select {
			case e := <-w.influxCh:
				writeAPI.WritePoint(influxdb2.NewPoint(e.measurement, e.tags, e.fields, e.time))
			case <-w.quit:
				writeAPI.Flush()
				return
			}
		}

Appears in our logs occasionally. Seems like an error is being returned to the write method, but the structure is incorrect for unmarshalling. Don't know exactly how to grab more data without forking the package and adding some prints.

Expected behavior

No errors are displayed

Actual behavior

Screenshot 2023-03-10 at 9 03 58 AM

Additional info

No response

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