Failed to unlink socket file for database spawn error

Hello,

I recently ran into a database error that none of the available solution on the forum were able to resolve this. I tried backing up and resynchronizing the cryosparc_database file but it didn’t help. The log database output is as follows:

2022-06-21T14:31:34.043-0400 I CONTROL [initandlisten] db version v3.4.10
2022-06-21T14:31:34.043-0400 I CONTROL [initandlisten] git version: 078f28920cb24de0dd479b5ea6c66c644f6326e9
2022-06-21T14:31:34.043-0400 I CONTROL [initandlisten] allocator: tcmalloc
2022-06-21T14:31:34.043-0400 I CONTROL [initandlisten] modules: none
2022-06-21T14:31:34.044-0400 I CONTROL [initandlisten] build environment:
2022-06-21T14:31:34.044-0400 I CONTROL [initandlisten] distarch: x86_64
2022-06-21T14:31:34.044-0400 I CONTROL [initandlisten] target_arch: x86_64
2022-06-21T14:31:34.044-0400 I CONTROL [initandlisten] options: { net: { port: 39001 }, replication: { oplogSizeMB: 64, replSet: “meteor” }, storage: { dbPath: “/gpfs/ysm/project/klein/jz649/software/cryosparc2/cryosparc_database”, journal: { enabled: false }, wiredTiger: { engineConfig: { cacheSizeGB: 4.0 } } } }
2022-06-21T14:31:34.092-0400 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-39001.sock Operation not permitted
2022-06-21T14:31:34.092-0400 I - [initandlisten] Fatal Assertion 28578 at src/mongo/util/net/listen.cpp 195
2022-06-21T14:31:34.092-0400 I - [initandlisten]

I also tried to manually remove the /tmp/mongodb-39001.sock file, but it gave me a fatal warning and did not allow me to delete it. Any suggestion on how to proceed? Thank you very much! Any reply will be kindly appreciated.

Best,
Tiffany

Welcome to the forum @Tiff .

Is it possible that there are several Linux user accounts trying to run cryoSPARC on this computer?
What is the Linux username under which you are trying to run cryoSPARC?
And who owns the the file:
ls -l /tmp/mongodb-39001.sock

Dear wtempel,

Thanks for your reply! Yes there are two user accounts running cryoSPARC on this computer. I’m not sure why this .sock file disappeared today…and now everything is fine :rofl:. That’s weird. If this happens again, should we figure out who owns the .sock file and then try to delete it?

Best,
Tiff

One should not try nor have to delete a mongodb-*.sock file that belongs to another user.
Running more than one cryoSPARC instance on the same computer requires coordination between the instances and the users who manage them:

To avoid additional problems, the cryoSPARC instance(s) on this computer need to be brought into compliance with these requirements as soon as possible. In addition, these restrictions need to be considered for potential additional cryoSPARC installations on this computer.
On your machine, it appears that at least two cryoSPARC instances’ network port ranges overlap.
I recommend that you identify a suitable, continuous range of 11 unused network ports, possibly 39020 thru 39030 (please confirm these ports aren’t otherwise used) and run (see guide)
cryosparcm changeport 39020
.

1 Like