2

I have setted up PredictionIO by pio-start-all, submitted test data and has build and train too.

Now I am deploying it all the things is going right but server is deploying on https instead of http. I am using ubuntu 14.04

Logs is here

[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.

Dau
  • 8,578
  • 4
  • 23
  • 48

1 Answers1

2

Same issue for me. It seems that the https is hard-coded: https://github.com/PredictionIO/PredictionIO/blob/833f4dd5d598f24a66e13c49a5a6d85a1d40a334/core/src/main/scala/io/prediction/workflow/CreateServer.scala#L296

So the solution is to use the variable HttpOptions.allowUnsafeSSL: https://github.com/PredictionIO/PredictionIO/blob/833f4dd5d598f24a66e13c49a5a6d85a1d40a334/core/src/main/scala/io/prediction/workflow/CreateServer.scala#L301 But I don't find a way to override it.

Maybe the very bad solution is to change the call to the server:

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

The good enough option: install PredictionIO 0.9.5 which has still a http service.

EDIT: another good option: install the ActionML version, following this guide: https://github.com/actionml/cluster-setup/blob/master/predictionio-by-actionml.md

Yvan
  • 2,539
  • 26
  • 28
  • Thanks for the answer, but how can I install PredictionIO 0.9.5? There is no options for installing previous version given on site. – Dau May 30 '16 at 10:13
  • I tried but struggle too much... So I went back to the `curl -k` option... I've subscribed to the following bug: https://github.com/PredictionIO/PredictionIO/issues/221#issuecomment-217492764. And I don't understand how to install ActionML instead of Salesforce, but that can be a solution too. – Yvan May 31 '16 at 06:31
  • I have also searched for this and found that the Prediction.io is a salesforce company repository and one of the partner says actionml has created a new fork for predictionio. Do you know which is the best to use salesforce or actionml? – Dau May 31 '16 at 14:14
  • You should read the instructions here: https://github.com/actionml/cluster-setup/blob/master/predictionio-by-actionml.md. Also I've just noticed the «remove ~/.ivy2 directory», which explains why I had so much trouble on the second tryout. I'll test it again if I have some time next week. – Yvan Jun 01 '16 at 20:01