java coracle Coherence 中的错误“服务 DistributedSessions 不存在启用存储的节点”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31994022/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
error in coracle Coherence "No storage-enabled nodes exist for service DistributedSessions"
提问by user2965814
I made java application to load data to distributed Cache. Application load data well but when loading over than 10 million of record, I' am getting “No storage-enabled nodes exist for service DistributedSessions” error.but when I load less than 10 million it working good. I create one cluster in web logic and join 4 nods as the following:
我制作了 java 应用程序来将数据加载到分布式缓存。应用程序加载数据很好,但是当加载超过 1000 万条记录时,我收到“不存在用于服务 DistributedSessions 的启用存储的节点”错误。但是当我加载少于 1000 万条记录时,它运行良好。我在 Web 逻辑中创建了一个集群并加入 4 个点头,如下所示:
? 2 servers (Storage enable =true) to store data
? 2台服务器(Storage enable = true)存储数据
? 2 client (Storage enable =false) to view and query only
? 2 客户端(Storage enable =false)只能查看查询
tangosol-coherence-override.xml
tangosol-coherence-override.xml
<cluster-config>
<member-identity>
<cluster-name system-property="tangosol.coherence.cluster">CLUSTER_NAME</cluster-name>
</member-identity>
<multicast-listener>
<time-to-live system-property="tangosol.coherence.ttl">30</time-to-live>
<address>224.1.1.1</address>
<port>12346</port>
</multicast-listener>
</cluster-config>
<logging-config>
coherence-cache-config.xml
coherence-cache-config.xml
<?xml version="1.0"?>
<serializer system-property="tangosol.coherence.serializer"/>
<socket-provider system-property="tangosol.coherence.socketprovider"/>
<cache-mapping>
<cache-name>*</cache-name>
<scheme-name>example-distributed</scheme-name>
</cache-mapping>
<scheme-name>example-distributed</scheme-name>
<service-name>DistributedCache</service-name>
<backing-map-scheme>
<local-scheme>
<scheme-ref>example-binary-backing-map</scheme-ref>
</local-scheme>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
<local-scheme>
<scheme-name>example-binary-backing-map</scheme-name>
<eviction-policy>HYBRID</eviction-policy>
<high-units>{back-size-limit 0}</high-units>
<unit-calculator>BINARY</unit-calculator>
<expiry-delay>0</expiry-delay>
<cachestore-scheme></cachestore-scheme>
</local-scheme>
Server Argument:
服务器参数:
-Xms6g
-Xms6g
-Xmx12g
-Xmx12g
-Xincgc
-Xincgc
-XX:-UseGCOverheadLimit
-XX:-UseGCOverheadLimit
-Dtangosol.coherence.distributed.localstorage=true
-Dtangosol.coherence.distributed.localstorage=true
-Dtangosol.coherence.cluster=CLUSTER_NAME
-Dtangosol.coherence.cluster=CLUSTER_NAME
-Dtangosol.coherence.clusteraddress=224.1.1.1
-Dtangosol.coherence.clusteraddress=224.1.1.1
-Dtangosol.coherence.clusterport=12346
-Dtangosol.coherence.clusterport=12346
Client Argument:
客户端参数:
-Xms1g
-Xms1g
-Xmx1g
-Xmx1g
-Xincgc
-Xincgc
-XX:-UseGCOverheadLimit
-XX:-UseGCOverheadLimit
-Dtangosol.coherence.distributed.localstorage=false
-Dtangosol.coherence.distributed.localstorage=false
-Dtangosol.coherence.session.localstorage=true
-Dtangosol.coherence.session.localstorage=true
-Dtangosol.coherence.cluster= CLUSTER_NAME
-Dtangosol.coherence.cluster= CLUSTER_NAME
-Dtangosol.coherence.clusteraddress=224.1.1.1
-Dtangosol.coherence.clusteraddress=224.1.1.1
-Dtangosol.coherence.clusterport=12346
-Dtangosol.coherence.clusterport=12346
采纳答案by Laxman G
Coherence requires at least one storage enabled server in the cluster. The cache server you started is not storage enabled.
Coherence 要求集群中至少有一台支持存储的服务器。您启动的缓存服务器未启用存储。
As an example, in .\bin directory of the coherence install, there is a coherence.cmd/sh
By default, it is not storage enabled. You can run cache-server.cmd to start a storage enabled cache server. Then, run coherence.cmd in another windows to start a second storage disabled server.
例如,在 coherence 安装的 .\bin 目录中,有一个coherence.cmd/sh
默认情况下不启用存储。您可以运行 cache-server.cmd 来启动启用存储的缓存服务器。然后,在另一个窗口中运行 coherence.cmd 以启动第二个禁用存储的服务器。
Alternatively, you can edit coherence.cmd to change "set storage_enabled=false
" to "set storage_enabled=true
". Then you should be able to put data into the cache from the coherence.cmd command prompt.
或者,您可以编辑 coherence.cmd 将“set storage_enabled=false
”更改为“ set storage_enabled=true
”。然后您应该能够从 coherence.cmd 命令提示符将数据放入缓存中。
Alternatively : you can enable local storage in one of the vms with (-Dtangosol.coherence.distributed.localstorage=true
).
或者:您可以使用 ( -Dtangosol.coherence.distributed.localstorage=true
)在其中一个虚拟机中启用本地存储。
If it did not work then it could be memory issue "not sufficient memory and cannot to load any further data.".
如果它不起作用,则可能是内存问题“内存不足,无法加载任何进一步的数据。”。
回答by Samuelens
as much I remember, localstorage=false says to the service to avoid loading data at all, so over 10 M of records, I guess you coherence lacks of memory and cannot load any more data. Try changing your eviction policy as well, but from my point of view, you localstorage might be true. This property is in use on proxies, in order to say them to act or not as servers as well.
我记得, localstorage=false 告诉服务根本避免加载数据,所以超过 10 M 的记录,我猜你的一致性缺乏内存,无法加载更多数据。也尝试更改您的驱逐政策,但从我的角度来看,您的 localstorage 可能是正确的。此属性用于代理,以便说明它们是否也充当服务器。
回答by cpurdy
In the Coherence cache config for the storage-enabled servers, you need to have a config for the DistributedSessions service. It looks like you are using an example config instead of a real config.
在启用存储的服务器的 Coherence 缓存配置中,您需要有一个 DistributedSessions 服务的配置。看起来您正在使用示例配置而不是真实配置。
If it works up to a point (10 million?) then fails, then you need to figure out what is going wrong (e.g. an exception on the storage enabled servers?)
如果它工作到一个点(1000 万?)然后失败,那么您需要弄清楚出了什么问题(例如,启用存储的服务器上的异常?)
回答by user2965814
I solve my issue by increase Memory of 2 Storage Server
我通过增加 2 个存储服务器的内存来解决我的问题