-1

I am trying to configure rethinkdb to start using init.d as explained in the docs but it's not working, instead am getting this error...

rethinkdb: instance1: Starting instance. (logging to `/home/mofax/rethinkdb/mobius/log_file')
Recursively removing directory /home/mofax/rethinkdb/mobius/tmp
Recursively removing directory /home/mofax/rethinkdb/mobius
In recursion: removing file /home/mofax/rethinkdb/mobius/log_file
In recursion: removing file /home/mofax/rethinkdb/mobius/tmp
In recursion: removing file /home/mofax/rethinkdb/mobius
Version: rethinkdb 2.0.1~0trusty (GCC 4.8.2)
error: Error in src/utils.cc at line 525:
error: Guarantee failed: [res == 0]  (errno 13 - Permission denied)     Fatal error: failed to delete '/home/mofax/rethinkdb/mobius'.
error: Backtrace:
error: Tue Apr 21 12:38:16 2015

   1: backtrace_t::backtrace_t() at ??:?
   2: format_backtrace(bool) at ??:?
   3: report_fatal_error(char const*, int, char const*, ...) at ??:?
   4: remove_directory_helper(char const*, stat const*, int, FTW*) at ??:?
   5: /lib/x86_64-linux-gnu/libc.so.6(+0xedd52) [0x7f243ed35d52] at 0x7f243ed35d52 (/lib/x86_64-linux-gnu/libc.so.6)
   6: /lib/x86_64-linux-gnu/libc.so.6(+0xee30b) [0x7f243ed3630b] at 0x7f243ed3630b (/lib/x86_64-linux-gnu/libc.so.6)
   7: remove_directory_recursive(char const*) at ??:?
   8: directory_lock_t::~directory_lock_t() at ??:?
   9: main_rethinkdb_porcelain(int, char**) at ??:?
   10: main+0x1f4 at ??:?
   11: __libc_start_main+0xf5 at 0x7f243ec69ec5 (/lib/x86_64-linux-gnu/libc.so.6)
   12: /usr/bin/rethinkdb() [0x6f85f9] at 0x6f85f9 ()
error: Exiting.
Trace/breakpoint trap (core dumped)

what could be the problem?

Alloys
  • 143
  • 1
  • 11
  • Is this the doc you're refering to? http://rethinkdb.com/docs/start-on-startup/ What commands have you ran in order to get this error? It seems you have a permissions problem. Are you running your commands with `sudo`? – Jorge Silva Apr 27 '15 at 16:53
  • yes, that's the doc, am using the command `sudo service rethinkdb start` – Alloys Apr 29 '15 at 07:06

1 Answers1

0

If you use the init script, the RethinkDB server will be run as user rethinkdb by default. It looks like it doesn't have permission to write to /home/mofax/rethinkdb.

Unless you've changed the user in the RethinkDB instance configuration file, I think you just need to run

$ chown -R rethinkdb:rethinkdb /home/mofax/rethinkdb

and then restart the service.

Daniel Mewes
  • 1,876
  • 14
  • 16