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
Open Error: IO error Invalid argument #222
Comments
I'm using Ubuntu 12.04 LTS |
obvious starting questions are:
|
Well there is no cluster running, it's a simple and small app which I built just to learn LevelUp. This is my drwxr-xr-x 1 vagrant vagrant 204 Dec 12 23:55 .
drwxr-xr-x 1 vagrant vagrant 476 Dec 12 16:54 ..
-rw-r--r-- 1 vagrant vagrant 1526 Dec 12 23:55 app.js
drwxr-xr-x 1 vagrant vagrant 272 Dec 12 23:48 node_modules
-rw-r--r-- 1 vagrant vagrant 381 Dec 12 23:48 package.json
drwxr-xr-x 1 vagrant vagrant 340 Dec 12 23:55 users.db Another detail, my ubuntu 12.04 LTS is a vagrant virtual machine. |
I'm not really much of an expert with vagrant but does your app run as user 'vagrant'? Perhaps it's not and therefore doesn't have write access to the users.db directory? |
Vagrant is just a Ubuntu VM sharing the same project directory with my Mac. |
there are known problems with leveldb and virtualbox: https://groups.google.com/forum/#!topic/leveldb/MjFwXk6_RgY (and more but can't find the link) |
Yeah! I having the same problem using ubuntu virtualbox :-/ |
many developers use vagrant so this is kinda important...anyone? |
ah yes, I remember this issue now, it popped up somewhere else but I'm not sure where... I'm wondering if this might change with leveldb 1.15.0 given they've moved away from mmap writes, it'll be worth trying out when we upgrade leveldown. |
+1 A workaround seems to be to simply symlink the db folder from a non-shared location. Of course this only works if you're not interested in sharing the db between host and guest. |
+1 This solve my problem! Thanks! |
I'm having the same problem. It's also effecting the lmdb leveldown driver too (I guess because it would use mmap). fingers crossed that the new leveldb fixes the problem. I'm doing development with virtualbox and docker images, and coming up against this issue when using synced folders from vagrant into docker. I wonder if the same problem occurs with using an nfs share? |
OK. mmap works with nfs. So just add this to your
I've tested this with the coreos image, and it works great. |
The core issue is to do with a bug in virtualbox: https://www.virtualbox.org/ticket/819#comment:55 I was able to replicate the problem on any vboxfs partition with this code: https://gist.github.com/eugeneware/9045290 So it's not really leveldb related at all. For now, use the nfs workaround, and please upvote my bug on the oracle virtualbox bugtracker to try to get this resolved quickly! :-) |
And retweet this for good measure :-) https://twitter.com/EugeneWare/status/435288808490143744 |
I had the same problem running bitcoind (which uses leveldb) in a mounted folder with boot2docker. Fixed it by mounting the folder with nfs instead of vboxfs and wrote a script to do the switch automatically: https://gist.github.com/olalonde/3f7512c0bd2bc8abb46d |
Great news everyone (/cc @groundwater), the latest version of docker (you can register for at https://beta.docker.com/) which does NOT require virtualbox (uses xhyve under the hood - with the native hypervisor that comes with OS X) - doesn't suffer from this You can read more about the new docker here and get the full docs here It is a glorious day! |
Not sure if anyone is watching this anymore, but I am experiencing similar symptoms running Docker for Windows beta. I have an Ubuntu image that does some LevelDB stuff (not sure what exactly as its third party) and I get this error:
In the Windows host I see Windows for Docker uses Windows Hyper-V to run a Moby Linux VM which acts as the host OS for the docker client. The Windows volume is therefore mapped to the Moby Linux VM which I then mount with If I don't hear anything I'll open another issue, I just didn't want to clutter the open issues with this if it is already solved. |
I don't run windows, but it could be that |
I don't believe bash is being emulated in this scenario. I believe Moby Linux is being virtualized (by way of hypervisor) and then it is running a docker host which is in turn running a docker container which is running the code. That being said, I'll do a bit of googling to see if I can find any outstanding problems with Also, I don't currently have a setup that would let me easily compile/run that gist in Windows. :/ |
I've wrapped everything into a docker image so you can test. Check out the details here |
Both tests passed:
|
Hmm. Not sure what it could be. Most likely not an |
Hi, this is my first time using and learning about LevelDB with Node.js, and my simple app, can't run, this is my simple code:
And when I run: node app
It throws the error:
OpenError: IO error: ./users.db/MANIFEST-000001: Invalid argument
I am using latest stable: Node.js 0.10.23
Does anybody can help me? Thanks!
The text was updated successfully, but these errors were encountered: