question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fiftyone.core.service.DatabaseService failed to bind to or

See original GitHub issue

Hi guys,

I hope you are doing great

🐛 Bug

If I import Trainer

from flash import Trainer

I got the following error:

{"t":{"$date":"2021-08-05T07:47:51.890Z"},"s":"I",  "c":"CONTROL",  "id":20697,   "ctx":"main","msg":"Renamed existing log file","attr":{"oldLogPath":"/home/zuppif/.fiftyone/var/lib/mongo/log/mongo.log","newLogPath":"/home/zuppif/.fiftyone/var/lib/mongo/log/mongo.log.2021-08-05T07-47-51"}}
Subprocess ['/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/db/bin/mongod', '--dbpath', '/home/zuppif/.fiftyone/var/lib/mongo', '--logpath', '/home/zuppif/.fiftyone/var/lib/mongo/log/mongo.log', '--port', '0', '--nounixsocket'] exited with error 100:
Uncaught exception
Traceback (most recent call last):
  File "/home/zuppif/gust-torchvision/playground.py", line 7, in <module>
    from flash import Trainer
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/flash/__init__.py", line 23, in <module>
    from flash.core.data.data_module import DataModule  # noqa: E402
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/flash/core/data/data_module.py", line 30, in <module>
    from flash.core.data.data_pipeline import DataPipeline, DefaultPreprocess, Postprocess, Preprocess
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/flash/core/data/data_pipeline.py", line 27, in <module>
    from flash.core.data.batch import _DeserializeProcessor, _Postprocessor, _Preprocessor, _Sequential, _SerializeProcessor
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/flash/core/data/batch.py", line 22, in <module>
    from flash.core.data.data_source import DefaultDataKeys
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/flash/core/data/data_source.py", line 47, in <module>
    from fiftyone.core.collections import SampleCollection
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/__init__.py", line 25, in <module>
    from fiftyone.__public__ import *
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/__public__.py", line 11, in <module>
    _database_service = fos.DatabaseService()
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/core/service.py", line 203, in __init__
    super().__init__()
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/core/service.py", line 81, in __init__
    self.start()
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/core/service.py", line 293, in start
    food.set_default_port(self.port)
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/core/service.py", line 283, in port
    return self._wait_for_child_port()
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/core/service.py", line 180, in _wait_for_child_port
    return find_port()
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/retrying.py", line 212, in call
    raise attempt.get()
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/six.py", line 719, in reraise
    raise value
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/zuppif/gust-torchvision/venv/lib/python3.8/site-packages/fiftyone/core/service.py", line 178, in find_port
    raise ServiceListenTimeout(etau.get_class_name(self), port)
fiftyone.core.service.ServiceListenTimeout: fiftyone.core.service.DatabaseService failed to bind to or

To Reproduce

from flash import Trainer

Code sample

from flash import Trainer
  • PyTorch Version (e.g., 1.0): 1.9.0+cu102
  • OS (e.g., Linux): Ubuntu server 20.04
  • How you installed PyTorch (conda, pip, source): pip
  • Build command you used (if compiling from source):
  • Python version: 3.8.10
  • CUDA/cuDNN version: 10.2
  • GPU models and configuration:
  • Any other relevant information:

Thanks 😃

Francesco

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ethanwharriscommented, Aug 6, 2021

Hi @FrancescoSaverioZuppichini glad you got it working. FiftyOne is a visualization tool that can be used directly with flash. Read more here: https://lightning-flash.readthedocs.io/en/latest/integrations/fiftyone.html

0reactions
FrancescoSaverioZuppichinicommented, Aug 9, 2021

Thank you! Definitely a feature I will be using 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] fiftyone.core.service.DatabaseService failed to bind to port
DatabaseService failed to bind to port #1499 ... Its getting following error whenever I try to import fiftyone.core.service.
Read more >
fiftyone.core.service - Voxel51
Exception raised when a network-bound service fails to bind to a port. args. with_traceback (). Exception.with_traceback(tb) – set self.
Read more >
Install Troubleshooting — FiftyOne 0.18.0 documentation
This error occurs when attempting to install FiftyOne with an unsupported ... then FiftyOne's database service will attempt to start up on import...
Read more >
Frequently Asked Questions — FiftyOne 0.18.0 documentation
Can I connect to multiple remote sessions? Yes, you can launch multiple instances of the App locally, each connected to a different remote...
Read more >
fiftyone.core.odm.database - Voxel51
If fiftyone.config.database_uri is defined, then we connect to that URI. Otherwise, a fiftyone.core.service.DatabaseService is created. Parameters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found