【发布时间】:2016-04-05 08:10:46
【问题描述】:
我想试试微软的新机器人框架。我制作了一个简单的机器人并将其注册到机器人连接器中。 当我现在想在 dev.framework.com 网站上测试我的机器人时,我收到了这条消息:
{
"error": {
"code": "Internal",
"message": "An error occurred while sending the request. Unable to connect to the remote server An attempt was made to access a socket in a way forbidden by its access permissions 172.17.1.41:3978 [GSisZ6ZkL7d]",
"statusCode": 500
}
}
这是我的 app.js:
var builder = require('botbuilder');
var restify = require('restify');
var index = require('./dialogs/index.js');
var bot = new builder.BotConnectorBot({ appId: 'myAppId', appSecret: 'myAppSecret' });
bot.add('/', index);
var server = restify.createServer();
server.post('/api/messages', bot.listen());
server.listen(process.env.port || 8080, process.env.ip, bot.verifyBotFramework(), function () {
console.log('%s listening to %s', server.name, server.url);
});
当我在 openshift 上运行我的应用程序时,我得到控制台日志“restify listen to https://myipaddress:8080”,所以我猜我的节点应用程序正在运行。
我还尝试将 https 和 http 作为端点调用 bot.verifyBotFramework() 和不调用。
【问题讨论】:
-
似乎端点映射到了错误的端口 (3978) 但 OpenShift 可能只允许端口 8080 从公共网络连接?
标签: node.js openshift botframework