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] RuntimeError: Dataset 'open-images-v7.yaml' error fiftyone.core.service.DatabaseService failed to bind to port #5377

Open
Noir0010 opened this issue Jan 12, 2025 · 8 comments
Labels
bug Bug fixes

Comments

@Noir0010
Copy link

Noir0010 commented Jan 12, 2025

Describe the Problem

I tried to train YOLOv11 model using OpenImages dataset and when I try to train the model, I'm getting a error. The error indicates a port binding issue with FiftyOne's database service.

Code:

from ultralytics import YOLO
# Load a model
model = YOLO("yolo11x.pt")  # load an official model
# Validate the model
results = model.train(data="open-images-v7.yaml",pretrained=True, epochs = 100, cache = False, patience=5,save=True, batch=-1, save_period=10)

System Information

  1. Windows 11
  2. Python 3.9
  3. FiftyOne version 1.2.0
  4. FIftyOne downloaded from pip
@Noir0010 Noir0010 added the bug Bug fixes label Jan 12, 2025
@Noir0010 Noir0010 changed the title [BUG] [installation] Port Error while training a model using OpenImages [BUG] [installation] Jan 12, 2025
@Noir0010 Noir0010 changed the title Port Error while training a model using OpenImages [BUG] [installation] [BUG] Port Error while training a model using OpenImages Jan 12, 2025
@Noir0010 Noir0010 changed the title [BUG] Port Error while training a model using OpenImages [BUG] RuntimeError: Dataset 'open-images-v7.yaml' error fiftyone.core.service.DatabaseService failed to bind to port Jan 12, 2025
@Noir0010
Copy link
Author

Noir0010 commented Feb 2, 2025

I'm still facing this problem, Can Someone help me?

@benjaminpkane
Copy link
Contributor

Hi @Noir0010. This looks like an unexpected issue with Windows and MongoDB. These are the downloads we use, depending on your architecture.

Running ./path/to/fiftyone/db/bin/mongod --version may help show the issue, if you would like to share that.

You can also configure your own MongdoDB connection to circumvent the issue.

@benjaminpkane
Copy link
Contributor

#5454 may be related

@Noir0010
Copy link
Author

Noir0010 commented Feb 3, 2025

Hello @benjaminpkane Thanks a lot for replying,

The Command which you gave ./path/to/fiftyone/db/bin/mongod --version, I tried running the command and this is what I got.

db version v5.0.4
Build Info: {
    "version": "5.0.4",
    "gitVersion": "62a84ede3cc9a334e8bc82160714df71e7d3a29e",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distmod": "windows",
        "distarch": "x86_64",
        "target_arch": "x86_64"
    }
}

@benjaminpkane
Copy link
Contributor

Thanks @Noir0010.

Can you share what is in your ~/.fiftyone/var/lib/mongo/log/mongo.log? That should say why it is failing

@Noir0010
Copy link
Author

Noir0010 commented Feb 4, 2025

Hello @benjaminpkane,

The Command Opened a txt file file and the contents of the file are below

