2

This is an error that I've been running into lately when I go to start a fresh instance of a fiftyone. Here it is:

Process 8027 (service/main.py --51-service db --multi) did not respond
{"t":{"$date":"2022-12-13T12:43:10.939Z"},"s":"I",  "c":"CONTROL",  "id":20697,   "ctx":"-","msg":"Renamed existing log file","attr":{"oldLogPath":"/home/isaac/.fiftyone/var/lib/mongo/log/mongo.log","newLogPath":"/home/isaac/.fiftyone/var/lib/mongo/log/mongo.log.2022-12-13T12-43-10"}}
Subprocess ['/home/isaac/.local/lib/python3.8/site-packages/fiftyone/db/bin/mongod', '--dbpath', '/home/isaac/.fiftyone/var/lib/mongo', '--logpath', '/home/isaac/.fiftyone/var/lib/mongo/log/mongo.log', '--port', '0', '--nounixsocket'] exited with error 100:

I have a solution but it feels more like a temporary fix because the error reoccurs when I reboot my computer.

Anybody have permanent solution?

2 Answers2

1

Here's my temporary fix:

This will delete all stored data you have in fiftyone

  1. pip3 uninstall fiftyone
  2. rm -r /home/user/.fiftyone/var/lib/mongo
  3. pip3 install fiftyone

This is a pretty lame fix as I have to do this every time I restart and want to start a fiftyone instance. If anybody has something better I'd love to hear it!

1

This is happening after your kernel is dying unexpectedly. It leaves the Mongo Database running.

You can check for this in two steps:

  1. run by hand the same command as FiftyOne. You have the path to it in the Subprocess [...] log line. In your case, run this in your terminal:
    /home/isaac/.local/lib/python3.8/site-packages/fiftyone/db/bin/mongod --dbpath '/home/isaac/.fiftyone/var/lib/mongo' --port 0 --nounixsocket

(extracted from the error you posted by removing the quotes and commas where necessary, as well as the log path argument)

You will then see the error messages, which includes something like this:

{"t":{"$date":"2023-08-21T10:01:46.459+00:00"},"s":"E",  "c":"CONTROL",  "id":20557,   "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":{"error":"DBPathInUse: Unable to lock the lock file: /home/isaac/.fiftyone/var/lib/mongo/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /home/isaac/.fiftyone/var/lib/mongo directory"}}

This clearly says there is another mongod running (the error: part of the message). Which brings us to the second step:

  1. run ps -ef | grep [m]ongo in another terminal window. You will see one line with the running process.
isaac  31820     1  1 08:47 ?        00:01:03 /home/isaac/miniconda3/envs/test-env/lib/python3.9/site-packages/fiftyone/db/bin/mongod --dbpath /home/isaac/.fiftyone/var/lib/mongo --logpath /home/isaac/.fiftyone/var/lib/mongo/log/mongo.log --port 0 --nounixsocket

This is what was left behind by the crashed kernel. You have to stop it:

kill 31820

The number is the process ID that appeared in the second column in the ps output. If it doesn't work, you can do kill -9 31820 (a more aggressive process termination).

If you did the regular kill (without -9), then all should be good, you can restart your kernel and import fiftyone.

But if you had to use -9, then it is possible that the lock file is lingering on the disk. You have to remove it. Find the path in the initial error message and remove that file: rm /home/isaac/.fiftyone/var/lib/mongo/mongod.lock

Now all should be OK.

Ciprian Tomoiagă
  • 3,773
  • 4
  • 41
  • 65