ssbc / ssb-server

The gossip and replication server for Secure Scuttlebutt - a distributed social network
1.69k stars 164 forks source link

Error: ENOENT: no such file or directory, rename gossip.json~ -> gossip.json #745

Open hjacobs opened 3 years ago

hjacobs commented 3 years ago

I’m trying to set up a local pub server with Docker by following the blog post Setting up SSB-Pub Server. It all works and I could generate and redeem an invite, but the ssb-server process periodically is down (restarting) and I see the following error in the logs:

ssb-server 15.3.0 /root/.ssb logging.level:notice
... 
{ [Error: ENOENT: no such file or directory, rename '/root/.ssb/gossip.json~' -> '/root/.ssb/gossip.json']
  errno: -2,
  code: 'ENOENT',
  syscall: 'rename',
  path: '/root/.ssb/gossip.json~',
  dest: '/root/.ssb/gossip.json' }

Can someone help me with this gossip.json~ error and what it means? gossip.json exists btw, but not gossip.json~. It looks like the same error as #597 (but #597 has no resolution?).

So while I haven’t found the reason for this ENOENT error, ssb-server generally works fine. Maybe it’s some race condition? If this is expected behavior for atomic file operations, it should at least not log an ERROR I guess?

staltz commented 3 years ago

https://github.com/flumedb/atomic-file

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?