[BUG] ServiceListenTimeout when using FiftyOne in Visual Studio Code
See original GitHub issueSystem information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04.7 LTS):
-
Linux Ubuntu 16.04 - FiftyOne installed from (pip or source):
- pip
- FiftyOne version (run
fiftyone --version): - 0.7.2
- Python version:
- 3.7.0
Commands to reproduce
As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue.
# commands here
python
import fiftyone
Describe the problem
Hello. Thank you for your product and your hard work. I have tried to install fiftyone on a remote server with Ubuntu 16.04 Below are the things I tried.
1.I tried running the following command before installing fiftyone, but I still have the below stacktrace:
pip install --upgrade pip setuptools wheel
2.I also tried:
pip install --index https://pypi.voxel51.com fiftyone-db-ubuntu1604
after installling fiftyone
3.Finally, I also installed mongoDB separately, but with no luck.
I have to mention that I also tried to install on a local Ubuntu 18.04.5 LTS system and this was ok. I was able to import the library in a python script.
If anything is unclear or you need more details, please let me know. Thank you
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
{“t”:{“$date”:“2021-02-04T16:19:47.231Z”},“s”:“I”, “c”:“CONTROL”, “id”:20697, “ctx”:“main”,“msg”:“Renamed existing log file”,“attr”:{“oldLogPath”:“/home/mars/.fiftyone/var/lib/mongo/log/mongo.log”,“newLogPath”:“/home/mars/.fiftyone/var/lib/mongo/log/mongo.log.2021-02-04T16-19-47”}} Subprocess [‘/usr/bin/mongod’, ‘–dbpath’, ‘/home/mars/.fiftyone/var/lib/mongo’, ‘–logpath’, ‘/home/mars/.fiftyone/var/lib/mongo/log/mongo.log’, ‘–port’, ‘0’, ‘–nounixsocket’] exited with error 100: Uncaught exception Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/init.py”, line 28, in <module> from fiftyone.public import * File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/public.py”, line 11, in <module> _database_service = fos.DatabaseService() File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/core/service.py”, line 199, in init super().init() File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/core/service.py”, line 80, in init self.start() File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/core/service.py”, line 287, in start food.set_default_port(self.port) File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/core/service.py”, line 277, in port return self._wait_for_child_port() File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/core/service.py”, line 178, in _wait_for_child_port return find_port() File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/retrying.py”, line 49, in wrapped_f return Retrying(*dargs, **dkw).call(f, *args, **kw) File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/retrying.py”, line 212, in call raise attempt.get() File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/retrying.py”, line 247, in get six.reraise(self.value[0], self.value[1], self.value[2]) File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/six.py”, line 703, in reraise raise value File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/retrying.py”, line 200, in call attempt = Attempt(fn(*args, **kwargs), attempt_number, False) File “/home/mars/anaconda3/envs/fifty/lib/python3.7/site-packages/fiftyone/core/service.py”, line 176, in find_port raise ServiceListenTimeout(etau.get_class_name(self), port) fiftyone.core.service.ServiceListenTimeout: fiftyone.core.service.DatabaseService failed to bind to port
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:18 (7 by maintainers)
Top Related StackOverflow Question
@benjaminpkane Awesome, thank you!
In the meantime, I found a workaround for VSCode for others, as long as they’re not using
mongodbfor other things (I think). Worth a try at least.Define a task to kill any mongodb processes before running debug:
In
tasks.json:And in
launch.json:The key is the
preLaunchTaskabove. Note if switching between debugging and the command line, you’ll need to manually runpkill mongod.I was able to reproduce. Will resolve ASAP.