3

I've installed PredictionIO 0.9.6 with ElasticSearch and HBase and then followed the instructions to use the UR template here: https://templates.prediction.io/PredictionIO/template-scala-parallel-universal-recommendation

When I try to import sample events by running python examples/import_handmade.py --access_key **my-access-key** I get this error:

401 body: {"message":"Invalid accessKey."}

The access key comes from pio app list command...

I tried also to upgrade the UR template to version 0.3.0 as suggested for other problems: deleted the directory with the template and reinstalled with git https://github.com/actionml/template-scala-parallel-universal-recommendation but when I run the ./examples/integration-test I get the same error.

Anyone with this problem?

yliharma
  • 83
  • 1
  • 9

4 Answers4

0

I was having the same problems when running:

./examples/integration-test

or

python examples/import_handmade.py --access_key **my-access-key**

On reading the pio.log under the ~/ur directory, I found that the access key was not being saved into DB (POSTGRES).

pio.log was showing that the SELECT query was failing. So, I manually inserted the access key and App id into the DB.

After which the intergration test ran successfully.

Vaulstein
  • 20,055
  • 8
  • 52
  • 73
0

Had this too. Try running without exporting JAVA_HOME in hbase_site.xml (just skip that step) and only export JAVA_HOME in your environment.

0

i use docker for predictioIo and get same error , i've just restart it and create a new app and try again and now i can import my data.

MMRA
  • 337
  • 1
  • 3
  • 11
0

Reason for error

The error happens generally when key stored on the eventserver is different from the key you are passing as argument.

In PIO, by default PIO eventserver run on port 7070. So this can happen if this port is already in use by some previous eventserver you started or by some other service.

Inside universal-recommender or your template directory, you can check the eventserver logs ( pio.log or nohup.out ). You will see error like

[INFO] [Management$] Creating Event Server at 0.0.0.0:7070
[WARN] [HttpListener] Bind to /0.0.0.0:7070 failed
[ERROR] [TcpListener] Bind failed for TCP channel on endpoint [/0.0.0.0:7070]
[ERROR] [EventServerActor] Command failed.

Solution

1) Check if port 7070 is occupied by some other service or by previous eventserver already

sudo ss -lptn 'sport = :7070'

Result users:(("java",pid=16659,fd=45))

2) Kill the service which is using that port ( 7070 )

kill -9 16659

3) Restart eventserver ( use & at the and of the command to run the command in background )

nohup pio eventserver

or

pio eventserver

You will see this output in the console or nohub.out file

[INFO] [Management$] Creating Event Server at 0.0.0.0:7070
[INFO] [HttpListener] Bound to /0.0.0.0:7070
[INFO] [EventServerActor] Bound received. EventServer is ready.
Yogesh Yadav
  • 4,557
  • 6
  • 34
  • 40