{"t":{"$date":"2025-01-09T17:39:13.901+05:30"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}
{"t":{"$date":"2025-01-09T17:39:13.957+05:30"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2025-01-09T17:39:13.958+05:30"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2025-01-09T17:39:13.958+05:30"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2025-01-09T17:39:13.961+05:30"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2025-01-09T17:39:13.961+05:30"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}}
{"t":{"$date":"2025-01-09T17:39:13.961+05:30"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2025-01-09T17:39:13.961+05:30"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2025-01-09T17:39:13.962+05:30"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":11412,"port":0,"dbPath":"C:/Users/yuvar/.fiftyone/var/lib/mongo","architecture":"64-bit","host":"DESKTOP-VBF4LJ6"}}
{"t":{"$date":"2025-01-09T17:39:13.962+05:30"},"s":"I",  "c":"CONTROL",  "id":23398,   "ctx":"initandlisten","msg":"Target operating system minimum version","attr":{"targetMinOS":"Windows 7/Windows Server 2008 R2"}}
{"t":{"$date":"2025-01-09T17:39:13.962+05:30"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.4","gitVersion":"62a84ede3cc9a334e8bc82160714df71e7d3a29e","modules":[],"allocator":"tcmalloc","environment":{"distmod":"windows","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2025-01-09T17:39:13.962+05:30"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Microsoft Windows 10","version":"10.0 (build 26100)"}}}
{"t":{"$date":"2025-01-09T17:39:13.962+05:30"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"port":0},"storage":{"dbPath":"C:\\Users\\yuvar\\.fiftyone\\var\\lib\\mongo"},"systemLog":{"destination":"file","path":"C:\\Users\\yuvar\\.fiftyone\\var\\lib\\mongo\\log\\mongo.log"}}}}
{"t":{"$date":"2025-01-09T17:39:13.964+05:30"},"s":"W",  "c":"STORAGE",  "id":22271,   "ctx":"initandlisten","msg":"Detected unclean shutdown - Lock file is not empty","attr":{"lockFile":"C:\\Users\\yuvar\\.fiftyone\\var\\lib\\mongo\\mongod.lock"}}
{"t":{"$date":"2025-01-09T17:39:13.964+05:30"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"C:/Users/yuvar/.fiftyone/var/lib/mongo","storageEngine":"wiredTiger"}}
{"t":{"$date":"2025-01-09T17:39:13.964+05:30"},"s":"W",  "c":"STORAGE",  "id":22302,   "ctx":"initandlisten","msg":"Recovering data from the last clean checkpoint."}
{"t":{"$date":"2025-01-09T17:39:13.965+05:30"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3513M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
{"t":{"$date":"2025-01-09T17:39:14.164+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:164389][11412:140712411694624], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 4 through 5"}}
{"t":{"$date":"2025-01-09T17:39:14.233+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:232947][11412:140712411694624], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 5 through 5"}}
{"t":{"$date":"2025-01-09T17:39:14.308+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:308036][11412:140712411694624], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Main recovery loop: starting at 4/256 to 5/256"}}
{"t":{"$date":"2025-01-09T17:39:14.309+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:308995][11412:140712411694624], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 4 through 5"}}
{"t":{"$date":"2025-01-09T17:39:14.397+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:397551][11412:140712411694624], file:index-3-3229428059843068611.wt, txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 5 through 5"}}
{"t":{"$date":"2025-01-09T17:39:14.460+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:460118][11412:140712411694624], file:index-3-3229428059843068611.wt, txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}}
{"t":{"$date":"2025-01-09T17:39:14.460+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:460118][11412:140712411694624], file:index-3-3229428059843068611.wt, txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)"}}
{"t":{"$date":"2025-01-09T17:39:14.462+05:30"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1736424554:462118][11412:140712411694624], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 3, snapshot max: 3 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 16"}}
{"t":{"$date":"2025-01-09T17:39:14.487+05:30"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":522}}
{"t":{"$date":"2025-01-09T17:39:14.488+05:30"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2025-01-09T17:39:14.490+05:30"},"s":"I",  "c":"STORAGE",  "id":4366408, "ctx":"initandlisten","msg":"No table logging settings modifications are required for existing WiredTiger tables","attr":{"loggingEnabled":true}}
{"t":{"$date":"2025-01-09T17:39:15.380+05:30"},"s":"I",  "c":"STORAGE",  "id":22262,   "ctx":"initandlisten","msg":"Timestamp monitor starting"}
{"t":{"$date":"2025-01-09T17:39:15.387+05:30"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2025-01-09T17:39:15.387+05:30"},"s":"W",  "c":"CONTROL",  "id":22140,   "ctx":"initandlisten","msg":"This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip <address> to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning","tags":["startupWarnings"]}
{"t":{"$date":"2025-01-09T17:39:15.391+05:30"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}}
{"t":{"$date":"2025-01-09T17:39:15.392+05:30"},"s":"I",  "c":"STORAGE",  "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"}
{"t":{"$date":"2025-01-09T17:39:15.393+05:30"},"s":"I",  "c":"CONTROL",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
{"t":{"$date":"2025-01-09T17:39:15.853+05:30"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"C:/Users/yuvar/.fiftyone/var/lib/mongo/diagnostic.data"}}
{"t":{"$date":"2025-01-09T17:39:15.854+05:30"},"s":"I",  "c":"REPL",     "id":6015317, "ctx":"initandlisten","msg":"Setting new configuration state","attr":{"newState":"ConfigReplicationDisabled","oldState":"ConfigPreStart"}}
{"t":{"$date":"2025-01-09T17:39:15.857+05:30"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"127.0.0.1"}}
{"t":{"$date":"2025-01-09T17:39:15.857+05:30"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":52882,"ssl":"off"}}
{"t":{"$date":"2025-01-09T17:39:18.615+05:30"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:52883","uuid":"16e20fa5-c648-41a5-a5f3-0ca60784be23","connectionId":1,"connectionCount":1}}
{"t":{"$date":"2025-01-09T17:39:18.630+05:30"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn1","msg":"client metadata","attr":{"remote":"127.0.0.1:52883","client":"conn1","doc":{"driver":{"name":"PyMongo","version":"4.8.0"},"os":{"type":"Windows","name":"Windows","architecture":"AMD64","version":"10.0.26100-SP0"},"platform":"CPython 3.8.20.final.0","application":{"name":"fiftyone"}}}}
{"t":{"$date":"2025-01-09T17:39:18.651+05:30"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:52884","uuid":"78d9404c-e9ca-4249-8875-5c9e5015a15f","connectionId":2,"connectionCount":2}}
{"t":{"$date":"2025-01-09T17:39:18.652+05:30"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:52885","uuid":"3148b7de-ee3d-4ea2-b6c4-3ecc2b4691cf","connectionId":3,"connectionCount":3}}
{"t":{"$date":"2025-01-09T17:39:18.668+05:30"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn2","msg":"client metadata","attr":{"remote":"127.0.0.1:52884","client":"conn2","doc":{"driver":{"name":"PyMongo","version":"4.8.0"},"os":{"type":"Windows","name":"Windows","architecture":"AMD64","version":"10.0.26100-SP0"},"platform":"CPython 3.8.20.final.0","application":{"name":"fiftyone"}}}}
{"t":{"$date":"2025-01-09T17:39:18.668+05:30"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn3","msg":"client metadata","attr":{"remote":"127.0.0.1:52885","client":"conn3","doc":{"driver":{"name":"PyMongo","version":"4.8.0"},"os":{"type":"Windows","name":"Windows","architecture":"AMD64","version":"10.0.26100-SP0"},"platform":"CPython 3.8.20.final.0","application":{"name":"fiftyone"}}}}
{"t":{"$date":"2025-01-09T17:39:19.529+05:30"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:52886","uuid":"edafbe3a-9c24-42b9-8e40-eac6af5d7904","connectionId":4,"connectionCount":4}}
{"t":{"$date":"2025-01-09T17:39:19.530+05:30"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn4","msg":"client metadata","attr":{"remote":"127.0.0.1:52886","client":"conn4","doc":{"driver":{"name":"PyMongo","version":"4.8.0"},"os":{"type":"Windows","name":"Windows","architecture":"AMD64","version":"10.0.26100-SP0"},"platform":"CPython 3.8.20.final.0"}}}
{"t":{"$date":"2025-01-09T17:39:19.533+05:30"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:52887","uuid":"e68d72f7-43cb-40bd-9f66-5b808b14556c","connectionId":5,"connectionCount":5}}
{"t":{"$date":"2025-01-09T17:39:19.543+05:30"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn5","msg":"client metadata","attr":{"remote":"127.0.0.1:52887","client":"conn5","doc":{"driver":{"name":"PyMongo","version":"4.8.0"},"os":{"type":"Windows","name":"Windows","architecture":"AMD64","version":"10.0.26100-SP0"},"platform":"CPython 3.8.20.final.0"}}}
{"t":{"$date":"2025-01-09T17:39:20.752+05:30"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn1","msg":"Interrupted operation as its client disconnected","attr":{"opId":52}}
{"t":{"$date":"2025-01-09T17:39:20.757+05:30"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn1","msg":"Connection ended","attr":{"remote":"127.0.0.1:52883","uuid":"16e20fa5-c648-41a5-a5f3-0ca60784be23","connectionId":1,"connectionCount":4}}
{"t":{"$date":"2025-01-09T17:39:21.633+05:30"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn4","msg":"Interrupted operation as its client disconnected","attr":{"opId":69}}
{"t":{"$date":"2025-01-09T17:39:21.634+05:30"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn4","msg":"Connection ended","attr":{"remote":"127.0.0.1:52886","uuid":"edafbe3a-9c24-42b9-8e40-eac6af5d7904","connectionId":4,"connectionCount":3}}
{"t":{"$date":"2025-01-09T17:39:28.068+05:30"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn2","msg":"Connection ended","attr":{"remote":"127.0.0.1:52884","uuid":"78d9404c-e9ca-4249-8875-5c9e5015a15f","connectionId":2,"connectionCount":2}}
{"t":{"$date":"2025-01-09T17:39:28.068+05:30"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn5","msg":"Connection ended","attr":{"remote":"127.0.0.1:52887","uuid":"e68d72f7-43cb-40bd-9f66-5b808b14556c","connectionId":5,"connectionCount":0}}
{"t":{"$date":"2025-01-09T17:39:28.068+05:30"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn3","msg":"Connection ended","attr":{"remote":"127.0.0.1:52885","uuid":"3148b7de-ee3d-4ea2-b6c4-3ecc2b4691cf","connectionId":3,"connectionCount":1}}

@kaixi-wang
Copy link
Contributor

Are those the latest logs? It doesn’t look like mongo has been running since Jan 9.

In your code, are you calling “import fiftyone” and using fiftyone objects directly? I don’t see it in your snippet. If not, you may need to start the mongo process separately.

If starting mongo separately doesn’t work, you might want to upgrade your version of mongo. The end of life of v5 was oct 2024 (https://www.mongodb.com/legal/support-policy/lifecycles)

@Noir0010
Copy link
Author

Noir0010 commented Feb 5, 2025

Hi @kaixi-wang,

This is my code, Do tell me if there is a edit to make.

  import fiftyone as fo
  import fiftyone.zoo as foz
  import warnings

  name = 'open-images-v7'
  fraction = 1.0  # fraction of full dataset to use
  LOGGER.warning('WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...')
  for split in 'train', 'validation':  # 1743042 train, 41620 val images
      train = split == 'train'

      # Load Open Images dataset
      dataset = foz.load_zoo_dataset(name,
                                     split=split,
                                     label_types=['detections'],
                                     datasetht_dir=Pa(SETTINGS['datasets_dir']) / 'fiftyone' / name,
                                     max_samples=round((1743042 if train else 41620) * fraction))

      # Define classes
      if train:
          classes = dataset.default_classes  # all classes
          # classes = dataset.distinct('ground_truth.detections.label')  # only observed classes

      # Export to YOLO format
      with warnings.catch_warnings():
          warnings.filterwarnings("ignore", category=UserWarning, module="fiftyone.utils.yolo")
          dataset.export(export_dir=str(Path(SETTINGS['datasets_dir']) / name),
                         dataset_type=fo.types.YOLOv5Dataset,
                         label_field='ground_truth',
                         split='val' if split == 'validation' else split,
                         classes=classes,
                         overwrite=train)

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