如何在 http 而不是 https 上部署 predictionio

How to deploy predictionio on http instead of https

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

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

日志在这里

[WARN] [Utils] Your hostname, med-lap-008 resolves to a loopback address: 127.0.1.1; using 192.168.35.97 instead (on interface eth0) [WARN] [Utils] Set SPARK_LOCAL_IP if you need to bind to another address [INFO] [Remoting] Starting remoting [INFO] [Remoting] Remoting started; listening on addresses :[akka.tcp://sparkDriverActorSystem@192.168.35.97:51753] [INFO] [Engine] Using persisted model [INFO] [Engine] Custom-persisted model detected for algorithm com.myapp.URAlgorithm [INFO] [URModel$] Created dummy null model [INFO] [MasterActor] Undeploying any existing engine instance at https://192.168.35.97:8001 [WARN] [MasterActor] Nothing at https://192.168.35.97:8001 [INFO] [HttpListener] Bound to /192.168.35.97:8001 [INFO] [MasterActor] Engine is deployed and running. Engine API is live at https://192.168.35.97:8001.

我也遇到同样的问题。似乎 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 但是我找不到覆盖它的方法。

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

I used -k option with https:

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