RethinkDB在启动时启动

时间:2015-04-27 08:23:02

标签: ubuntu-14.04 rethinkdb

我正在尝试将rethinkdb配置为开始使用init.d,如文档中所述,但它不起作用,而是收到此错误...

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)

可能是什么问题?

1 个答案:

答案 0 :(得分:0)

如果使用init脚本,默认情况下,RethinkDB服务器将以用户rethinkdb运行。看起来它没有权限写入/home/mofax/rethinkdb

除非您在RethinkDB实例配置文件中更改了用户,否则我认为您只需要运行

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

然后重启服务。