导入PredictioIO Universal Recommender的示例事件时出错

时间:2016-04-28 11:56:17

标签: predictionio

我已经使用ElasticSearch和HBase安装了PredictionIO 0.9.6,然后按照说明在此处使用UR模板:https://templates.prediction.io/PredictionIO/template-scala-parallel-universal-recommendation

当我尝试通过运行导入示例事件时 ==3 我收到这个错误:

  

401 body:{“message”:“无效的accessKey。”}

访问密钥来自python examples/import_handmade.py --access_key **my-access-key**命令...

我还尝试将UR模板升级到版本0.3.0,如其他问题的建议:使用模板删除目录并使用git https://github.com/actionml/template-scala-parallel-universal-recommendation重新安装但是当我运行pio app list时,我得到了同样的错误。

有这个问题的人吗?

4 个答案:

答案 0 :(得分:0)

我在跑步时遇到同样的问题:

./examples/integration-test

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

在阅读pio.log目录下的~/ur时,我发现访问密钥未保存到DB(POSTGRES)中。

pio.log显示SELECT查询失败。 因此,我手动将访问密钥和App id插入数据库。

之后整合测试成功运行。

答案 1 :(得分:0)

也有这个。尝试在hbase_site.xml中运行而不导出JAVA_HOME(只需跳过该步骤)并仅在您的环境中导出JAVA_HOME。

答案 2 :(得分: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.

答案 3 :(得分:0)

错误原因

通常,当事件服务器上存储的密钥与作为参数传递的密钥不同时,会发生错误。

在PIO中,默认情况下,PIO事件服务器在端口7070上运行。 因此,如果您启动的某些以前的事件服务器或某些其他服务已在使用此端口,则可能发生这种情况。

在通用推荐器或模板目录中,您可以检查事件服务器日志(pio.log or nohup.out)。您会看到类似

的错误
[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.

解决方案

1)检查端口7070是否已被其他服务或先前的事件服务器占用

sudo ss -lptn 'sport = :7070'

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

2)终止正在使用该端口的服务(7070)

kill -9 16659

3)重新启动事件服务器(在命令的和处使用&在后​​台运行命令)

nohup pio eventserver

pio eventserver

您将在consolenohub.out文件中看到此输出

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