Graylog 5.0 does not open URL

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:
Just installed Graylog on a VM. and can verify that all the component’s are started.

2. Describe your environment:

  • OS Information: VM - Ubuntu 20.04.5 LTS 8G memory 3 cores assigned.200GB assigned.

  • Package Version: Running Graylog 5

  • Service logs, configurations, and environment variables:

3. What steps have you already taken to try and solve the problem?
Updated the server.conf with the IP address to bind.
Verified that the port was open on the firewall
Verified that the host is pingable
Checked all the services to make sure they are up and running.

4. How can the community help?
Would like to troubleshoot the issue to see why the GUI does not launch. The error I get is unable to establish a connection using that IP and port.

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]

Does your graylog log report anything? In my Ubuntu instance the graylog logs are in /var/log/graylog-server/

I would start there to look for errors.

Thanks for that. I did check and saw that MongoDB is not available. Retry#1295. However, I did check and it is up and running. Maybe Graylog is not able to connect to Mongo???

Perhaps. I am no expert on Mongo, but I would consider confirming the version of Mongo that is installed will work with Graylog, as well as verifying the connection string in Graylog’s server.conf works for your Mongo install.

You can post up your server.conf file (properly obfuscated and using the </> forum tool to make it readable) There are some tips here on how to check versions and pull your server.conf without all the comments…

1 Like

@Machiste

I have to agree with @tmacgbay

Graylog not opening /w URL could be a couple different issues . The log’s and/or configurations made would be very helpful :+1:

mongodb by default is wide open, ie no auth required and will just work. It should bind to 127.0.0.1 only anyway which is “internal only” and hence is safe.

Graylog 5 requires a modern mongodb 5 or 6 and on Ubuntu that can be a bit of a challenge. The Ubuntu apt provided mongodb is old.

I too run my Graylog on Ubuntu 20.04 (but I will be upgrading to 22.04) so you will want to follow this guide: https://www.mongodb.com/docs/v5.0/tutorial/install-mongodb-on-ubuntu/ to get MongoDB v5.0 installed. You don’t need to make any changes to it - it should simply work out of the box.

1 Like

@Machiste Post your graylog server.conf file

Can you provide the path to the log? I was searching var/log/graylog-server but do not see anything other than server.log. In var/log I also do not see server.conf. Sorry but I am still learning linux.

server.log is the Graylog log. You can use nano on Ubuntu to open it.

On Ubuntu, the graylog.conf file should be at /etc/graylog/server/

Hope this helps you to find the files.

Here is my log.

My MongoDB Connection string is a lot simpler than yours. Here is mine:

mongodb_uri = mongodb://localhost/graylog

Hopefully others will weigh in - this is a bit over my head.

1 Like

I can 't access the file you posted while at work. In the tips in my previous post there are commands you can run to pull out server.conf without comments and posting them directly in the forum using the </> will make it more readable.

Says new users can not post more than two links.

@Machiste , the request was for you to paste your sanitized config and logs into a message using the

Preformatted text

Option. You should not need a link.

is_leader = true
node_id_file = /etc/graylog/server/node-id
password_secret = ******************************************
root_password_sha2 = **************************************
root_timezone = America/New_York
bin_dir = /usr/share/graylog-server/bin
data_dir = /var/lib/graylog-server
plugin_dir = /usr/share/graylog-server/plugin
http_bind_address = 192.168.1.47:9000
http_publish_uri = http://192.168.1.47:9000/
http_enable_cors = true
stream_aware_field_types=false
elasticsearch_hosts = http://node1:9200,http://user:password@node2:19200
rotation_strategy = count
elasticsearch_max_docs_per_index = 20000000
elasticsearch_max_number_of_indices = 20
retention_strategy = delete
elasticsearch_shards = 4
elasticsearch_replicas = 0
elasticsearch_index_prefix = graylog
allow_leading_wildcard_searches = false
allow_highlighting = false
elasticsearch_analyzer = standard
output_batch_size = 500
output_flush_interval = 1
output_fault_count_threshold = 5
output_fault_penalty_seconds = 30
processbuffer_processors = 5
outputbuffer_processors = 3
processor_wait_strategy = blocking
ring_size = 65536
inputbuffer_ring_size = 65536
inputbuffer_processors = 2
inputbuffer_wait_strategy = blocking
message_journal_enabled = true
message_journal_dir = /var/lib/graylog-server/journal
lb_recognition_period_seconds = 3
mongodb_uri = mongodb://grayloguser:secret@localhost:27017/graylog
mongodb_max_connections = 1000

Unless you are sure this is needed, I would comment it out. Did not catch anything else off hand… are there anything interesting in the server log (how to get there is also in the link I posted… :slight_smile: )

Commented that line out and tried again. Unsuccessful.

This is what I see in the server log.

2023-02-23T16:08:23.265-05:00 INFO  [cluster] Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=13, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=611735}
2023-02-23T16:08:23.274-05:00 INFO  [MongoDBPreflightCheck] MongoDB is not available. Retry #921
2023-02-23T16:08:25.275-05:00 INFO  [cluster] Cluster description not yet available. Waiting for 30000 ms before timing out
2023-02-23T16:08:25.276-05:00 INFO  [connection] Opened connection [connectionId{localValue:1844, serverValue:105208}] to localhost:27017
2023-02-23T16:08:25.276-05:00 INFO  [cluster] Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=13, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=714451}
2023-02-23T16:08:25.281-05:00 INFO  [MongoDBPreflightCheck] MongoDB is not available. Retry #922
2023-02-23T16:08:27.283-05:00 INFO  [cluster] Cluster description not yet available. Waiting for 30000 ms before timing out
2023-02-23T16:08:27.284-05:00 INFO  [connection] Opened connection [connectionId{localValue:1846, serverValue:105210}] to localhost:27017
2023-02-23T16:08:27.284-05:00 INFO  [cluster] Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=13, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=915156}
2023-02-23T16:08:27.291-05:00 INFO  [MongoDBPreflightCheck] MongoDB is not available. Retry #923`Preformatted text`

It says MongoDB is not available You have it installed and it is running? @gerdesj posted above about getting Mongo running on Ubuntu - you went through all that?

Yes it has been.

● mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-02-20 18:30:55 EST; 2 days ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 4827 (mongod)
     Memory: 186.5M
     CGroup: /system.slice/mongod.service
             └─4827 /usr/bin/mongod --config /etc/mongod.conf

Feb 20 18:30:55 VM-MOE02 systemd[1]: Started MongoDB Database Server.