我已经通过 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://[email protected]: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.allowUnsafeSSL
:
https://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
关于ubuntu - 如何在 http 而不是 https 上部署 Predictionio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37437525/