Mongodb 4: Failed to start mongod.service: Unit mongod.service not found - mongodb

I am trying to install mongodb 4 on Ubuntu 15.10 but its giving me this error when I start mongod:
Failed to start mongod.service: Unit mongod.service not found
I followed this official installation guide:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
There is no official installation instructions for Ubuntu 15.10
I was successfully able to install on Ubuntu 16 but I am getting issues on Ubuntu 15.10.

Since ubuntu 15 isn't officially supported, you might have installed either the version for ubuntu 14 or 16.
Ubuntu possibly upgraded the init system to upstart/systemd (around v15). It's possible that the mongo release for ubuntu 14 varies as in it's packaged for a different init system.
You could write your own init script and install it into /etc/init.d. Alternatively using process control systems like supervisor.
Your other option (probably better for security) is to get a new server and migrate there. It could be potentially done without downtime.

If Ubuntu 16 isn't working for you, and you need to go back in time to an earlier version, I would choose the previous Long Term Support version, so the last 14.x rather than 15.x.
You are correct in using Mongo 3.6 with Meteor, there are likely to be compatibility issues with 4.0

Related

Building Flutter Engine on Ubuntu

I use Ubuntu 20.04. When I run https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment step 7
sudo ./build/install-build-deps-android.sh
ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), 14.10 (utopic), 15.04 (vivid), 16.04 (xenial), 18.04 (bionic), and Debian (rodete and stretch) are currently supported
And the doc says:
If you're on Linux, run the following. Note: These scripts are distro- and version-specific, so are not guaranteed to work on every configuration. If they fail, you may need to find comparable packages to the ones that weren't found.
Based on the documentation, How do I know which packages are not compatible.
Maybe you can modify that install-build-deps-android.sh script and force 20.04 and try to go on the building process?

Google VM Instance Stopped Working after Upgrade

I have a google VM instance which was running flawlessly. It has Centos-7 and Plesk installed in it.
I just stopped it, upgraded machine type (to better CPU and RAM) and started it again. My server stopped responding at all. No websites are running, I can't connect to SSH & Google Cloud SDK Shell is unable to reach server. It says NETWORK ERROR, CONNECTION TIMED OUT. My all other instances works well.
I tried rebooting & resetting multiple times. Reading out stuff from internet since last 6 hours but for no luck. I also tried to clone disk of the instance and creating new instance with the cloned disk but for no luck. Same network connection issue. May be something in OS got corrupted? Please suggest. I have a number of websites hosted on the server which are down due to this. Thanks a lot in advance.
I took screenshot of my VM using Google Cloud Shell. It is as follows:
I connected with serial console which is as follows:
While creating a ticket with google, I found that they've posted some information under "Known Issues". I am pasting the whole stuff as there is no direct link to reach there. The symptoms they told were exactly what was happening to me:
Below is Known Issue Posted by Google:
Description:
We are experiencing an issue with Google Compute Engine instances running RHEL and CentOS 7 and 8. More details on this issue are available in the following article and bugs: https://access.redhat.com/solutions/5272311 https://bugzilla.redhat.com/show_bug.cgi?id=1861977 (RHEL 8) https://bugzilla.redhat.com/show_bug.cgi?id=1862045 (RHEL 7) Symptoms: Instances running RHEL and CentOS 7 and 8 that run yum update may fail to boot after restart with errors messages referring to a combination of: "X64 Exception Type - 0D(#GP - General Protection) CPU Apic ID", "FXSAVE_STATE" or "Find image based on IP". This issue affects instances with specific versions of the shim package installed. To find the currently installed shim version, use the following command: rpm -q shim-x64 Affected shim versions: CentOS 7: shim-x64-15-7.el7_9.x86_64 CentOS 8: shim-x64-15-13.el8.x86_64 RHEL 7: shim-x64-15-7.el7_8.x86_64 RHEL 8: shim-x64-15-14.el8_2.x86_64 Workaround: Do not update or reboot instances running RHEL or CentOS 7 and 8. If you are on an affected shim version, run yum downgrade shim\* grub2\* mokutil to downgrade to the correct version. This command may not work on CentOS 8. If you have already rebooted, you will need to attach the disk to another instance, chroot into the disk, then run the yum downgrade command. We will provide an update by Thursday, 2020-07-30 14:00 US/Pacific with current details.
Start time:
July 30, 2020 at 9:08:34 PM GMT+5
How to diagnose:
Instances running RHEL and CentOS 7 and 8 that run yum update may fail to boot after restart with errors messages referring to a combination of: "X64 Exception Type - 0D(#GP - General Protection) CPU Apic ID", "FXSAVE_STATE" or "Find image based on IP". This issue affects instances with specific versions of the shim package installed. To find the currently installed shim version, use the following command: rpm -q shim-x64 Affected shim versions: CentOS 7: shim-x64-15-7.el7_9.x86_64 CentOS 8: shim-x64-15-13.el8.x86_64 RHEL 7: shim-x64-15-7.el7_8.x86_64 RHEL 8: shim-x64-15-14.el8_2.x86_64
Workaround:
Do not update or reboot instances running RHEL or CentOS 7 and 8. If you are on an affected shim version, run yum downgrade shim\* grub2\* mokutil to downgrade to the correct version. This command may not work on CentOS 8. If you have already rebooted, you will need to attach the disk to another instance, chroot into the disk, then run the yum downgrade command.

How to install Mongodb 4 on ubuntu 15.10

I am struggling to install Mongodb 4.0 on Ubuntu 15.10 but I am not able to.
I tried Mongodb's official guide too:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
But Mongodb official installation guide has no instructions for Ubuntu 15.10.
When I try to start Mongodb instance I get:
Mongodb 4: Failed to start mongod.service: Unit mongod.service not found
I also tried to remove Mongodb completely and then fresh install.
Can anyone help me with this?

Upgrading older mongo database after unintentional mongo version upgrade

Is there any way to upgrade a mongo database after the mongodb package was unintentionally upgraded (3.4.9 -> 3.6.1)?
According to the mongo docs, as a prerequisite of the upgrade, featureCompatibilityVersion has to be set from the mongo cli tool, which, however, needs a running mongod database daemon, which, however, won't run if mongodb package was already upgraded and the database was not set the featureCompatibilityVersion flag.
I'm on ArchLinux, I had mongodb in IgnorePkg but it's dependencies boost-libs and wiredtiger got upgraded anyways. Having pacman cache already wiped out, I compiled older versions of the packages myself, but running mongodb keeps failing with this error:
unsupported WiredTiger file version: this build only supports major/minor versions up to 1/0, and the file is version 2/0: WT_ERROR: non-specific WiredTiger error
I don't have a clue what the hell this means (the problematic version of wiredtiger is 2.9.3-1, version after the upgrade is 2.9.3.20171205-2).
Seems like I can neither downgrade nor upgrade...
Other cli tools (e.g. mongodump) also won't run without a running database, is there any other possibility (some wiredtiger related tool)? Deleting the database and starting afresh is not an option.
I solved the problem by installing the older version of mongodb on a system for which it wasn't a problem to get it pre-packaged (well, Windows 10, even though oficially it's stated the package is for Windows Server 2008), copying the database files (contents of /var/lib/mongodb) there, running it with --dbpath param (mongod --dbpath /path/to/dbfiles), setting the compatibility flag according to the docs and finally copying the db files back to the server.
Would like to know about a better option, but it's good to know the db files are easily transferable to another system, even another architecture (the db was relatively simple and small though).
Running mongod --repair worked for me.
here similar issue, unintentionally upgrade from 4.2.1 to 4.4.3, then mongodb can NOT started..
Final worked solution:
uninstall (latest, but not worked version: 4.4.3)
brew uninstall mongodb-community
reinstall, old but worked 4.2.1
brew install mongodb-community#4.2
run
for now: brew services run mongodb-community#4.2
for now and set bootable: brew services start mongodb-community#4.2
check status
brew services

MongoDb initial startup says hot fix not installed but it is

I am trying to install MongoDB on Windows 7 Enterprise (32bit) VM running in VirtualBox on Windows7 Ultimate 64bit.
The MongoD.exe start up reports a missing Microsoft Hotfix, KB2731284. I downloaded and installed the hot fix on the VM. The hotfix was not required on the Host PC.
Mongod.exe still reported it was not installed. Ran the hotfix a second time and it reported that it was already installed.
I tried uninstalling an reinstalling mongoDB, no luck.
Stuck, any ideas?
MongoDB.com lists stackoverflow as the support portal.
per SO
I think you can run MongoDb without applying the Hotfix, but I would not recommend it. In long time you may run into problems. They have included some fixes in MongoDB to workaround the problem.
On Windows 7 and Windows Server 2008 R2 when applying the hotfix you get a better file allocation performance what is relevant for MongoDB
So when using mongo 2.6.0 there is workaround implemented.