Open Error: IO error Invalid argument
See original GitHub issueHi, 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:
var
level = require('level'),
express = require('express'),
uuid = require('node-uuid'),
db = level('./users.db', {valueEncoding: 'json'}),
app = module.exports = express();
app.use(express.logger('dev'));
app.use(app.router);
app.get('/users', function(req, res) {
db.get('users', function(err, users) {
if (err) return res.json(404, err);
return res.json(200, users);
});
});
app.post('/user', function(req, res) {
db.put('users', req.body.user, function(err) {
if (err) return res.json(404, err);
return res.json(200);
});
});
app.listen(5000, function() {
console.log('LevelDB API running on port 5000');
});
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!
Issue Analytics
- State:
- Created 10 years ago
- Comments:23 (5 by maintainers)
Top Results From Across the Web
xslt - xsltproc on windows: I/O error: invalid argument if ...
It seems that xsltproc is not aware of drive letters (" C:\path\to\output\output.html "). The spaces and backslashes are no problem. If I remove ......
Read more >Error Codes (The GNU C Library)
“Invalid argument.” This is used to indicate various kinds of problems with passing the wrong argument to a library function. Macro: int EMFILE...
Read more >Copying files from USB drive fails - I/O error or Invalid Argument
Based on the cp commands output, it looks like you listed the fdisk output of the disk you are recovering files to, rather...
Read more >SERVER STARTUP HANGS WITH JAVA.IO.IOEXCEPTION
It appears to hang and eventually times out. The exception "java.io.IOException: Invalid argument at sun.nio.ch.DevPollArrayWrapper.poll0" is seen in FFDC. The ...
Read more >Resolving "File open error (Invalid argument(22))"
This error occurs when there is a problem with the filename being opened. There are two known causes, the file location being invalid...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
mmap
bug. You can happily create databases on your OS X host operating system, and volume map them to the xhyve docker host and it works beautifully! Woo!You can read more about the new docker here and get the full docs here
It is a glorious day!
Hmm. Not sure what it could be. Most likely not an
mmap()
issue then which is the focus of this issue thread. I’d open up a new issue with some clear steps and code to replicate the issue.