Graylog can't read OpenSearch JSON to connect

Hi, I’m having an issue when trying to connect my OpenSearch server to my Graylog server. I’m able to start and run OpenSearch seemingly without issues, however when I try to start Graylog I get these error messages:

2024-06-20T14:19:07.380Z INFO [VersionProbe] OpenSearch/Elasticsearch is not available. Retry #27
2024-06-20T14:19:12.385Z ERROR [VersionProbe] Unable to retrieve version from OpenSearch/Elasticsearch node <OpenSearch’s ip address>: unknown error - an exception occurred while deserializing error response: com.fasterxml.jackson.core.JsonParseException: Unexpected character (‘<’ (code 60)): expected a valid value (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’)
at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 1]

However, when I run a curl command to the address of my OpenSearch server I get what seems to be a valid JSON document:

{
“name” : “main-node”,
“cluster_name” : “graylog”,
“cluster_uuid” : “Sr-4UlL6Tu6W7mqu06RMPQ”,
“version” : {
“distribution” : “opensearch”,
“number” : “2.12.0”,
“build_type” : “deb”,
“build_hash” : “2c355ce1a427e4a528778d4054436b5c4b756221”,
“build_date” : “2024-02-20T02:18:31.541484890Z”,
“build_snapshot” : false,
“lucene_version” : “9.9.2”,
“minimum_wire_compatibility_version” : “7.10.0”,
“minimum_index_compatibility_version” : “7.0.0”
},
“tagline” : “The OpenSearch Project: https://opensearch.org/
}

I’m running OpenSearch on Ubuntu Server 24.04, and running Graylog and MongoDB on a separate server, also on Ubuntu Server 24.04.

Edit: I forgot to mention I’m using version 6.0 of Graylog, sorry.

Guessing elasticsearch_hosts is not set in your graylog.conf.
And yes, the name is confusing :confused:

No I did, here is what server.conf looks like:

GRAYLOG_SERVER_JAVA_OPTS=“-Xms2g -Xmx4g -XX:NewRatio=1 -server”
is_leader = true
node_id_file = /etc/graylog/server/node-id
password_secret =my password secret
root_password_sha2 =my root password
bin_dir = /usr/share/graylog-server/bin
data_dir = /var/lib/graylog-server
plugin_dir = /usr/share/graylog-server/plugin
http_bind_address = “ip of this server”:9000
stream_aware_field_types=false
elasticsearch_hosts = http://“ip of OpenSearch server”:9200
disabled_retention_strategies = none,close
allow_leading_wildcard_searches = false
allow_highlighting = false
field_value_suggestion_mode = on
output_batch_size = 500
output_flush_interval = 1
output_fault_count_threshold = 5
output_fault_penalty_seconds = 30
processor_wait_strategy = blocking
ring_size = 65536
inputbuffer_ring_size = 65536
inputbuffer_wait_strategy = blocking
message_journal_enabled = true
message_journal_dir = /var/lib/graylog-server/journal
lb_recognition_period_seconds = 3
mongodb_uri = mongodb://localhost:27017/graylog
mongodb_max_connections = 1000
http_proxy_uri =address of proxy server

Nevermind I am very dumb, I set a proxy uri but didn’t exclude my OpenSearch server… Sorry to have wasted your time

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