Upgrade to Graylog 3.0 mongod.service failed

I have been running graylog for almost a year now and have not had any serious issues. Trying to upgrade to version 3.0 has crashed my graylog services and I am in need of some advice.

After attempting to upgrade mongodb following the instructions on http://docs.graylog.org/en/3.0/pages/installation/os/centos.html I get the following error and mongo will no longer start:

Versions running before attempted upgrade:
mongo: 3.0.15
elasticsearch: 5.6.5
graylog: 2.5.1
Red Hat Enterprise Linux 7.5

  • what have you done exactly
  • what was the result?
  • what does the logfile contain?
  • did you checked the mongodb upgrade notes?

Any and all relevant logging will be in the MongoD log files. Where those files are fully depends on what is configured in the MongoD configuration file. And where that file is, fully depends on how you’ve installed your MongoDB. If you don’t know where the file is, check the documentation left by the person who built your Graylog / MongoDB stack. They should have noted how things were installed, built and configured.

@jan I have reverted the machine back to the snapshot to ensure that the service was still up and running for users who need to access it.

What I did was add the mongodb 4.0 repo

[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

I then ran “sudo yum install mongodb-org” which downloaded the repo and the result was that the service would not start as per the screenshot in my first post.

The log files gave me the following error:

UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.

The mongo upgrade notes are telling me that I need to change the featureCompatibilityVersion and upgrade to 3.2 then 3.4 then 3.6 but I tried doing that I was not sure how to get a mongod shell to change that feature because each time I run

sudo mongod

I get the following:

Even after adding the /data/db directory with mongo as the owner and group I get:

But it just sits there until I CTRL+C to quit out and it never gives me a shell.

@Totally_Not_A_Robot see the post above. As you can tell I am no MongoDB expert. For our instance I am the one who installed the mongo cluster and I did so using yum and following these steps: (which I got from the graylog documentation)

As you can tell my Mongo knowledge is limited and I am just wondering if anyone could help me try and resolve this problem and upgrade to Graylog 3.0. Thanks!

you can only connect to mongodb when via shell, when mongodb is running …

The mongo upgrade notes are telling me that I need to change the featureCompatibilityVersion and upgrade to 3.2 then 3.4 then 3.6

You need to make that setting before any update is done - then update to 3.2, then to 3.4 and ten to 3.6 …

How do I connect to the mongodb?

sudo mongod

does not seem to work even when mongodb is running

sorry I had no other choice …

1 Like

I will one-up you Jan.

@MFJ82, I can heartily recommend that you take a few classes at Mongo University, specifically these two:

https://university.mongodb.com/courses/M001/about

https://university.mongodb.com/courses/M103/about

When I first started working with Graylog, it inspired me to follow these classes. They helped me a lot!

Among others you will learn exactly why what you’ve been doing doesn’t work.

sudo mongod

Is like running sudo httpd. You’re starting a server process without providing it any configuration. You’re just saying: start a plain ol’ daemon. Nothing more. The reason why it wasn’t doing anything for you, is because mongod was running. In the foreground. Waiting for you to do something :slight_smile:

1 Like

hahaha thanks @jan

Answered my question to show that my command needed to drop the d to work.

mongo

started up the database shell just fine. I was able to successfully upgrade mongo to version 4.0. Running the upgrade here to graylog 3.0 in a couple of hours.

Thanks @Totally_Not_A_Robot I will definitely look into those classes. :+1:

1 Like

For free trainings, they’re really all you could want :slight_smile: Videos, research and lots of lab exercises.

And if you pass all the labs and the exam they’ll even give you a course-completion cert, which you can use to prove to your boss that you’ve worked on improving your skillset. Helloooo leverage!

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