# Upgrade to Graylog 3.0 mongod.service failed

**URL:** <https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984>\
**Category:** Graylog Central (peer support)\
**Created:** [February 18, 2019, 9:15pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984 "2019-02-18T21:15:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![MFJ82](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@MFJ82](https://community.graylog.org/u/MFJ82)\
**Post date:** [February 18, 2019, 9:15pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/1 "2019-02-18T21:15:16Z")

</div>

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](http://docs.graylog.org/en/3.0/pages/installation/os/centos.html) I get the following error and mongo will no longer start:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/6/6db09fb6ea348a08816bb69f981b2b31f6eeb171.png)

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

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [February 19, 2019, 8:42am UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/2 "2019-02-19T08:42:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [February 19, 2019, 10:05am UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/3 "2019-02-19T10:05:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MFJ82](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@MFJ82](https://community.graylog.org/u/MFJ82)\
**Post date:** [February 19, 2019, 3:47pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/4 "2019-02-19T15:47:41Z")

</div>

@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

```auto
[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:

```auto
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

```auto
sudo mongod

```

I get the following:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/f/fa92b43ca0b1975c3fed869f1829c24bf522550a.png)

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/5/533582591d617d9d2fbe150cd6509a416b5228ae.png)

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

---

<div class="post-metadata">

**Author:** ![MFJ82](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@MFJ82](https://community.graylog.org/u/MFJ82)\
**Post date:** [February 19, 2019, 3:52pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/5 "2019-02-19T15:52:31Z")

</div>

@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)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/b/b762a67f397e65ef563e71f87e4fdf50b2c58f47.png)

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!

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [February 19, 2019, 4:00pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/6 "2019-02-19T16:00:08Z")

</div>

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 …

---

<div class="post-metadata">

**Author:** ![MFJ82](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@MFJ82](https://community.graylog.org/u/MFJ82)\
**Post date:** [February 19, 2019, 4:09pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/7 "2019-02-19T16:09:48Z")

</div>

How do I connect to the mongodb?

```auto
sudo mongod

```

does not seem to work even when mongodb is running

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/8/8c411a7c9b9c31d24493dfb167918f958c8be585.png)

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [February 19, 2019, 4:19pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/8 "2019-02-19T16:19:53Z")

</div>

sorry I had no other choice …

> **[LMGTFY](http://lmgtfy.com/?q=connect+mongodb+cli)**
>
> LMGTFY

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [February 19, 2019, 7:20pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/9 "2019-02-19T19:20:48Z")

</div>

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/M001/about)

[https://university.mongodb.com/courses/M103/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 🙂

---

<div class="post-metadata">

**Author:** ![MFJ82](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@MFJ82](https://community.graylog.org/u/MFJ82)\
**Post date:** [February 19, 2019, 7:41pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/10 "2019-02-19T19:41:42Z")

</div>

hahaha thanks @jan

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![MFJ82](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@MFJ82](https://community.graylog.org/u/MFJ82)\
**Post date:** [February 19, 2019, 7:42pm UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/11 "2019-02-19T19:42:32Z")

</div>

Thanks @Totally_Not_A_Robot I will definitely look into those classes. 👍

---

<div class="post-metadata">

**Author:** ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)\
**Post date:** [February 20, 2019, 7:52am UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/12 "2019-02-20T07:52:25Z")

</div>

For free trainings, they’re really all you could want 🙂 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!_

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [March 6, 2019, 7:52am UTC](https://community.graylog.org/t/upgrade-to-graylog-3-0-mongod-service-failed/8984/13 "2019-03-06T07:52:27Z")

</div>

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