Closed guo-yu closed 10 years ago
Same problem here
@turingou @markszymik I can't reproduce it.
Is this the same issue? buffer.js:194 this.parent = new SlowBuffer(this.length); ^ RangeError: length > kMaxLength at new Buffer (buffer.js:194:21)
I have the exact same problem as seti123.... :(
@Nexum how can I reproduce it?
I#m trying to do this:
scp2.scp(distInfo.tempFile, {
host: serverConf.host,
username: serverConf.user,
path: serverConf.path + "/" + serverConf.file
}, function (err) {
info.success = !err;
cb(err, info);
})
the host and user are diffrent from my user and they use key based auth, i also tried adding the publicKey but it didnt change anything.
tempfile is a value like: "/home/nexum/data/foo.conf" and serverConf.path + "/" + serverConf.file will give you: "/home/otheruser/data/bar.conf"
@Nexum I've just updated this repo. Please have a try, and feedback. I am not sure that it fixed this issue.
I just tried, no change :(
Here is a full trace for you
[ERROR] 13:02:36 RangeError
RangeError: length > kMaxLength
at new Buffer (buffer.js:194:21)
at Parser.expect (/home/kienzler/public_html/nodejs/ape-rewritemanager/trunk/node_modules/scp2/node_modules/ssh2/lib/Parser.js:645:23)
at Parser.execute (/home/kienzler/public_html/nodejs/ape-rewritemanager/trunk/node_modules/scp2/node_modules/ssh2/lib/Parser.js:160:16)
at Socket.
@Nexum try to change the value of chunkSize in line 157.
Hm this function doesnt get called before the error...
@Nexum The log didn't show anything about scp2. Can you debug it and find the buggy source code. Maybe you need to console.log a lot.
Yep same here,
I'm on OpenBSD 5.4 GENERIC.MP amd64
@tehmoon even the latest? Show me your log.
This is my stack err log :
buffer.js:194
this.parent = new SlowBuffer(this.length);
^
RangeError: length > kMaxLength
at new Buffer (buffer.js:194:21)
at Parser.expect (/home/moon/work/hybris/deploy/node_modules/ssh2/lib/Parser.js:650:23)
at Parser.execute (/home/moon/work/hybris/deploy/node_modules/ssh2/lib/Parser.js:163:16)
at Socket.
And this is my code :
for(c = 0 ; hosts[argv.e].length > c; c++) {
var host = hosts[argv.e][c] + hostDomain; var options = { username: "deploy", host : hosts[argv.e][c] + hostDomain, port : 22, password: "*****", path : "~/" };
client.scp(argv.d, options, function (err) { if (err) { console.log(err); } else { console.log('[OK] File transferred for host : '.green + host + "."); hostDone.push(null); }});}
I tried to switch to the low level API but it seems to be very slow compared to the scp binary and it doesn't work with directories :(
Regards,
And yes even with the latest version wich is the 0.1.4. I even tried with you ninja version and i got : terminate called after throwing an instance of 'std::bad_alloc'
Regards,
@tehmoon I see. It's buffer error:
RangeError: length > kMaxLength
This is not the same issue, you can open another one.
看了一下服务器,文件是可以正常上传的,但出现一个没有catch的error如下:
node version: v0.10.12 npm version: 1.2.32 scp2: lastest