Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54386

mongodb 3.6.22 install fails if systemctl daemon is not running

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.5, 4.2.14, 4.0.25
    • Affects Version/s: 3.6.22
    • Component/s: Packaging
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0
    • Hide
      docker run --rm -it --entrypoint=/bin/sh mongo:3.6
      > $ apt update
      > $ apt upgrade -y
      ...
      > Setting up mongodb-org-server (3.6.22) ...
      > Failed to connect to bus: No such file or directory
      > dpkg: error processing package mongodb-org-server (--configure):
      >  subprocess installed post-installation script returned error exit status 1
      > dpkg: dependency problems prevent configuration of mongodb-org:
      >  mongodb-org depends on mongodb-org-server; however:
      >   Package mongodb-org-server is not configured yet.
      Show
      docker run --rm -it --entrypoint=/bin/sh mongo:3.6 > $ apt update > $ apt upgrade -y ... > Setting up mongodb-org-server (3.6.22) ... > Failed to connect to bus: No such file or directory > dpkg: error processing package mongodb-org-server (--configure): > subprocess installed post-installation script returned error exit status 1 > dpkg: dependency problems prevent configuration of mongodb-org: > mongodb-org depends on mongodb-org-server; however: > Package mongodb-org-server is not configured yet.
    • Dev Platform 2021-02-22

      SERVER-52806 broke the installation on Docker images which have systemd installed without the daemon running, which is the case on the official mongo Docker image. That's why an upgrade or installation fails completely. Older versions likeĀ 3.6.21 can be installed without a problem.

      The problem lies in the postinstall script which assumes that if the systemctl binary is present the daemon must be running:

              # Check for changes to the service file
              if $(command systemctl --help >/dev/null); then
                  systemctl daemon-reload
              fi
      

      The result is the error

      Failed to connect to bus: No such file or directory

            Assignee:
            ryan.egesdahl@mongodb.com Ryan Egesdahl (Inactive)
            Reporter:
            philipp@trulson.de Philipp Trulson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: