【问题标题】:How to deploy predictionio on http instead of https如何在 http 而不是 https 上部署 predictionio
【发布时间】:2016-09-23 01:56:25
【问题描述】:

我已经通过pio-start-all 设置了PredictionIO,提交了测试数据,并且也进行了构建和训练。

现在我正在部署它,一切正常,但服务器部署在 https 而不是 http。我正在使用 ubuntu 14.04

日志在这里

[WARN] [Utils] 您的主机名 med-lap-008 解析为环回 地址:127.0.1.1;使用 192.168.35.97 代替(在接口 eth0 上) [WARN] [Utils] 如果您需要绑定到另一个,请设置 SPARK_LOCAL_IP 地址 [INFO] [Remoting] 开始远程 [INFO] [Remoting] 远程 开始;监听地址 :[akka.tcp://sparkDriverActorSystem@192.168.35.97:51753] [信息] [Engine] 使用持久化模型 [INFO] [Engine] 自定义持久化模型 检测到算法 com.myapp.URAlgorithm [INFO] [URModel$] Created 虚拟空模型 [INFO] [MasterActor] 取消部署任何现有引擎 https://192.168.35.97:8001 的实例 [WARN] [MasterActor] 没有 https://192.168.35.97:8001 [INFO] [HttpListener] 绑定到 /192.168.35.97:8001 [INFO] [MasterActor] 引擎已部署并且 跑步。引擎 API 已在 https://192.168.35.97:8001 上线。

【问题讨论】:

    标签: ubuntu server ubuntu-14.04 prediction predictionio


    【解决方案1】:

    对我来说同样的问题。似乎 https 是硬编码的: https://github.com/PredictionIO/PredictionIO/blob/833f4dd5d598f24a66e13c49a5a6d85a1d40a334/core/src/main/scala/io/prediction/workflow/CreateServer.scala#L296

    所以解决方法是使用变量HttpOptions.allowUnsafeSSLhttps://github.com/PredictionIO/PredictionIO/blob/833f4dd5d598f24a66e13c49a5a6d85a1d40a334/core/src/main/scala/io/prediction/workflow/CreateServer.scala#L301 但我找不到覆盖它的方法。

    也许非常糟糕的解决方案是更改对服务器的调用:

    我在 https 中使用了 -k 选项:

    curl -k -H "Content-Type: application/json" -d '{ "user": "u1", "num": 4}' https://localhost:8000/queries.json

    https://groups.google.com/d/msg/predictionio-user/w0ajF_nlFnM/iG4akmeSBgAJ

    足够好选项:安装仍具有 http 服务的 PredictionIO 0.9.5。

    编辑:另一个选项:按照本指南安装 ActionML 版本:https://github.com/actionml/cluster-setup/blob/master/predictionio-by-actionml.md

    【讨论】:

    • 感谢您的回答,但是如何安装 PredictionIO 0.9.5?现场没有安装以前版本的选项。
    • 我尝试过,但挣扎太多...所以我回到curl -k 选项...我订阅了以下错误:github.com/PredictionIO/PredictionIO/issues/…。而且我不明白如何安装 ActionML 而不是 Salesforce,但这也可以是一个解决方案。
    • 我也搜索了这个,发现 Prediction.io 是一个 salesforce 公司存储库,其中一位合作伙伴说 actionml 为 predictio 创建了一个新的分支。你知道哪个最适合使用 salesforce 或 actionml?
    • 您应该阅读此处的说明:github.com/actionml/cluster-setup/blob/master/…。此外,我刚刚注意到«删除 ~/.ivy2 目录»,这解释了为什么我在第二次试用时遇到了这么多麻烦。如果下周有时间我会再测试一次。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-03
    • 2020-09-11
    • 1970-01-01
    • 1970-01-01
    • 2019-11-09
    • 2021-12-08
    • 1970-01-01
    相关资源
    最近更新 更多