voxel51 / fiftyone

Refine high-quality datasets and visual AI models
https://fiftyone.ai
Apache License 2.0
8.87k stars 563 forks source link

[SETUP-BUG] `fiftyone.core.service.DatabaseService failed to bind to port` on Colab with PyTorch-Lightning #1376

Closed ethanwharris closed 1 year ago

ethanwharris commented 3 years ago

System information

Commands to reproduce

As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue. Application steps can be described in the next section.

## From colab notebook
!pip install fiftyone pytorch-lightning

# Reset runtime
import fiftyone

Describe the problem

Installing pytorch lightning alongside fiftyone in a colab notebook causes fiftyone to break on import with the error:

ServiceListenTimeout: fiftyone.core.service.DatabaseService failed to bind to port

This is working fine on my local environment

benjaminpkane commented 3 years ago

Thanks @ethanwharris. I can reproduce. Looking into it

Zhivago-Sizov commented 2 years ago

apt install -y libcurl4 work for me.

brimoor commented 1 year ago

This is no longer an issue as of fiftyone==0.18.

titiviking commented 8 months ago

I'm still facing the issue when running CodeProject AI Server 2.5.4

13:41:49:TrainingObjectDetectionYOLOv5.py: Subprocess ['/app/modules/TrainingObjectDetectionYOLOv5/bin/linux/python38/venv/lib/python3.8/site-packages/fiftyone/db/bin/mongod', '--dbpath', '/app/modules/TrainingObjectDetectionYOLOv5/fiftyone', '--logpath', '/app/modules/TrainingObjectDetectionYOLOv5/fiftyone/log/mongo.log', '--port', '0', '--nounixsocket'] exited with error -4:
13:42:43:TrainingObjectDetectionYOLOv5.py: Unable to import and initialise the fiftyone.zoo package: fiftyone.core.service.DatabaseService failed to bind to port
benjaminpkane commented 8 months ago

Hi @titiviking. If you open a new issue with reproduction steps we can try to help. Failing to bind to port usually means an OS or network issue, e.g. /etc/hosts missing 127.0.0.1 localhost. Alternatively, you can connect to your own MongoDB databaset to avoid the issue.