502 Bad gateway

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.
Don’t forget to select tags to help index your topic!

1. Describe your incident:
Getting a 502 bad gateway when accessing the web console

2. Describe your environment:

  • OS Information:
    Ubuntu 22.04

  • Package Version:

  • Service logs, configurations, and environment variables:

3. What steps have you already taken to try and solve the problem?

It used to work and stopped
Confirmed Graylog service is running
Reverted the server.conf to default

Running the following commands give me the following result:
curl -i -H ‘Accept: application/json’ ‘
curl: (7) Failed to connect to port 12900 after 0 ms: Connection refused

4. How can the community help?
Not really sure what to do here, so any guidance for what to try to fix the issue is greatly appreaciated

Helpful Posting Tips: Tips for Posting Questions that Get Answers [Hold down CTRL and link on link to open tips documents in a separate tab]

Hey @philatjaco && Welcome

Thats doesnt look like a default port used for Elasticsearch/Opensearch. It should be 9200.
Graylog Web UI is port 9000. That IP address looks familiar, by chance is that docker?
On second though, what version of Graylog is this?

Thanks for your response.

I get a the following

curl: (7) Failed to connect to port 9200 after 0 ms: Connection refused

when I run:

curl -i -H ‘Accept: application/json’ ‘

Running Graylog on Ubuntu 22.04

ii graylog-server 4.3.10-1 all Graylog server

1 Like

Hey @philatjaco

If you reverted the server.log to default does this mean the ‘http_bind_address’ is currently listening on If so try altering it to or

Can you confirm the elasticsearch/opensearch service is running, also worth checking mongo.

Running the below on the ubuntu box Graylog is installed to should give an idea of what process is running on which port, this includes Graylog, Mongo and Open/Elasticsearch.

sudo lsof -i -n -P

If you still can’t hit the Graylog ui, then a good place to begin troubleshooting is the log file found in this location /var/log/graylog/server.log.

1 Like


Since it seams that your trying to make a connection to Elasticsearch using cURL. Like @Wine_Merchant suggested, make sure the network_host setting in Elasticsearch yaml file has that IP ADDRESS (i.e., ), if not then it would normally be and/or localhost.

Try something like this

curl -XGET


curl -XGET http://localhost:9200/

BUT to get 502 bad gateway this would be your MongoDb/Graylog instance. If those two are functioning you should be able to logon without Elasticsearch.

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