node.js - 我的 Pentaho 服务器中的 Kettle api 请求返回 404
问题描述
我是使用 pentaho 服务器来调用localhost:8080/pentaho/home
.
事实是,当我想请求激活我存储在该位置的转换(ktr)时,呼叫服务返回错误 404。
简单的例子不起作用:localhost:8080/kettle/status/?xml=Y
.
我从 nodejs 调用 api rest,因为它放在 pentaho 文档中
function launchTrans(req, res) {
let options = {
url: `http://localhost:8080/kettle/status/?xml=Y`,
method: 'GET',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Access-Control-Allow-Credentials': 'true',
'Cookie': globalString
},
};
request(options, (error, response, body) => {
if (!error && response.statusCode == 200) {
res.status(200).send(response);
} else {
console.log("There was an error " + error);
res.status(500).send(response);
}
});
}
解决方案
http://localhost:8080/pentaho/kettle/status/?xml=y
URL不应该是http://localhost:8080/kettle/status/?xml=y
. 您的 URL 格式不完全正确。您使用的格式适用于旧的 PDI 独立服务器。在报告和 PDI 合并到一个服务器的新合并服务器中,您需要包含 URL 的“pentaho”部分。
推荐阅读
- javascript - 模块构建失败:BrowserslistError:未知浏览器查询“死”
- javascript - 身份验证错误捕获中缺少firebase凭据
- php - 无法在 Magento 2 中安装产品推荐模块
- apex - 后台注销 Salesforce 社区用户
- c# - 我可以使用字节而不是 int 或短裤来节省处理吗?
- angular - Angular .subscribe 不更新
- spring-batch - 获取错误原因:java.lang.IllegalStateException:无法打开已打开的 ItemReader,请先调用 close
- php - Docusign:在信封创建期间添加持久信息
- javascript - 使用 $getJSON 和 ChartJS 创建图表
- javascript - 显示没有 iFrame 的 3d 对象