No Elasticsearch client configuration detected

236 views
Skip to first unread message

Ayoub BENALI

unread,
Feb 7, 2017, 5:19:48 PM2/7/17
to actionml-user
Hi friends,

I have a problem when I try to train my UR
Exception in thread "main" java.lang.IllegalStateException: No Elasticsearch client configuration detected, check your pio-env.sh forproper configuration settings
    at org
.template.EsClient$.client$lzycompute(EsClient.scala:61)
    at org
.template.EsClient$.client(EsClient.scala:58)
    at org
.template.EsClient$.hotSwap(EsClient.scala:172)
    at org
.template.URModel.save(URModel.scala:80)
    at org
.template.URAlgorithm.calcAll(URAlgorithm.scala:324)
    at org
.template.URAlgorithm.train(URAlgorithm.scala:251)
    at org
.template.URAlgorithm.train(URAlgorithm.scala:169)
    at org
.apache.predictionio.controller.P2LAlgorithm.trainBase(P2LAlgorithm.scala:49)
    at org
.apache.predictionio.controller.Engine$$anonfun$18.apply(Engine.scala:692)
    at org
.apache.predictionio.controller.Engine$$anonfun$18.apply(Engine.scala:692)
    at scala
.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala
.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala
.collection.immutable.List.foreach(List.scala:318)
    at scala
.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala
.collection.AbstractTraversable.map(Traversable.scala:105)
    at org
.apache.predictionio.controller.Engine$.train(Engine.scala:692)
    at org
.apache.predictionio.controller.Engine.train(Engine.scala:177)
    at org
.apache.predictionio.workflow.CoreWorkflow$.runTrain(CoreWorkflow.scala:67)
    at org
.apache.predictionio.workflow.CreateWorkflow$.main(CreateWorkflow.scala:250)
    at org
.apache.predictionio.workflow.CreateWorkflow.main(CreateWorkflow.scala)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at org
.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672)
    at org
.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
    at org
.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
    at org
.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
    at org
.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)


and here is my pio-env.sh

#!/usr/bin/env bash
#
# Copy this file as pio-env.sh and edit it for your site's configuration.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# PredictionIO Main Configuration
#
# This section controls core behavior of PredictionIO. It is very likely that
# you need to change these to fit your site.

# SPARK_HOME: Apache Spark is a hard dependency and must be configured.
SPARK_HOME
=$PIO_HOME/vendors/spark-1.5.1-bin-hadoop2.6

POSTGRES_JDBC_DRIVER
=$PIO_HOME/lib/postgresql-9.4-1204.jdbc41.jar
MYSQL_JDBC_DRIVER
=$PIO_HOME/lib/mysql-connector-java-5.1.37.jar

# ES_CONF_DIR: You must configure this if you have advanced configuration for
#              your Elasticsearch setup.
#ES_CONF_DIR=/opt/elasticsearch

# HADOOP_CONF_DIR: You must configure this if you intend to run PredictionIO
#                  with Hadoop 2.
#HADOOP_CONF_DIR=/opt/hadoop

# HBASE_CONF_DIR: You must configure this if you intend to run PredictionIO
#                 with HBase on a remote cluster.
#HBASE_CONF_DIR=$PIO_HOME/vendors/hbase-1.0.0/conf

# Filesystem paths where PredictionIO uses as block storage.
PIO_FS_BASEDIR
=$HOME/.pio_store
PIO_FS_ENGINESDIR
=$PIO_FS_BASEDIR/engines
PIO_FS_TMPDIR
=$PIO_FS_BASEDIR/tmp

# PredictionIO Storage Configuration
#
# This section controls programs that make use of PredictionIO's built-in
# storage facilities. Default values are shown below.
#
# For more information on storage configuration please refer to
# http://predictionio.incubator.apache.org/system/anotherdatastore/

# Storage Repositories

# Default is to use PostgreSQL
PIO_STORAGE_REPOSITORIES_METADATA_NAME
=ELASTICSEARCH
PIO_STORAGE_REPOSITORIES_METADATA_SOURCE
=PGSQL

PIO_STORAGE_REPOSITORIES_EVENTDATA_NAME
=pio_event
PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE
=PGSQL

PIO_STORAGE_REPOSITORIES_MODELDATA_NAME
=pio_model
PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE
=LOCALFS

# Storage Data Sources

# PostgreSQL Default Settings
# Please change "pio" to your database name in PIO_STORAGE_SOURCES_PGSQL_URL
# Please change PIO_STORAGE_SOURCES_PGSQL_USERNAME and
# PIO_STORAGE_SOURCES_PGSQL_PASSWORD accordingly
PIO_STORAGE_SOURCES_PGSQL_TYPE
=jdbc
PIO_STORAGE_SOURCES_PGSQL_URL
=jdbc:postgresql://localhost/pio
PIO_STORAGE_SOURCES_PGSQL_USERNAME
=pio
PIO_STORAGE_SOURCES_PGSQL_PASSWORD
=pio

# MySQL Example
# PIO_STORAGE_SOURCES_MYSQL_TYPE=jdbc
# PIO_STORAGE_SOURCES_MYSQL_URL=jdbc:mysql://localhost/pio
# PIO_STORAGE_SOURCES_MYSQL_USERNAME=pio
# PIO_STORAGE_SOURCES_MYSQL_PASSWORD=pio

# Elasticsearch Example
PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE
=elasticsearch
PIO_STORAGE_SOURCES_ELASTICSEARCH_CLUSTERNAME
="predictionio"
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOSTS
=localhost
PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS
=9300
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOME
=$PIO_HOME/vendors/elasticsearch-1.4.4

# Local File System Example
PIO_STORAGE_SOURCES_LOCALFS_TYPE
=localfs
PIO_STORAGE_SOURCES_LOCALFS_PATH
=$PIO_FS_BASEDIR/models

# HBase Example
PIO_STORAGE_SOURCES_HBASE_TYPE
=hbase
PIO_STORAGE_SOURCES_HBASE_HOME
=$PIO_HOME/vendors/hbase-1.0.0




Thanks you all .

Pat Ferrel

unread,
Feb 8, 2017, 11:52:58 AM2/8/17
to Ayoub BENALI, actionml-user
You have a mix of postgres and elasticsearch in your config. It is important that you pick one for your metadata.  Also I would not recommend Postgres for event data. Recommenders mean big data, even in small-ish applications, remember you are storing potentially every user action for up to a year, depending on your app. Without knowing more I’d suggest you re-install and use Hbase as the Event store and Elasticsearch for metadata and model storage.


--
You received this message because you are subscribed to the Google Groups "actionml-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actionml-use...@googlegroups.com.
To post to this group, send email to action...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/actionml-user/35db6a1f-1bf3-4644-9cec-fb435d27ced3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages