Closed endyjasmi closed 7 months ago
Hm I haven't seen that issue, but WSL isn't something I've been testing node-fdb against. Are you using the linux package or foundationdb for windows?
It should work ok using the linux package if you're in WSL, but I haven't tried it so I'm not too surprised that there's a configuration issue to sort out. It might be misdetecting wsl as windows or something like that.
Hey, thanks for the prompt reply. I am currently using FoundationDB for windows.
After going through the documentation, my current thought is that as long as the client have access to fdb.cluster
and also libfdb_c.so
it should successfully install.
Assuming my thought are correct, the next question would be, where do I put those file under linux.
As a last resort, I am considering uninstall the FoundationDB for Windows and install the ubuntu version.
Yeah it should work fine using foundationdb for windows and the foundationdb client inside wfl. The easiest way to get that set up is to to install the foundationdb client library in linux, and like you've already done, copy over the fdb.cluster
file so you can connect to the windows server from inside wfl. Assuming you're using ubuntu, the .deb package for the foundationdb client is on that downloads page you linked.
It should also work if you just install the libfdb_c.so
. FDB searches for this in a few places - apparently the default place on linux is /usr/lib
but you can set it up to look in some other locations too.
But yeah, try installing the client library inside WFL then re-installing the node foundationdb library. Let me know how it goes
I tried downloading libfdb_c.so
and put it inside /usr/lib
. npm install
works flawlessly, sadly any operation throws this;
[FDBError: Action not possible before the network is configured] {
code: 2008
}
/c/Project/couchplus/monorepo/playground/foundationdb/node_modules/foundationdb/dist/lib/index.js:27
process.on('exit', () => native_1.default.stopNetwork());
^
FDBError: Action not possible before the network is configured
at process.<anonymous> (/c/Project/couchplus/monorepo/playground/foundationdb/node_modules/foundationdb/dist/lib/index.js:27:47)
at process.emit (events.js:209:13) {
code: 2008
}
Typing fdbcli --exec status
in WSL bash yield ERROR: Disk i/o operation failed (1510)
. Further research and found https://forums.foundationdb.org/t/foundationdb-does-not-run-on-windows-subsystem-for-linux-wsl/809.
So, the conclusion would be FoundationDB DOES NOT run on Window Subsystem for Linux even the FoundationDB client.
So, for now I am stucked switching between Powershell and WSL Bash. Any other idea? If not maybe we can close this issues.
Sadly not. WSL2 should fix this issue when it arrives, so apparently fixing WSL compatibility isn't a high priority. This is also one of those issues that would be fixed with a standard wire protocol - which is under discussion at the moment.
So, sorry - no other solutions for now. Hopefully soon we can revisit this with some better answers.
I have installed FoundationDB 6.1.12 on my Windows 10 machine using the installer downloaded from Foundation Official Site.
Everything works if I am running the NodeJS process with Powershell but my main development environment is Window Subsystem for Linux (WSL), everytime I tried to
npm install foundationdb
, it errored out with the following log:I am not sure how to proceed from there. Any help would be greatly appreciated.