Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to determine absolute path for Metadata (Docker - Linux on Windows) for bind-mount volume #7086

Open
ibpme opened this issue Aug 15, 2022 · 0 comments

Comments

@ibpme
Copy link

ibpme commented Aug 15, 2022

Running RethinkDB inside a Docker container running on Windows with a bind-mount volume will give the following error when we try customize the database initialization with the following command before building from image.
While running it with Docker on Linux provides no Error.

rethinkdb create
  • Image rethinkdb:2.4.2
  • Running on Linux 4.19.128-microsoft-standard x86_64

Error in Docker

rethinkdb  | Recursively removing directory rethinkdb_data/tmp
rethinkdb  | Version: rethinkdb 2.4.2~0bullseye (GCC 10.2.1)
rethinkdb  | error: Error in thread 8 in src/arch/io/disk.cc at line 645:
rethinkdb  | error: Guarantee failed: [abs_res != nullptr]  (errno 2 - No such file or directory) Failed to determine absolute path for 'rethinkdb_data/metadata'
rethinkdb  | error: Backtrace:
rethinkdb  | error: Mon Aug 15 03:47:31 2022
rethinkdb  |
rethinkdb  |        1 [0x55bfa4e9cfcf]: backtrace_t::backtrace_t() at 0x55bfa4e9cfcf (rethinkdb)
rethinkdb  |        2 [0x55bfa4e9d5c2]: lazy_backtrace_formatter_t::lazy_backtrace_formatter_t() at 0x55bfa4e9d5c2 (rethinkdb)
rethinkdb  |        3 [0x55bfa4e9d6c8]: format_backtrace[abi:cxx11](bool) at 0x55bfa4e9d6c8 (rethinkdb)
rethinkdb  |        4 [0x55bfa4a2e536]: report_fatal_error(char const*, int, char const*, ...) at 0x55bfa4a2e536 (rethinkdb)
rethinkdb  |        5 [0x55bfa5165ddc]: fsync_parent_directory(char const*) at 0x55bfa5165ddc (rethinkdb)
rethinkdb  |        6 [0x55bfa51661e3]: warn_fsync_parent_directory(char const*) at 0x55bfa51661e3 (rethinkdb)
rethinkdb  |        7 [0x55bfa49ec211]: filepath_file_opener_t::move_serializer_file_to_permanent_location() at 0x55bfa49ec211 (rethinkdb)
rethinkdb  |        8 [0x55bfa4baa9ad]: metadata_file_t::metadata_file_t(io_backender_t*, base_path_t const&, perfmon_collection_t*, std::function<void (metadata::write_txn_t*, signal_t*)> const&, signal_t*) at 0x55bfa4baa9ad (rethinkdb)
rethinkdb  |        9 [0x55bfa4be8b50]: run_rethinkdb_create(base_path_t const&, name_string_t const&, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, optional<unsigned long>, file_direct_io_mode_t, int, bool*) at 0x55bfa4be8b50 (rethinkdb)
rethinkdb  |        10 [0x55bfa4bea97c]: std::_Function_handler<void (), std::_Bind<void (*(base_path_t, name_string_t, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, optional<unsigned long>, file_direct_io_mode_t, int, bool*))(base_path_t const&, name_string_t const&, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, optional<unsigned long>, file_direct_io_mode_t, int, bool*)> >::_M_invoke(std::_Any_data const&) at 0x55bfa4bea97c (rethinkdb)
rethinkdb  |        11 [0x55bfa5151071]: starter_t::run_wrapper(std::function<void ()> const&) at 0x55bfa5151071 (rethinkdb)
rethinkdb  |        12 [0x55bfa514ed1d]: coro_t::run() at 0x55bfa514ed1d (rethinkdb)
rethinkdb  | error: Exiting.
rethinkdb exited with code 133

Recreating error

Dockerfile

FROM rethinkdb:2.4.2

RUN apt-get update && apt-get install -y --no-install-recommends \
    wget && \
    apt-get autoremove -y && \
    apt-get clean


VOLUME ["/data"]
WORKDIR /data

EXPOSE 28015 8080

CMD ["rethinkdb", "create"]

Docker-Compose file

services:
  rethinkdb:
    container_name: rethinkdb
    build: ./rethinkdb
    ports:
      - 28015:28015
      - 8080:8080
    networks:
      - default
    volumes:
      - ./data/rethinkdb_data:/data/rethinkdb_data
networks:
  default:
    name: rethinkdb
    driver: bridge
  • Even if the build failed on error, it will have created the rethinkdb_data/metadata file. But the database will have many issues and refusing connections at certain times.
  • This issue only persist when we try to use a bind-mount volume in docker and not on a regular docker volume.

Comments :

  • Is it possible issues like this happens because RethinkDB isn't fully supported for Windows Docker Containers ?
  • I assume RethinkDB will create metadata and the needed directories on initialization ? Regardless, the error will only be shown if I run it inside a Docker Container with bind-mount from Windows.
@ibpme ibpme changed the title Failed to determine absolute path for Metadata (Docker - Linux on Windows) Failed to determine absolute path for Metadata (Docker - Linux on Windows) for bind-mount volume Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant