ashish
ashish

Reputation: 63

Prediction.io: Unable to deploy engine

I'm trying to set up a Prediction.io Text-Classification Engine on my local machine. However, upon attempting to pio build, I get the following message:

[ERROR] [Console$] No valid engine instance found for engine iMXSzwtuLBqTGDQVWFwhXLyX3MELx6Ox 2089ace31214efdc353ab45e911b7524222d7ab6.
Try running 'train' before 'deploy'. Aborting.

As specified in the tutorial, I've already imported the sample data. I'm able to build and train the engine without any issues. Any ideas why it's unable to find a valid engine instance?


Relevant Information:

pio build:

[INFO] [Console$] Using existing engine manifest JSON at ~/prediction_io/text_classification/manifest.json
[INFO] [Console$] Using command '/usr/local/Cellar/predictionio/0.9.5/libexec/sbt/sbt' at the current working directory to build.
[INFO] [Console$] If the path above is incorrect, this process will fail.
[INFO] [Console$] Uber JAR disabled. Making sure lib/pio-assembly-0.9.5.jar is absent.
[INFO] [Console$] Going to run: /usr/local/Cellar/predictionio/0.9.5/libexec/sbt/sbt  package assemblyPackageDependency
[INFO] [Console$] Build finished successfully.
[INFO] [Console$] Looking for an engine...
[INFO] [Console$] Found com-example_2.10-0.1-SNAPSHOT.jar
[INFO] [Console$] Found com.example-assembly-0.1-SNAPSHOT-deps.jar
[INFO] [RegisterEngine$] Registering engine iMXSzwtuLBqTGDQVWFwhXLyX3MELx6Ox 2089ace31214efdc353ab45e911b7524222d7ab6
[INFO] [Console$] Your engine is ready for training.

pio train:

INFO] [Console$] Using existing engine manifest JSON at ~/prediction_io/text_classification/manifest.json
[INFO] [Runner$] Submission command: /usr/local/opt/apache-spark/bin/spark-submit --class io.prediction.workflow.CreateWorkflow --jars file:~/prediction_io/text_classification/target/scala-2.10/com-example_2.10-0.1-SNAPSHOT.jar,file:~/prediction_io/text_classification/target/scala-2.10/com.example-assembly-0.1-SNAPSHOT-deps.jar --files file:/usr/local/Cellar/predictionio/0.9.5/libexec/conf/log4j.properties --driver-class-path /usr/local/Cellar/predictionio/0.9.5/libexec/conf:/usr/local/opt/elasticsearch/config file:/usr/local/Cellar/predictionio/0.9.5/libexec/lib/pio-assembly-0.9.5.jar --engine-id iMXSzwtuLBqTGDQVWFwhXLyX3MELx6Ox --engine-version 2089ace31214efdc353ab45e911b7524222d7ab6 --engine-variant file:~/prediction_io/text_classification/engine.json --verbosity 0 --json-extractor Both --env PIO_ENV_LOADED=1,PIO_STORAGE_REPOSITORIES_METADATA_NAME=pio_meta,PIO_FS_BASEDIR=~/.pio_store,PIO_HOME=/usr/local/Cellar/predictionio/0.9.5/libexec,PIO_FS_ENGINESDIR=~/.pio_store/engines,PIO_STORAGE_SOURCES_PGSQL_URL=jdbc:postgresql://localhost/pio,PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=PGSQL,PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=PGSQL,PIO_STORAGE_REPOSITORIES_EVENTDATA_NAME=pio_event,PIO_STORAGE_SOURCES_PGSQL_PASSWORD=,PIO_STORAGE_SOURCES_PGSQL_TYPE=jdbc,PIO_FS_TMPDIR=~/.pio_store/tmp,PIO_STORAGE_SOURCES_PGSQL_USERNAME=pio,PIO_STORAGE_REPOSITORIES_MODELDATA_NAME=pio_model,PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE=PGSQL,PIO_CONF_DIR=/usr/local/Cellar/predictionio/0.9.5/libexec/conf
/usr/local/Cellar/predictionio/0.9.5/libexec/conf/pio-env.sh: line 55: PIO_STORAGE_SOURCES_PGSQL_PASSWORD: command not found

pio status:

[INFO] [Console$] Inspecting PredictionIO...
[INFO] [Console$] PredictionIO 0.9.5 is installed at /usr/local/Cellar/predictionio/0.9.5/libexec
[INFO] [Console$] Inspecting Apache Spark...
[INFO] [Console$] Apache Spark is installed at /usr/local/opt/apache-spark
[WARN] [Console$] Apache Spark version information cannot be found. If you are using a developmental tree, please make sure you are using a version of at least 1.3.0.
[INFO] [Console$] Inspecting storage backend connections...
[INFO] [Storage$] Verifying Meta Data Backend (Source: PGSQL)...
[INFO] [Storage$] Verifying Model Data Backend (Source: PGSQL)...
[INFO] [Storage$] Verifying Event Data Backend (Source: PGSQL)...
[INFO] [Storage$] Test writing to Event Store (App Id 0)...
[INFO] [Console$] (sleeping 5 seconds for all messages to show up...)
[INFO] [Console$] Your system is all ready to go.

Upvotes: 1

Views: 777

Answers (1)

Tom Chan
Tom Chan

Reputation: 71

The last line in your pio train is the cause:

/usr/local/Cellar/predictionio/0.9.5/libexec/conf/pio-env.sh: line 55: PIO_STORAGE_SOURCES_PGSQL_PASSWORD: command not found

Have you setup the password for your PostgreSQL and put it in pio-env.sh? If that doesn't help, feel free to pastebin your pio-env.sh (edit out passwords etc of course)

If you have further questions along the way, post it to PredictionIO's Google Group where your question will be answered more quickly by our community.

Tom

Upvotes: 1

Related Questions