HTTP integration Error 400 in log

Hi,
I installed a HTTP integration with the header:

  • Content-type: application/json
  • Authorization: Basic <>
    URL: https://...es.io:9243/index/_doc/?event=up?

I get an error in the log saying:
time="..." level=error msg="integration/http: publish event error" ctx_id=<> dev_eui=<> error="expected 2XX response, got: 400" event_type=up url="https://<>.es.io:9243/index/_doc/?event=up"

The chirpstack webui does provide a valid let’s encrypt certificate.

When I change the URL to a Postman mock server I receive it successfully.
What could be the reason for this?
Thanks for your support.

Lukas

The error indicates that your endpoint returned a 400 status, but a 2XX status is expected. You should inspect why your endpoint is returning a 400 status.

I have configured these headers and then it works from Postman and curl to ES:


The body is: {“test”:“20230630”}

curl: $ curl --location ‘https://.europe-west1.gcp.cloud.es.io:9243/index/_doc/’
–header ‘Content-type: application/json’
–header ‘Authorization: Basic xxx=’
–data ‘{“test”:“20230630”}’

TTN works:

Chirpstack is sending which


does not work.

Hi,
What do you think regarding the headers?
BR

Lukas

@brocaar What do you think regarding the headers?

When I add /?event=up to the url and try using postman:
url=“<>es.io:9243/index/_doc/?event=up” then the uplink does not create a document on es.

curl command: curl --location ‘https://<>.es.io:9243/index/?event=up’
–header ‘Content-type: application/json’
–header ‘Authorization: Basic ’
–data ‘{“testkey”:“testvalue”}’

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