首页 > 解决方案 > NCache - 无法启动我的缓存。ErrorL 指定缓存未注册

问题描述

我正在尝试使用 NCache 开源。我已经将它安装在我的本地机器上。我已经按照说明编辑了 config.ncconf 文件。已经使用 Restart-Service 命令重新启动了服务。

<cache-config cache-name="myreplicatedcache">
<cache-settings inproc="False">
 <logging enable-logs="True" trace-errors="True" trace-debug="False" log-path=""/>
 <performance-counters enable-counters="True" snmp-port="0"/>
 <cache-notifications item-remove="False" item-add="False" item-update="False"/>
 <cleanup interval="15sec"/>
 <storage type="heap" cache-size="1024mb"/>
 <eviction-policy default-priority="normal" eviction-ratio="5%"/>
 <cache-topology topology="replicated">
   <cluster-settings operation-timeout="60sec" 
       stats-repl-interval="600sec" use-heart-beat="False">
     <cluster-connection-settings port-range="1" connection-retries="2" 
                   connection-retry-interval="10secs" cluster-port="7804"/>
   </cluster-settings>
 </cache-topology>
 <client-death-detection enable="False" grace-interval="60sec"/>
</cache-settings>
<cache-deployment>
 <servers>
   <server-node ip="192.168.0.101"/>
 </servers>
</cache-deployment>
</cache-config>

尽管如此,我还是无法启动我注册的新缓存。我遇到了-“未注册指定的缓存”。我不确定它为什么会发生,因为我确定它已注册。这是它的样子:

NCache 启动缓存

标签: ncache

解决方案


端口是否打开并允许流量?您可以尝试关闭 Windows 防火墙,如果可行,请定义允许流量的规则。

您也可以尝试使用分区缓存配置

<cache-config cache-name="myPartitionedCache" alias="" config-id="44fb997a-f6a7-433b-9439-7ef9de9f47c7" config-version="0">
    <cache-settings inproc="False">
      <logging enable-logs="True" trace-errors="True" trace-debug="False" log-path=""/>
      <performance-counters enable-counters="True" snmp-port="0"/>
      <cache-notifications item-remove="False" item-add="False" item-update="False"/>
      <cleanup interval="15sec"/>
      <storage type="heap" cache-size="1024mb"/>
      <eviction-policy default-priority="normal" eviction-ratio="5%"/>
      <cache-topology topology="partitioned">
        <cluster-settings operation-timeout="60sec" stats-repl-interval="60sec" use-heart-beat="False">
          <cluster-connection-settings port-range="1" connection-retries="2" connection-retry-interval="2secs" cluster-port="7801"/>
        </cluster-settings>
      </cache-topology>
      <client-death-detection enable="False" grace-interval="60sec"/>
    </cache-settings>
    <cache-deployment>
      <servers>
        <server-node ip="yourIPHere"/>

      </servers>
    </cache-deployment>
  </cache-config>

推荐阅读