Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fedora 39, MongoDB related issue (fiftyone.core.service.ServiceExecutableNotFound: Could not find mongod; fiftyone.core.config.FiftyOneConfigError: MongoDB could not be installed on your system.) #5447

Open
3 tasks
massisenergy opened this issue Jan 29, 2025 · 2 comments
Labels
bug Bug fixes

Comments

@massisenergy
Copy link

Describe the problem

The demo after installing (no error) 51 fails, with error related to MongoDB.

Code to reproduce issue

❯ python
Python 3.11.11 (main, Dec 11 2024, 16:28:39) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiftyone as fo
>>> import fiftyone.zoo as foz
>>>
>>> dataset = foz.load_zoo_dataset("quickstart")
Dataset already downloaded
Traceback (most recent call last):
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/odm/database.py", line 194, in establish_db_conn
    _db_service = fos.DatabaseService()
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/service.py", line 81, in __init__
    self.start()
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/service.py", line 210, in start
    super().start()
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/service.py", line 119, in start
    + self.command,
      ^^^^^^^^^^^^
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/service.py", line 239, in command
    DatabaseService.find_mongod(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/service.py", line 287, in find_mongod
    raise ServiceExecutableNotFound("Could not find `mongod`")
fiftyone.core.service.ServiceExecutableNotFound: Could not find `mongod`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/zoo/datasets/__init__.py", line 399, in load_zoo_dataset
    if fo.dataset_exists(dataset_name):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/dataset.py", line 103, in dataset_exists
    conn = foo.get_db_conn()
           ^^^^^^^^^^^^^^^^^
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/odm/database.py", line 394, in get_db_conn
    _connect()
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/odm/database.py", line 233, in _connect
    establish_db_conn(fo.config)
  File "/data1/icmr/sourav/workspace/fiftyone_env/lib/python3.11/site-packages/fiftyone/core/odm/database.py", line 200, in establish_db_conn
    raise FiftyOneConfigError(
fiftyone.core.config.FiftyOneConfigError: MongoDB could not be installed on your system. Please define a `database_uri` in your `fiftyone.core.config.FiftyOneConfig` to connect to yourown MongoDB instance or cluster
>>> session = fo.launch_app(dataset)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'dataset' is not defined
>>>
❯ service mongod start
Redirecting to /bin/systemctl start mongod.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to start 'mongod.service'.
Authenticating as: ICMR (icmr)
Password:
==== AUTHENTICATION COMPLETE ====
Failed to start mongod.service: Unit mongod.service not found.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 22.04):

NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora Linux 39 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:39"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=39
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=39
SUPPORT_END=2024-11-12
VARIANT="Workstation Edition"
VARIANT_ID=workstation

  • Python version (python --version):

3.11.11

  • FiftyOne version (fiftyone --version):

FiftyOne v1.3.0, Voxel51, Inc.

  • FiftyOne installed from (pip or source):

pip

Other info/logs

The session is run over ssh -X ... in the headless workstation. Other GUI windows open without any problems.

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@massisenergy massisenergy added the bug Bug fixes label Jan 29, 2025
@massisenergy massisenergy changed the title [BUG] Fedora 39, MongoDB related issue! [BUG] Fedora 39, MongoDB related issue (fiftyone.core.service.ServiceExecutableNotFound: Could not find mongod; fiftyone.core.config.FiftyOneConfigError: MongoDB could not be installed on your system.) Jan 29, 2025
@benjaminpkane
Copy link
Contributor

Hi @massisenergy. We will look into adding Fedore 39 support for the builtin DB. We do support Fedora 40+

You can configure your own MongoDB connection to circumvent this issue. It is the recommended setup for regular FiftyOne usage as initial connections are faster (no subprocess required)

@speendo
Copy link

speendo commented Feb 22, 2025

Same problem occurs on my Debian Testing (13) system in a venv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

No branches or pull requests

3 participants