【问题标题】:Error in importing sample events for PredictioIO Universal Recommender为 PredictioIO Universal Recommender 导入示例事件时出错
【发布时间】:2016-04-28 11:56:17
【问题描述】:

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

当我尝试通过运行导入示例事件时 python examples/import_handmade.py --access_key **my-access-key** 我收到此错误:

401 正文:{"message":"Invalid accessKey."}

访问密钥来自pio app list 命令...

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

有人遇到这个问题吗?

【问题讨论】:

  • 你没有在访问密钥周围加上引号或 符号是吗?
  • 没有@alex9311,我在 --access_key 参数之后传递它。
  • 通过 curl 怎么样? curl -i -X GET "localhost:7070/events.json?accessKey=$ACCESS_KEY"
  • 正在检索数据,是导入不起作用...
  • 我在运行./examples/integration-test时遇到了同样的错误

标签: predictionio


【解决方案1】:

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

./examples/integration-test

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

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

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

之后集成测试成功运行。

【讨论】:

    【解决方案2】:

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

    【讨论】:

      【解决方案3】:

      我使用 docker for predictioIo 并得到相同的错误,我刚刚重新启动它并创建一个新应用程序并重试,现在我可以导入我的数据了。

      【讨论】:

        【解决方案4】:

        错误原因

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

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

        在universal-recommender 或您的模板目录中,您可以查看事件服务器日志(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) 重启eventserver(在命令的and处使用&在后台运行命令)

        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.
        

        【讨论】:

          猜你喜欢
          • 2017-10-26
          • 1970-01-01
          • 2012-09-28
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多