Where might fdbserver want to write?

I’m trying to find out why fdbserver exits immediately with “Fatal Error: File could not be written”. It doesn’t tell me where it tried to write, it gets started by fdbserver so stracing it isn’t obvious, and perusal of the fine source code didn’t get me very far.

I checked and the following locations are definitely readable and writable by the foundationdb user:

  • fdb.cluster and the directory it’s in
  • datadir
  • logdir

According to the documentation, these should be the only places where fdbserver tries to write.

Any hints?

Replying to myself, because I think this might be useful for others in the future, and it took me a while to find the problem.

“Fatal Error: File could not be written” was caused by a directory two levels up from datadir not having the ‘x’ permission for ‘others’. This is why fdbserver wasn’t able to write: it could not access its data directory.

I do believe that the log message could be improved by telling users what could not be written, but the fault here is entirely mine.

1 Like