【问题标题】:Apache Ignite cache operation failureApache Ignite 缓存操作失败
【发布时间】:2017-10-01 12:29:00
【问题描述】:

我已经使用来自 docker hub 的 docker 镜像安装了 Ignite。点燃服务器节点正确启动。但是在尝试更新缓存时出现以下异常:

[SEVERE][rest-#35%null%][GridCacheCommandHandler] Failed to execute cache command: GridRestCacheRequest [cacheName=null, cacheFlags=0, ttl=null, super=GridRestRequest [destId=null, clientId=466b7ff5-c303-452e-8f2d-97d59c753de5, addr=null, cmd=CACHE_PUT]]
class org.apache.ignite.IgniteCheckedException: Failed to find cache for given cache name (null for default cache): null
        at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.localCache(GridCacheCommandHandler.java:754)
        at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.executeCommand(GridCacheCommandHandler.java:677)
        at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.handleAsync(GridCacheCommandHandler.java:468)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:264)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:87)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:153)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[14:57:18,637][SEVERE][rest-#35%null%][GridRestProcessor] Failed to handle request: CACHE_PUT
class org.apache.ignite.IgniteCheckedException: Failed to find cache for given cache name (null for default cache): null
        at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.localCache(GridCacheCommandHandler.java:754)
        at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.executeCommand(GridCacheCommandHandler.java:677)
        at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.handleAsync(GridCacheCommandHandler.java:468)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:264)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:87)
        at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:153)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

有什么想法吗?

【问题讨论】:

    标签: docker redis ignite jedis


    【解决方案1】:

    您应该在开始使用它之前创建缓存。使用 getOrCreateCache 方法。

    您可以在 doc 中阅读更多信息,并查看使用缓存 api 的 example

    此外,apache ignite 中有很多用于各种用例的示例。

    【讨论】:

    • 非常感谢您的回复,我只是有点困惑,我从 Linux 的 docker 映像启动了 ignite 服务器。我尝试了你的建议并且它有效,但我不确定当前运行的 ignite 服务器是否是 Apache ignite docker 映像。您能否解释一下如何为 apache ignite docker 映像创建缓存表单 Linux 提前谢谢。
    • 遇到此异常时,您是如何尝试访问缓存的?
    • Ignite 部分兼容 Redis,允许用户使用任何 Redis 兼容客户端从 Apache Ignite 缓存中存储和检索分布式数据。
    • 我正在使用 jedis(redis 客户端)
    • 但是当我在 linux 上使用 redis-cli 时,甚至当我在 java 程序中使用 jedis(redis 客户端)时,我得到了这个异常
    猜你喜欢
    • 2020-09-14
    • 1970-01-01
    • 2022-06-17
    • 2018-05-19
    • 2021-11-17
    • 1970-01-01
    • 1970-01-01
    • 2020-03-02
    • 2016-11-03
    相关资源
    最近更新 更多