You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Juan José Ramos Cassella (JIRA)" <ji...@apache.org> on 2018/05/25 14:25:00 UTC

[jira] [Assigned] (GEODE-5256) Default Values Override GFSH StartUp Parameters

     [ https://issues.apache.org/jira/browse/GEODE-5256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juan José Ramos Cassella reassigned GEODE-5256:
-----------------------------------------------

    Assignee: Juan José Ramos Cassella

> Default Values Override GFSH StartUp Parameters
> -----------------------------------------------
>
>                 Key: GEODE-5256
>                 URL: https://issues.apache.org/jira/browse/GEODE-5256
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Juan José Ramos Cassella
>            Assignee: Juan José Ramos Cassella
>            Priority: Major
>         Attachments: workspace.zip
>
>
> Hello team,
> The order on which we apply the cache configuration vs the startup parameters when starting servers through {{gfs}} seems to be wrong.
> No matter whether the cache is configured through a local {{cache.xml}} or the cluster configuration service, internally we end up parsing the configuration using {{CacheXmlParser}} and {{CacheCreation}} classes. The class {{CacheCreation}} creates a server through {{CacheServerCreation}} and this one extends {{AbstractCacheServer}}, which has some default values configured, overriding the values set by the startup parameters.
> I've been able to reproduce this for the {{max-connections}} configuration property specifically, but my guess is that the bug exists for *all* cache properties that can be configured both through {{gfsh}} startup parameters and {{cache.xml}} / {{cluster.xml}} files.
> As an example, after adding some extra logging on the {{setMaxConnections()}} method, below is the output shown when starting the server:
> {noformat}
> ######## gfsh start server --name=server1 --server-port=40401 --locators=localhost[10101] --max-connections=1033
> [info 2018/05/25 13:55:20.752 IST server1 <main> tid=0x1] Initialization of region PdxTypes completed
> [XXXXX]: CacheServerImpl.setMaxConnections() is changing maxConnections from 800 to 1033.
> java.lang.Throwable
> 	at org.apache.geode.internal.cache.CacheServerImpl.setMaxConnections(CacheServerImpl.java:209)
> 	at org.apache.geode.distributed.ServerLauncher.startCacheServer(ServerLauncher.java:956)
> 	at org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:781)
> 	at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:692)
> 	at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:225)
> [info 2018/05/25 13:55:20.825 IST server1 <main> tid=0x1] CacheServer Configuration:   port=40401 max-connections=1033 max-threads=0 notify-by-subscription=true socket-buffer-size=32768 maximum-time-between-pings=60000 maximum-message-count=230000 message-time-to-live=180 eviction-policy=none capacity=1 overflow directory=. groups=[] loadProbe=ConnectionCountProbe loadPollInterval=5000 tcpNoDelay=true
> ######## gfsh -e start server --name=server1 --server-port=40401 --locators=localhost[10101] --max-connections=1033 --cache-xml-file=$CURRENT_DIRECTORY/server-cache.xml
> [info 2018/05/25 13:56:19.593 IST server1 <main> tid=0x1] Initialization of region PdxTypes completed
> [XXXXX]: CacheServerImpl.setMaxConnections() is changing maxConnections from 800 to 800.
> java.lang.Throwable
> 	at org.apache.geode.internal.cache.CacheServerImpl.setMaxConnections(CacheServerImpl.java:209)
> 	at org.apache.geode.internal.cache.CacheServerImpl.configureFrom(CacheServerImpl.java:304)
> 	at org.apache.geode.internal.cache.xmlcache.CacheCreation.startCacheServers(CacheCreation.java:688)
> 	at org.apache.geode.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:581)
> 	at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:337)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4307)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1434)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1226)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:792)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:778)
> 	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:177)
> 	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:224)
> 	at org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
> 	at org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:844)
> 	at org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:762)
> 	at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:692)
> 	at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:225)
> [info 2018/05/25 13:56:19.929 IST server1 <main> tid=0x1] CacheServer Configuration:   port=40401 max-connections=800 max-threads=0 notify-by-subscription=true socket-buffer-size=32768 maximum-time-between-pings=60000 maximum-message-count=230000 message-time-to-live=180 eviction-policy=none capacity=1 overflow directory=. groups=[] loadProbe=ConnectionCountProbe loadPollInterval=5000 tcpNoDelay=true
> {noformat}
> A reproducible scenario is attached to the JIRA.
> Cheers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)