Couchbase 多服务器设置问题
Couchbase Multi-Server Setup Issue
我们的 couchbase 服务器设置有三个 EC2 实例,第一个实例只有数据库服务 运行ning,第二个实例有索引服务 运行ning,第三个实例有查询服务 运行宁。
索引和查询服务器使用 couchbase web 控制台添加到数据服务器,该控制台在 "Server Nodes" 选项下有 "Add Servers" 选项,参考自 this 文章。
现在,例如,如果我必须使用 Nodejs SDK、Ottoman 连接到驻留在服务器上的存储桶并创建一个新用户,那么它就能够连接到存储桶,但是它无法保存文档在桶中并给我一个 "segmentation fault (core dumped)" 错误。
如果我们需要对服务器的设置方式进行任何更改,或者我们应该如何继续上述示例以便我们能够创建用户,请告诉我们。
软件版本:
沙发床:4.5
Couchbase Nodejs SDK:2.2
奥斯曼:1.0.3
此函数是 运行使用 Nodejs ver-4.3 来自 AWS Lambda。
我收到的错误是 "Segmentation Fault(core dumped)"。
下面是我试过的 AWS Lambda 函数:
var couchbase=require('couchbase');
var ottoman=require('ottoman');
var config = require("./config");
var myCluster = new couchbase.Cluster(config.couchbase.server); // here tried connecting to either data / index / query server
ottoman.bucket = myCluster.openBucket(config.couchbase.bucket);
require('./models/users');
ottoman.ensureIndices(function(err) {
if (err) {
console.log('failed to created neccessary indices', err);
return;
}
console.log('ottoman indices are ready for use!');
});
var user = require('./models/users');
exports.handler = function(event, context) {
user.computeHash(event.password, function(err, salt, hash) {
if (err) {
context.fail('Error in hash: ' + err);
} else {
user.createAndSave("userDetails details sent to the user creation function", function (error, done) {
if (error) {
context.fail(error.toString());
}
context.succeed({
success: true,
data: done
});
});
}
});
};
当您 运行 在本地(使用 node-lambda)测试上面的函数时,它给出了相同的 "Segmentation fault(core dumped)" 错误,当上传到 Lambda 并进行测试时,它给出了以下错误:
{
"errorMessage": "Process exited before completing request"
}
提前致谢
这是一个与您正在使用的 MDS 场景相关的已知问题 (https://issues.couchbase.com/browse/JSCBC-316)。我们将在 8 月初的下一个版本中解决此问题。
我们的 couchbase 服务器设置有三个 EC2 实例,第一个实例只有数据库服务 运行ning,第二个实例有索引服务 运行ning,第三个实例有查询服务 运行宁。
索引和查询服务器使用 couchbase web 控制台添加到数据服务器,该控制台在 "Server Nodes" 选项下有 "Add Servers" 选项,参考自 this 文章。
现在,例如,如果我必须使用 Nodejs SDK、Ottoman 连接到驻留在服务器上的存储桶并创建一个新用户,那么它就能够连接到存储桶,但是它无法保存文档在桶中并给我一个 "segmentation fault (core dumped)" 错误。
如果我们需要对服务器的设置方式进行任何更改,或者我们应该如何继续上述示例以便我们能够创建用户,请告诉我们。
软件版本: 沙发床:4.5 Couchbase Nodejs SDK:2.2 奥斯曼:1.0.3
此函数是 运行使用 Nodejs ver-4.3 来自 AWS Lambda。
我收到的错误是 "Segmentation Fault(core dumped)"。
下面是我试过的 AWS Lambda 函数:
var couchbase=require('couchbase');
var ottoman=require('ottoman');
var config = require("./config");
var myCluster = new couchbase.Cluster(config.couchbase.server); // here tried connecting to either data / index / query server
ottoman.bucket = myCluster.openBucket(config.couchbase.bucket);
require('./models/users');
ottoman.ensureIndices(function(err) {
if (err) {
console.log('failed to created neccessary indices', err);
return;
}
console.log('ottoman indices are ready for use!');
});
var user = require('./models/users');
exports.handler = function(event, context) {
user.computeHash(event.password, function(err, salt, hash) {
if (err) {
context.fail('Error in hash: ' + err);
} else {
user.createAndSave("userDetails details sent to the user creation function", function (error, done) {
if (error) {
context.fail(error.toString());
}
context.succeed({
success: true,
data: done
});
});
}
});
};
当您 运行 在本地(使用 node-lambda)测试上面的函数时,它给出了相同的 "Segmentation fault(core dumped)" 错误,当上传到 Lambda 并进行测试时,它给出了以下错误:
{
"errorMessage": "Process exited before completing request"
}
提前致谢
这是一个与您正在使用的 MDS 场景相关的已知问题 (https://issues.couchbase.com/browse/JSCBC-316)。我们将在 8 月初的下一个版本中解决此问题。