Hi there Li,

Having the pdx and disk-store settings need to be in the cache-server1.xml, otherwise your pdx serialization or persistence of the pdx meta will not function. The locator is the process the handles membership,etc.. not pdx or diskstore configurations.

There MUST be something else that we are not seeing. Would it be possible to send us the server log file with log-level=config?

--Udo


On 3/21/17 18:14, Yi Li wrote:
Hi Anil,

I managed to resolve it myself in the end. The pdx and disk-store settings must be remove from cache-server1.xml and set from locator.

Thanks!
Li

On Tue, Mar 21, 2017 at 6:54 AM, Yi Li <[email protected] <mailto:[email protected]>> wrote:

    Hi Anil,

    I shut down the cluster by:

    gfsh> shutdown --include-locators=true

    And restarted the cluster using exactly the same sequence of
    commands as the first time I ran it:

    gfsh start locator --name=locator1

    followed by:

    gfsh start server --name="server1"
    --server-bind-address="127.0.0.1" --server-port=40411
     --cache-xml-file="cache-server1.xml" --locators="localhost[10334]"

    Best,
    Li

    On Tue, Mar 21, 2017 at 5:17 AM, Anilkumar Gingade
    <[email protected] <mailto:[email protected]>> wrote:

        What is the command you used to shut-down and re-start the
        cluster?

        -Anil.


        On Mon, Mar 20, 2017 at 6:14 AM, Yi Li <[email protected]
        <mailto:[email protected]>> wrote:

            Hi,

            I have a simple Geode server with the following
            cache-server1.xml :

            <cache...>
                <cache-server/>
                    <disk-store name="pdxDiskStore">
            <disk-dirs>
            <disk-dir>pdxDiskStore</disk-dir>
            </disk-dirs>
                    </disk-store>
                    <pdx
            disk-store-name="pdxDiskStore"
            read-serialized="true"
            persistent="true" />
            </cache>

            And this server is started with

            gfsh start server --name="server1"
            --server-bind-address="127.0.0.1" --server-port=40411
             --cache-xml-file="cache-server1.xml"
            --locators="localhost[10334]"

            I then add a new region with:

            create region --name=regionA --type=REPLICATE_PERSISTENT

            But after shutting down the cluster with shutdown
            --include-locators=true, when I tried to restart the
            cluster, I got the following error for server1:

            Exception in thread "main"
            org.apache.geode.pdx.PdxInitializationException: Could not
            create pdx registry
            at
            
org.apache.geode.pdx.internal.PeerTypeRegistration.initialize(PeerTypeRegistration.java:209)
            at
            
org.apache.geode.pdx.internal.TypeRegistry.creatingDiskStore(TypeRegistry.java:271)
            at
            
org.apache.geode.internal.cache.DiskStoreFactoryImpl.create(DiskStoreFactoryImpl.java:152)
            at
            
org.apache.geode.internal.cache.xmlcache.CacheCreation.createDiskStore(CacheCreation.java:653)
            at
            
org.apache.geode.internal.cache.xmlcache.CacheCreation.initializePdxDiskStore(CacheCreation.java:644)
            at
            
org.apache.geode.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:421)
            at
            
org.apache.geode.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:343)
            at
            
org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4487)
            at
            
org.apache.geode.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1447)
            at
            
org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1247)
            at
            
org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:798)
            at
            
org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:783)
            at
            org.apache.geode.cache.CacheFactory.create(CacheFactory.java:178)
            at
            org.apache.geode.cache.CacheFactory.create(CacheFactory.java:218)
            at
            
org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
            at
            
org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:857)
            at
            
org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:769)
            at
            
org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:696)
            at
            
org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:228)
            Caused by: org.apache.geode.cache.RegionExistsException:
            /PdxTypes
            at
            
org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3250)
            at
            
org.apache.geode.pdx.internal.PeerTypeRegistration.initialize(PeerTypeRegistration.java:203)
            ... 18 more


            Any hint on how to resolve this ?

            Thanks!
            Li





Reply via email to