You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Yi Li <st...@gmail.com> on 2017/03/20 13:14:44 UTC

RegionExistsException: /PdxTypes

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

Re: RegionExistsException: /PdxTypes

Posted by Yi Li <st...@gmail.com>.
Hi Anil,

Thanks for the help! I'll try to reproduce the error with log-level=config
and send you the log.

BTW, I tried 1.0.0 as well and got the same error.

Also, I run Geode on a mac:

$ uname -a
Darwin 10508-yli.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9
23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64

Don't think this should be much of an issue as it's Java unless there's
some network related issue causing events among servers delivered in
different order.

-Li

On Thu, Mar 23, 2017 at 12:26 AM, Anilkumar Gingade <ag...@pivotal.io>
wrote:

> Hi Li,
>
> Udo is right....You should be able to set those in cache-server xml.
>
> I had difficulty in reproducing the issue; will try it again and let you
> know.
>
> -Anil.
>
>
>
>
> On Wed, Mar 22, 2017 at 8:07 AM, Udo Kohlmeyer <uk...@pivotal.io>
> wrote:
>
>> 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 <st...@gmail.com> 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 <ag...@pivotal.io>
>>> 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 <st...@gmail.com> 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.initializ
>>>>> e(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.creat
>>>>> eDiskStore(CacheCreation.java:653)
>>>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.initi
>>>>> alizePdxDiskStore(CacheCreation.java:644)
>>>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.creat
>>>>> e(CacheCreation.java:421)
>>>>> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.crea
>>>>> te(CacheXmlParser.java:343)
>>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXm
>>>>> l(GemFireCacheImpl.java:4487)
>>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.initializeD
>>>>> eclarativeCache(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(GemF
>>>>> ireCacheImpl.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.DefaultServerLauncherC
>>>>> acheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
>>>>> at org.apache.geode.distributed.ServerLauncher.createCache(Serv
>>>>> erLauncher.java:857)
>>>>> at org.apache.geode.distributed.ServerLauncher.start(ServerLaun
>>>>> cher.java:769)
>>>>> at org.apache.geode.distributed.ServerLauncher.run(ServerLaunch
>>>>> er.java:696)
>>>>> at org.apache.geode.distributed.ServerLauncher.main(ServerLaunc
>>>>> her.java:228)
>>>>> Caused by: org.apache.geode.cache.RegionExistsException: /PdxTypes
>>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.createVMReg
>>>>> ion(GemFireCacheImpl.java:3250)
>>>>> at org.apache.geode.pdx.internal.PeerTypeRegistration.initializ
>>>>> e(PeerTypeRegistration.java:203)
>>>>> ... 18 more
>>>>>
>>>>>
>>>>> Any hint on how to resolve this ?
>>>>>
>>>>> Thanks!
>>>>> Li
>>>>>
>>>>
>>>>
>>>
>>
>>
>

Re: RegionExistsException: /PdxTypes

Posted by Anilkumar Gingade <ag...@pivotal.io>.
Hi Li,

Udo is right....You should be able to set those in cache-server xml.

I had difficulty in reproducing the issue; will try it again and let you
know.

-Anil.




On Wed, Mar 22, 2017 at 8:07 AM, Udo Kohlmeyer <uk...@pivotal.io>
wrote:

> 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 <st...@gmail.com> 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 <ag...@pivotal.io>
>> 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 <st...@gmail.com> 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.initializ
>>>> e(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.creat
>>>> eDiskStore(CacheCreation.java:653)
>>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.initi
>>>> alizePdxDiskStore(CacheCreation.java:644)
>>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.creat
>>>> e(CacheCreation.java:421)
>>>> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.crea
>>>> te(CacheXmlParser.java:343)
>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXm
>>>> l(GemFireCacheImpl.java:4487)
>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.initializeD
>>>> eclarativeCache(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(GemF
>>>> ireCacheImpl.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.DefaultServerLauncherC
>>>> acheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
>>>> at org.apache.geode.distributed.ServerLauncher.createCache(Serv
>>>> erLauncher.java:857)
>>>> at org.apache.geode.distributed.ServerLauncher.start(ServerLaun
>>>> cher.java:769)
>>>> at org.apache.geode.distributed.ServerLauncher.run(ServerLaunch
>>>> er.java:696)
>>>> at org.apache.geode.distributed.ServerLauncher.main(ServerLaunc
>>>> her.java:228)
>>>> Caused by: org.apache.geode.cache.RegionExistsException: /PdxTypes
>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.createVMReg
>>>> ion(GemFireCacheImpl.java:3250)
>>>> at org.apache.geode.pdx.internal.PeerTypeRegistration.initializ
>>>> e(PeerTypeRegistration.java:203)
>>>> ... 18 more
>>>>
>>>>
>>>> Any hint on how to resolve this ?
>>>>
>>>> Thanks!
>>>> Li
>>>>
>>>
>>>
>>
>
>

Re: RegionExistsException: /PdxTypes

Posted by Yi Li <st...@gmail.com>.
Hi Udo,

That's interesting! Actually after many hours of trial-and-error, I've
worked out a procedure that has worked beautifully for me so far and it
requires no settings in cache server configuration files at all. This is
what I did:

0. it's a fresh installation without any locator/server subdirectories
1. start the locator:  start locator --name=locator1
2. configure pdx: configure pdx --read-serialized=true
--disk-store=pdxDiskStore
3. start my servers: start server --name=server1 --server-port=40411, start
server --name=server2 --server-port=40412
4. create the region: create region --name=whatever
--type=REPLICATE_PERSISTENT
5. create the disk store for the pdx configured above: create disk-store
--name=pdxDiskStore --dir=pdxDiskStore

After this, I can add new regions, add data, query data, shutdown, restart,
and everything just works. There's no need to change cache-server.xml or
even use it at all.

Am I missing anything ?

Best,
Li

PS: the order is interesting, if I do step 5 before 4, it doesn't work, I
guess that because step 4 would cause the default disk store to be created
first ?


On Wed, Mar 22, 2017 at 11:07 PM, Udo Kohlmeyer <uk...@pivotal.io>
wrote:

> 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 <st...@gmail.com> 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 <ag...@pivotal.io>
>> 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 <st...@gmail.com> 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.initializ
>>>> e(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.creat
>>>> eDiskStore(CacheCreation.java:653)
>>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.initi
>>>> alizePdxDiskStore(CacheCreation.java:644)
>>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.creat
>>>> e(CacheCreation.java:421)
>>>> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.crea
>>>> te(CacheXmlParser.java:343)
>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXm
>>>> l(GemFireCacheImpl.java:4487)
>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.initializeD
>>>> eclarativeCache(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(GemF
>>>> ireCacheImpl.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.DefaultServerLauncherC
>>>> acheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
>>>> at org.apache.geode.distributed.ServerLauncher.createCache(Serv
>>>> erLauncher.java:857)
>>>> at org.apache.geode.distributed.ServerLauncher.start(ServerLaun
>>>> cher.java:769)
>>>> at org.apache.geode.distributed.ServerLauncher.run(ServerLaunch
>>>> er.java:696)
>>>> at org.apache.geode.distributed.ServerLauncher.main(ServerLaunc
>>>> her.java:228)
>>>> Caused by: org.apache.geode.cache.RegionExistsException: /PdxTypes
>>>> at org.apache.geode.internal.cache.GemFireCacheImpl.createVMReg
>>>> ion(GemFireCacheImpl.java:3250)
>>>> at org.apache.geode.pdx.internal.PeerTypeRegistration.initializ
>>>> e(PeerTypeRegistration.java:203)
>>>> ... 18 more
>>>>
>>>>
>>>> Any hint on how to resolve this ?
>>>>
>>>> Thanks!
>>>> Li
>>>>
>>>
>>>
>>
>
>

Re: RegionExistsException: /PdxTypes

Posted by Udo Kohlmeyer <uk...@pivotal.io>.
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 <stat.yili@gmail.com 
> <ma...@gmail.com>> 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
>     <agingade@pivotal.io <ma...@pivotal.io>> 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 <stat.yili@gmail.com
>         <ma...@gmail.com>> 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
>
>
>
>


Re: RegionExistsException: /PdxTypes

Posted by Yi Li <st...@gmail.com>.
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 <st...@gmail.com> 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 <ag...@pivotal.io>
> 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 <st...@gmail.com> 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.initializ
>>> e(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.creat
>>> eDiskStore(CacheCreation.java:653)
>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.initi
>>> alizePdxDiskStore(CacheCreation.java:644)
>>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.creat
>>> e(CacheCreation.java:421)
>>> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.crea
>>> te(CacheXmlParser.java:343)
>>> at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXm
>>> l(GemFireCacheImpl.java:4487)
>>> at org.apache.geode.internal.cache.GemFireCacheImpl.initializeD
>>> eclarativeCache(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(GemF
>>> ireCacheImpl.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.DefaultServerLauncherC
>>> acheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
>>> at org.apache.geode.distributed.ServerLauncher.createCache(Serv
>>> erLauncher.java:857)
>>> at org.apache.geode.distributed.ServerLauncher.start(ServerLaun
>>> cher.java:769)
>>> at org.apache.geode.distributed.ServerLauncher.run(ServerLaunch
>>> er.java:696)
>>> at org.apache.geode.distributed.ServerLauncher.main(ServerLaunc
>>> her.java:228)
>>> Caused by: org.apache.geode.cache.RegionExistsException: /PdxTypes
>>> at org.apache.geode.internal.cache.GemFireCacheImpl.createVMReg
>>> ion(GemFireCacheImpl.java:3250)
>>> at org.apache.geode.pdx.internal.PeerTypeRegistration.initializ
>>> e(PeerTypeRegistration.java:203)
>>> ... 18 more
>>>
>>>
>>> Any hint on how to resolve this ?
>>>
>>> Thanks!
>>> Li
>>>
>>
>>
>

Re: RegionExistsException: /PdxTypes

Posted by Yi Li <st...@gmail.com>.
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 <ag...@pivotal.io>
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 <st...@gmail.com> 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.initializ
>> e(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.creat
>> eDiskStore(CacheCreation.java:653)
>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.initi
>> alizePdxDiskStore(CacheCreation.java:644)
>> at org.apache.geode.internal.cache.xmlcache.CacheCreation.creat
>> e(CacheCreation.java:421)
>> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.crea
>> te(CacheXmlParser.java:343)
>> at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXm
>> l(GemFireCacheImpl.java:4487)
>> at org.apache.geode.internal.cache.GemFireCacheImpl.initializeD
>> eclarativeCache(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(GemF
>> ireCacheImpl.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.DefaultServerLauncherC
>> acheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
>> at org.apache.geode.distributed.ServerLauncher.createCache(Serv
>> erLauncher.java:857)
>> at org.apache.geode.distributed.ServerLauncher.start(ServerLaun
>> cher.java:769)
>> at org.apache.geode.distributed.ServerLauncher.run(ServerLaunch
>> er.java:696)
>> at org.apache.geode.distributed.ServerLauncher.main(ServerLaunc
>> her.java:228)
>> Caused by: org.apache.geode.cache.RegionExistsException: /PdxTypes
>> at org.apache.geode.internal.cache.GemFireCacheImpl.createVMReg
>> ion(GemFireCacheImpl.java:3250)
>> at org.apache.geode.pdx.internal.PeerTypeRegistration.initializ
>> e(PeerTypeRegistration.java:203)
>> ... 18 more
>>
>>
>> Any hint on how to resolve this ?
>>
>> Thanks!
>> Li
>>
>
>

Re: RegionExistsException: /PdxTypes

Posted by Anilkumar Gingade <ag...@pivotal.io>.
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 <st...@gmail.com> 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.DefaultServerLauncherCacheProv
> ider.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
>