-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
tar has problems in a CIFS mount path with node 20 and node 18.18.0 #394
Comments
I'm not aware of any tar problems specific to node 20, that's interesting. And if it's also happening with node 18.18, then it's probably not node version specific. My guess is that you're probably correct that it has to do with the network file system in some way. What is the error that's raised? If it's a problem with the write stream, gzip, or tar, it should have a path, a code, message, etc. That would help figure out what syscall is actually failing. Does it work if you write the tarball to a local file and then stream it to the CIFS? Something like this: const tmpFile = '/tmp/backup.tgz'
const tmpWrite = fs.createWriteStream(tmpFile)
tar.create({ gzip: true, cwd: `${this.tmpDir}/` }, ['backup']).pipe(tmpWrite)
tmpWrite.on('close', () => {
fs.createReadStream(tmpFile).pipe(f)
}) Obviously not a real solution, since it's a bit wasteful, but could help illuminate what the issue is. |
Unfortunately, no errors are output. However, at the end of the day, this is not purposeful. The file must be written directly to the mount. |
The code snippet was only an example... |
It must be a change of behaviour between nodejs 18.17.1 and 18.18.0. |
Here are all the commits for the changes to the streams under Node 18.18.0 |
The problem seems to be known in Node and is probably on the todo list. |
It is a Problem from node ... |
@simatec Thanks for circling back! I was scratching my head about how to even go about investigating this lol |
😉 |
Hello all,
I hope you can help here... We use the package among other things for backups in the iobroker project and have with current node 20 versions and from node 18.18.0 problems with many users who write their backup directly with a CIFS mount on the Fritzbox NAS.
Currently, I am only aware of problems in connection with Fitzbox and CIFS.
It seems that all attempts since Node 18.18.0 have problems with "fs.createWriteStream" or with .pipe.
Locally on the system there are no problems. The error only occurs when the backup is to be written to the CIFS mount point.
Here is an excerpt of how the create of the backup is constructed.
Are there any known problems with Node 20 and are there any solutions or maybe an update from you?
The text was updated successfully, but these errors were encountered: