Good day.

Thanks for all the suggestions.

When I *disabled the Management functionality* everything worked. The
function is now running.

I am now following this advice from John and using gfsh:
"you can still start a Locator using Gfsh, have the *Spring* configured
Apache Geode Server connect to that Locator and connect to the cluster and
manage the *Spring* node as you would if the *Spring* configured node
started everything"

Using the above I could still connect Pulse to my Geode Server started by
Spring and monitor the server and gets stats.

There was an error as the function executed that I can now see and debug.

Thanks for all the help.

Kindly
Pieter



On Tue, May 29, 2018 at 11:08 PM, Darrel Schneider <[email protected]>
wrote:

> If you verified the region name and key it blows up on it might give you a
> clue.
> The call stack shows this was an LRU region. By calling "get" on the
> server from a function, it causes geode to attempt to deserialize the value
> on the server. Previous to this the value would have been in serialized
> form. The size of a deserialized value is different from a serialized value
> so it is trying to recompute the size of the deserialized value and that is
> the code that throws the exception.
> It seems you have found a case in which we can deserialize successfully
> but then when we try to compute the size of the deserialized value it runs
> into problems.
>
> On Tue, May 29, 2018 at 1:58 PM, John Blum <[email protected]> wrote:
>
>> Because you enabled Management functionality on the *Spring*-configured
>> Geode Server started with *Gfsh.*..
>>
>> <util:properties id="gemfire-props">
>>     <prop key="log-level">info</prop>
>>     <prop key="locators">pvz-dell.lautus.net[10334]</prop>
>>     <prop key="start-locator">pvz-dell.lautus.net[10334]</prop>
>>     <!--<prop key="start-locator">>pvz-dell.lautus.net[10335]</prop>-->
>>     <prop key="mcast-port">0</prop>
>>
>> *    <prop key="http-service-port">0</prop>*
>>
>>
>>
>>
>>
>> *    <prop key="jmx-manager">true</prop>    <prop
>> key="jmx-manager-port">1099</prop>    <prop
>> key="jmx-manager-start">true</prop>    <!--<prop
>> key="jmx-manager-ssl">true</prop>-->    <!--<prop
>> key="jmx-manager-http-port">8080</prop>-->*</util:properties>
>>
>> And had the Management HTTP port been enabled (i.e. not 0, as it were
>> previously) then this is what would have required the Jetty JARs to be on
>> the classpath since the embedded HTTP service is bootstrapped with Jetty
>> under the Geode hood.
>>
>> Other than *Pulse* or the *Developer REST API*, I don't recall what
>> other Apache Geode embedded services would require Jetty, and especially
>> refer to Jetty classes (outside of Management).  There is nothing in SDG
>> that requires or pulls in Jetty classes.  And when the "
>> *http-service-port*" is disabled (i.e. 0) the Jetty container should not
>> even startup.
>>
>> However, if some internal Apache Geode Management (message) class (or
>> classes) was/were referring to a Jetty class in some way, then this might
>> explain the serialization issue.
>>
>> What happens when you disable Management on this node?
>>
>> Note, you can still start a Locator using Gfsh, have the *Spring*
>> configured Apache Geode Server connect to that Locator and connect to the
>> cluster and manage the *Spring* node as you would if the *Spring*
>> configured node started everything.  There are many ways to do this; what
>> you have is the most convenient, especially when you are just working
>> directly inside your IDE, but if you are using *Gfsh* anyway, then,
>> well...   Anyway, see here [1] for an example of what I refer to.
>>
>> -j
>>
>> [1] https://github.com/jxblum/spring-boot-gemfire-server-example
>>
>>
>> On Tue, May 29, 2018 at 1:08 PM, Pieter van Zyl <
>> [email protected]> wrote:
>>
>>> Hi Anthony
>>>
>>> Starting the server with Spring.
>>>
>>> Will add the vm setting and see what I can find
>>> Can try and start it with gfsh as well
>>>
>>> Kindly
>>> Pieter
>>>
>>> On Tue, 29 May 2018 at 9:55 PM Anthony Baker <[email protected]> wrote:
>>>
>>>> Just curious, are you starting your server(s) with Spring or gfsh?
>>>>
>>>> The only references I see to org/eclipse/jetty/server/Server are not
>>>> related:
>>>>
>>>> ~/code/incubator-geode (develop)$ git grep
>>>> 'org.eclipse.jetty.server.Server\;' . | grep -v test
>>>> geode-core/src/main/java/org/apache/geode/management/internal/JettyHelper.java:import
>>>> org.eclipse.jetty.server.Server;
>>>> geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java:import
>>>> org.eclipse.jetty.server.Server;
>>>> geode-core/src/main/java/org/apache/geode/management/internal/RestAgent.java:import
>>>> org.eclipse.jetty.server.Server;
>>>>
>>>> You might try starting the jvm with `-verbose:class` to help identify
>>>> which class is referencing Jetty.
>>>>
>>>>
>>>> Anthony
>>>>
>>>>
>>>> > On May 29, 2018, at 12:04 PM, Pieter van Zyl <
>>>> [email protected]> wrote:
>>>> >
>>>> > Good day
>>>> >
>>>> >
>>>> > I am trying to execute a function on the server that will iterate
>>>> through all my regions and their content.
>>>> >
>>>> > I am getting the error below when trying to get a value out of a
>>>> region
>>>> >
>>>> >
>>>> > [fatal 2018/05/29 19:28:02.829 SAST <ServerConnection on port 40404
>>>> Thread 1> tid=0x53] Server connection from 
>>>> [identity(10.0.0.5(5166:loner):37736:45b2f0ac,connection=1;
>>>> port=38136] : Unexpected Error on server
>>>> > java.lang.NoClassDefFoundError: Lorg/eclipse/jetty/server/Server;
>>>> > at java.lang.Class.getDeclaredFields0(Native Method)
>>>> > at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>>>> > at java.lang.Class.getDeclaredFields(Class.java:1916)
>>>> > at org.apache.geode.internal.size.ReflectionSingleObjectSizer.s
>>>> izeof(ReflectionSingleObjectSizer.java:98)
>>>> > at org.apache.geode.internal.size.ReflectionSingleObjectSizer.s
>>>> izeof(ReflectionSingleObjectSizer.java:79)
>>>> > at org.apache.geode.internal.size.ReflectionSingleObjectSizer.s
>>>> izeof(ReflectionSingleObjectSizer.java:47)
>>>> > at org.apache.geode.internal.size.CachingSingleObjectSizer.size
>>>> of(CachingSingleObjectSizer.java:38)
>>>> > at org.apache.geode.internal.size.ObjectGraphSizer$SizeVisitor.
>>>> visit(ObjectGraphSizer.java:222)
>>>> > at org.apache.geode.internal.size.ObjectTraverser$VisitStack.ad
>>>> d(ObjectTraverser.java:160)
>>>> > at org.apache.geode.internal.size.ObjectTraverser.doSearch(Obje
>>>> ctTraverser.java:83)
>>>> > at org.apache.geode.internal.size.ObjectTraverser.breadthFirstS
>>>> earch(ObjectTraverser.java:50)
>>>> > at org.apache.geode.internal.size.ObjectGraphSizer.size(ObjectG
>>>> raphSizer.java:98)
>>>> > at org.apache.geode.internal.size.ReflectionObjectSizer.sizeof(
>>>> ReflectionObjectSizer.java:66)
>>>> > at org.apache.geode.internal.size.SizeClassOnceObjectSizer.size
>>>> of(SizeClassOnceObjectSizer.java:60)
>>>> > at org.apache.geode.internal.cache.eviction.SizeLRUController.s
>>>> izeof(SizeLRUController.java:68)
>>>> > at org.apache.geode.internal.cache.eviction.HeapLRUController.e
>>>> ntrySize(HeapLRUController.java:92)
>>>> > at org.apache.geode.internal.cache.entries.VersionedStatsDiskLR
>>>> URegionEntryHeapLongKey.updateEntrySize(VersionedStatsDiskLR
>>>> URegionEntryHeapLongKey.java:207)
>>>> > at org.apache.geode.internal.cache.VMLRURegionMap.beginChangeVa
>>>> lueForm(VMLRURegionMap.java:178)
>>>> > at org.apache.geode.internal.cache.VMCachedDeserializable.getDe
>>>> serializedValue(VMCachedDeserializable.java:119)
>>>> > at org.apache.geode.internal.cache.TXEntryState.getValue(TXEntr
>>>> yState.java:468)
>>>> > at org.apache.geode.internal.cache.TXState.getDeserializedValue
>>>> (TXState.java:1522)
>>>> > at org.apache.geode.internal.cache.TXStateProxyImpl.getDeserial
>>>> izedValue(TXStateProxyImpl.java:315)
>>>> > at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.
>>>> java:1384)
>>>> > at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.
>>>> java:1334)
>>>> > at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.
>>>> java:1319)
>>>> > at org.apache.geode.internal.cache.AbstractRegion.get(AbstractR
>>>> egion.java:408)
>>>> > at org.rdb.geode.session.object.GeodeObjectStore.loadFromRegion
>>>> (GeodeObjectStore.java:333)
>>>> > at org.rdb.geode.session.object.GeodeObjectStore.loadFieldsFrom
>>>> Geode(GeodeObjectStore.java:238)
>>>> > at org.rdb.geode.session.object.GeodeObjectStore.loadFields(Geo
>>>> deObjectStore.java:157)
>>>> > at org.rdb.geode.session.object.GeodeObjectStore.mapperLoad(Geo
>>>> deObjectStore.java:198)
>>>> > at org.rdb.geode.session.object.GeodeObjectStore.load(GeodeObje
>>>> ctStore.java:185)
>>>> > at org.rdb.geode.session.GeodeDatabaseSession.load(GeodeDatabas
>>>> eSession.java:80)
>>>> > at org.rdb.geode.server.functions.validation.ValidateAllRegions
>>>> Function.execute(ValidateAllRegionsFunction.java:106)
>>>> > at org.apache.geode.internal.cache.tier.sockets.command.Execute
>>>> Function66.executeFunctionaLocally(ExecuteFunction66.java:332)
>>>> > at org.apache.geode.internal.cache.tier.sockets.command.Execute
>>>> Function66.cmdExecute(ExecuteFunction66.java:257)
>>>> > at org.apache.geode.internal.cache.tier.sockets.command.Execute
>>>> Function70.cmdExecute(ExecuteFunction70.java:54)
>>>> > at org.apache.geode.internal.cache.tier.sockets.BaseCommand.exe
>>>> cute(BaseCommand.java:164)
>>>> > at org.apache.geode.internal.cache.tier.sockets.ServerConnectio
>>>> n.doNormalMsg(ServerConnection.java:869)
>>>> > at org.apache.geode.internal.cache.tier.sockets.OriginalServerC
>>>> onnection.doOneMessage(OriginalServerConnection.java:77)
>>>> > at org.apache.geode.internal.cache.tier.sockets.ServerConnectio
>>>> n.run(ServerConnection.java:1217)
>>>> > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>> Executor.java:1149)
>>>> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>> lExecutor.java:624)
>>>> > at org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$4$
>>>> 1.run(AcceptorImpl.java:644)
>>>> > at java.lang.Thread.run(Thread.java:748)
>>>> > Caused by: java.lang.ClassNotFoundException:
>>>> org.eclipse.jetty.server.Server
>>>> > at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>>> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
>>>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>>> > ... 44 more
>>>> >
>>>> >
>>>> > I checked and none of our classes use Jetty.
>>>> > I was wondering if it could be related to packages that should be
>>>> excluded from being tried to serialize/deserialize?
>>>> > Maybe related to: https://issues.apache.org/jira/browse/GEODE-4822
>>>> >
>>>> > Versions:
>>>> >
>>>> > compile 'org.springframework.data:spring-data-geode:2.1.0.BUILD-SNAP
>>>> SHOT'
>>>> > compile group: 'org.apache.geode', name: 'geode-core', version:
>>>> '1.7.0-SNAPSHOT'
>>>> >
>>>> >
>>>> > Configs:
>>>> >
>>>> > <util:properties id="gemfire-props">
>>>> >     <prop key="log-level">info</prop>
>>>> >     <prop key="locators">pvz-dell.lautus.net[10334]</prop>
>>>> >     <prop key="start-locator">pvz-dell.lautus.net[10334]</prop>
>>>> >     <!--<prop key="start-locator">>pvz-dell.lautus.net
>>>> [10335]</prop>-->
>>>> >     <prop key="mcast-port">0</prop>
>>>> >     <prop key="http-service-port">0</prop>
>>>> >
>>>> >     <prop key="jmx-manager">true</prop>
>>>> >     <prop key="jmx-manager-port">1099</prop>
>>>> >     <prop key="jmx-manager-start">true</prop>
>>>> >     <!--<prop key="jmx-manager-ssl">true</prop>-->
>>>> >     <!--<prop key="jmx-manager-http-port">8080</prop>-->
>>>> > </util:properties>
>>>> >
>>>> > <!-- copy-on-read: https://gemfire.docs.pivotal.i
>>>> o/geode/basic_config/data_entries_custom_classes/managing_da
>>>> ta_entries.html-->
>>>> > <gfe:cache properties-ref="gemfire-props"
>>>> pdx-serializer-ref="pdxSerializer" pdx-persistent="true"
>>>> >            pdx-disk-store="pdx-disk-store"
>>>> eviction-heap-percentage="70" critical-heap-percentage="80"
>>>> >            id="gemfireCache"/>
>>>> >
>>>> > <!--&lt;!&ndash; Note the SpEL expression here used to dynamically
>>>> configure an available port in the given range &ndash;&gt;-->
>>>> > <!--<gfe:cache-server port="40404"/>-->
>>>> >
>>>> > <gfe:cache-server port="40404" socket-buffer-size="10000000"
>>>> max-threads="200"
>>>> >                   bind-address="pvz-dell.lautus.net"/>
>>>> >
>>>> > <!--<gfe:transaction-manager id="txManager"/>-->
>>>> >
>>>> > <gfe:transaction-manager id="gemfireTransactionManager"
>>>> cache-ref="gemfireCache"/>
>>>> >
>>>> >
>>>> > <bean id="pdxSerializer" class="org.rdb.geode.mapping.R
>>>> DBGeodeSerializer2">
>>>> >     <constructor-arg value="org.rdb.*,net.lautus.*"/>
>>>> > </bean>
>>>> >
>>>> >
>>>> > public class RDBGeodeSerializer2
>>>> >         extends ReflectionBasedAutoSerializer
>>>> >
>>>> >
>>>> >
>>>> > <gfe:replicated-region id="net.lautus.gls.domain.comm
>>>> on.validation.BusinessRuleValidator"
>>>> >                        disk-store-ref="tauDiskStore"
>>>> statistics="true" persistent="true" scope="distributed-no-ack"
>>>> >                        enable-async-conflation="true"
>>>> >                        enable-subscription-conflation="true">
>>>> <!--<gfe:cache-listener ref="cacheListener"/>-->
>>>> >     <gfe:eviction type="HEAP_PERCENTAGE" action="OVERFLOW_TO_DISK"/>
>>>> > </gfe:replicated-region>
>>>>
>>>>
>>
>>
>> --
>> -John
>> john.blum10101 (skype)
>>
>
>

Reply via email to