Open GabyCT opened 8 years ago
Seems that is an issue related to 9p shared rootfs adding label for 9p
I agree, it is almost definitely due to use of 9p. I don't think it is a bug with 9p though, just a feature (as implied in the error message), that 9p cannot do memory mapped files (we should verify that is true). If we look at the arangodb hub page (https://hub.docker.com/_/arangodb/), in the 'Persistant data' section, then we can see that 'normally' the directory in question could/would be mapped as a docker volume - so we should try that test as well - if that still fails then we really do have an issue :-) Nice find btw.
I put a volume to the container docker run -ti --name containertest -e ARANGO_ROOT_PASSRD=secretword -e ARANGO_NO_AUTH=1 -p 8529:8529 -v /tmp/arangodb:/var/lib/arangodb3 arangodb However, the error is still there cannot memory map file '/var/lib/arangodb3/journals/logfile-5.db': 'system error' The database directory might reside on a shared folder (VirtualBox, VMWare) or an NFS mounted volume which does not allow memory mapped files. unable to create logfile '/var/lib/arangodb3/journals/logfile-5.db': system error unable to create logfile: system error unable to create new WAL reserve logfile: system error
Tested using CC 2.1 and the error is still there
A quick update. It was mentioned in a call that this might be an 'ENV' issue and that we fixed that - I re-tested, and it still fails with my code (v2.1.6). Looking again at the errors from arrango, I'm fairly sure this might be a 9pfs related mmap issue. Looking briefly at the kernel 9p code, there is a lot of mmap code in there, but it is not clear to me if this is host or client side, and it looks like there are a number of permutations in the code (around types of caching etc.): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/9p/vfs_file.c#n631 So, to get to the bottom of this I believe will take a bunch of kernel digging and diagnostics around the 9pfs calls, and what actually fails.
Hi @GabyCT , Please have a look at https://github.com/01org/cc-oci-runtime/issues/949, where a root cause for mmap issues in 9p. Please use: mount -t 9p -o trans=virtio test_mount /tmp/shared/ -oversion=9p2000.L,posixacl,cache=fscache cache=fscache enables writeable mmaps to be allowed. Please let me know if this fixes the issue for you
It is not possible to start an arangodb instance. Using the arangodb image from docker hub (docker pull arangodb/arangodb)
docker run -ti --name containertest -e ARANGO_ROOT_PASSWORD=secretword -e ARANGO_NO_AUTH=1 -p 8529:8529 arangodb/arangodb
It is showing the following error Initializing database...Hang on... cannot memory map file '/var/lib/arangodb3/journals/logfile-13.db': 'system error' The database directory might reside on a shared folder (VirtualBox, VMWare) or an NFS mounted volume which does not allow memory mapped files. unable to create logfile '/var/lib/arangodb3/journals/logfile-13.db': system error unable to create logfile: system error unable to create new WAL reserve logfile: system error