Skip to content

Mongo Completely Broken.

General
  • @Sampo2910 quite possible, yes. What is the output of

    sudo dpkg -l | grep mongodb
    

    or

    sudo apt list --installed | grep mongodb
    
  • @phenomlab Here is the output for both.

    smiley@fmjcod4:~$ sudo dpkg -l | grep mongodb
    [sudo] password for smiley:
    iU  mongodb-mongosh                            2.3.7                                         amd64        MongoDB Shell CLI REPL Package
    iU  mongodb-org                                8.0.4                                         amd64        MongoDB open source document-oriented database system (metapackage)
    iU  mongodb-org-database                       8.0.4                                         amd64        MongoDB open source document-oriented database system (metapackage)
    iU  mongodb-org-database-tools-extra           8.0.4                                         amd64        Extra MongoDB database tools
    iU  mongodb-org-shell                          8.0.4                                         amd64        MongoDB shell client
    iU  mongodb-org-tools                          8.0.4                                         amd64        MongoDB tools
    rc  mongodb-server                             1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3 all          object/document-oriented database (managed server package)
    ii  mongodb-server-core                        1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3 amd64        object/document-oriented database (server binaries package)
    smiley@fmjcod4:~$ ^C
    smiley@fmjcod4:~$ sudo apt list --installed | grep mongodb
    
    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
    
    mongodb-mongosh/focal/mongodb-org/8.0,now 2.3.7 amd64 [installed,automatic]
    mongodb-org-database-tools-extra/focal/mongodb-org/8.0,now 8.0.4 amd64 [installed,automatic]
    mongodb-org-database/focal/mongodb-org/8.0,now 8.0.4 amd64 [installed,automatic]
    mongodb-org-shell/focal/mongodb-org/8.0,now 8.0.4 amd64 [installed,automatic]
    mongodb-org-tools/focal/mongodb-org/8.0,now 8.0.4 amd64 [installed,automatic]
    mongodb-org/focal/mongodb-org/8.0,now 8.0.4 amd64 [installed]
    mongodb-server-core/focal-updates,focal-security,now 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3 amd64 [installed,auto-removable]
    
  • It is running but I still cannot do any updates as mentioned.

    smiley@fmjcod4:~$ sudo service mongodb status
    ● mongodb.service - LSB: An object/document-oriented database
         Loaded: loaded (/etc/init.d/mongodb; generated)
         Active: active (running) since Tue 2024-12-31 02:13:22 EET; 1h 8min ago
           Docs: man:systemd-sysv-generator(8)
        Process: 14698 ExecStart=/etc/init.d/mongodb start (code=exited, status=0/SUCCESS)
          Tasks: 34 (limit: 16594)
         Memory: 149.6M
         CGroup: /system.slice/mongodb.service
                 └─14716 /usr/bin/mongod --config /etc/mongodb.conf
    
    Dec 31 02:13:21 fmjcod4 systemd[1]: Starting LSB: An object/document-oriented database...
    Dec 31 02:13:21 fmjcod4 mongodb[14698]:  * Starting database mongodb
    Dec 31 02:13:22 fmjcod4 mongodb[14698]:    ...done.
    Dec 31 02:13:22 fmjcod4 systemd[1]: Started LSB: An object/document-oriented database.
    
  • @Sampo2910 I can take a look at this today at some point. Can you PM me the login details?

  • Repo problem

  • @DownPW Seems not

    Hit:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 InRelease
    
  • @Sampo2910 This is in fact the issue. From your server, I see

    db version v3.6.8
    git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
    OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
    allocator: tcmalloc
    modules: none
    build environment:
        distarch: x86_64
        target_arch: x86_64
    

    This is seriously out of date - the current version of MongoDB is 8.x. MongoDB 3.6 was released in November 2017 and reached end of life in April 2021. To upgrade MongoDB from version 3 to version 8, you first need to perform a series of incremental upgrades through intermediate versions like 4 and 7, as you cannot directly jump from 3 to 8 due to significant compatibility changes.

    My suggestion would be as follows

    1. Dump the existing database as a backup.
    2. Completely remove version 3.6 and install MongoDB 8.x.
    3. Recreate the database.
    4. Restore the backed-up database.

    In theory, this is straightforward, but in practice, not so much. The application you are running is 2 years old and may use statements that no longer exist in MongoDB or have been superseded by others. This means that your application may not work correctly, or at all once MongoDB has been updated.

  • @phenomlab

    Hi and thanks for looking.

    I knew that it was all old and outdated so yeah that makes sense. I will have to Google how to do all that. Its just one db. I could always create a new one once updated as there is not so much on this one ( easier I keep it) but still no guarantee this application will work with latest version anyway.

    Easiest is I just leave it and never update 🙂 Its gaming server and for testing only, so maybe no harm done leaving it.

  • @Sampo2910 my only concern around this route is any vulnerabilities exposed due to the lack of support and updates.

  • @phenomlab Well as you seen it was asking to fix broken install.

    I basically forced that.

    sudo apt -o Dpkg::Options::="--force-overwrite" --fix-broken install
    

    I can see you cringing haha. But it seems to have worked. Update was ok and the upgrade bar 2 all worked.

    smiley@fmjcod4:~$ sudo apt update
    [sudo] password for smiley:
    Hit:1 http://fi.archive.ubuntu.com/ubuntu focal InRelease
    Hit:2 http://fi.archive.ubuntu.com/ubuntu focal-updates InRelease
    Hit:3 http://fi.archive.ubuntu.com/ubuntu focal-backports InRelease
    Hit:4 http://fi.archive.ubuntu.com/ubuntu focal-security InRelease
    Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
    Hit:6 http://ppa.launchpad.net/maxmind/ppa/ubuntu focal InRelease
    Hit:7 http://ppa.launchpad.net/system76-dev/stable/ubuntu focal InRelease
    Hit:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease
    Hit:9 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 InRelease
    Hit:10 https://downloads.sourceforge.net/project/d-apt d-apt InRelease
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    2 packages can be upgraded. Run 'apt list --upgradable' to see them.
    smiley@fmjcod4:~$ sudo apt upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages were automatically installed and are no longer required:
      mongodb-database-tools mongodb-mongosh
    Use 'sudo apt autoremove' to remove them.
    Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
      node-hosted-git-info python2.7-minimal python2.7 node-tar
      python-pkg-resources node-ip libpython2.7-minimal libpython2.7-stdlib
    Learn more about Ubuntu Pro at https://ubuntu.com/pro
    The following packages have been kept back:
      amd64-microcode linux-firmware
    0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
    

    Of course I am fully aware that this is a mess 🙂 But I am limited skill wise. The website can be seen and the data from the games is getting saved so at the moment its ok 🙂 But i like perfect and this is far from it. Hey Ho.

  • @Sampo2910 said in Mongo Completely Broken.:

    I can see you cringing

    Yes, that does make me slightly uncomfortable 😬 but OK.


Related Topics