Javascript Ubuntu的DNS问题。Url请求在MacOSX中工作正常,但在Ubuntu中失败
已编写调用Javascript Ubuntu的DNS问题。Url请求在MacOSX中工作正常,但在Ubuntu中失败,javascript,node.js,ubuntu,travis-ci,Javascript,Node.js,Ubuntu,Travis Ci,已编写调用require('request').post()的NodeJ。这个脚本在MacOSX(Travis)中运行良好,但在Ubuntu(Travis)中失败。还测试了NodeJS“https”模块,以消除可能导致错误的无关变量。然而,这也不起作用 /** * Upload the data to the coverage server */ exports.upload = function (data, callback) { var url = SERVER + '/v1/co
require('request').post()的NodeJ。这个脚本在MacOSX(Travis)中运行良好,但在Ubuntu(Travis)中失败。还测试了NodeJS“https”模块,以消除可能导致错误的无关变量。然而,这也不起作用
/**
* Upload the data to the coverage server
*/
exports.upload = function (data, callback) {
var url = SERVER + '/v1/coverage';
request.post(url, {
form : {
type : 'grunt-appc-coverage',
data: data
},
json: true,
agentOptions: false
}, function (err, response, body) {
console.log(err, response, body);
....
return callback(null, SUCCESS_UPLOAD);
});
};
这是我从Ubuntu的日志中得到的
REQUEST make request https://coverage.appcelerator.com/v1/coverage
{ [Error: getaddrinfo ENOTFOUND coverage.appcelerator.com]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'coverage.appcelerator.com' } undefined undefined
结果可以在这里看到
-
-MacOSX(无法发布链接)我不认为CNAME符合规范:
$ dig +short coverage.appcelerator.com
https://454bcc35e4c9b0c030c89b311b4322330d84fa3b.cloudapp-enterprise.appcelerator.com.
ec2-54-244-121-14.us-west-2.compute.amazonaws.com.
54.244.121.14
$
看起来坏了。具体地说,第一个CNAME看起来不完整:它的值应该是域名,而不是URL
…还是我没有跟上DNS的步伐?:)
埃塔:没有,我查了一些资料,他们同意CNAME必须拥有域名,其他什么都没有。所以,是的,DNS记录需要替换为一个合理的记录