Quantcast
Channel: VMware Communities : Unanswered Discussions - vFabric GemFire [ARCHIVED]
Viewing all 532 articles
Browse latest View live

PartitionAttributes Colocation queries

$
0
0

Hi,

I have created two regions:


PartitionResolver resolver = new TradesPartitionResolver();

PartitionAttributes attrs = new PartitionAttributesFactory().
setPartitionResolver(resolver).create();

Region Trades = new RegionFactory().setPartitionAttributes(attrs).create("Trades");
Trades.put("foo", "bar"); 

attrs = new PartitionAttributesFactory().setPartitionResolver(resolver)
.setColocatedWith(Trades.getFullPath()).create();

Region colocated_trade_history = new RegionFactory()
        .setPartitionAttributes(attrs).create("colocated_trade_history");
 colocated_trade_history.put("foo", "bar");


 

On one server (Server 1)I have entered data in both the regions(Trade and colocated_trade_history). On the other server names Server 2(on the same LAN), through Xml file i have started the cacheserver.

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cache PUBLIC
    "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN"
   
<cache>
     <cache-server port="10334" />
<region name="colocated_trade_history" refid="PARTITION" />
</cache>

 

 

Now the problem I am facing is:

1. How should I make the processing of colocated_trade_history region in Server 2.

2. Will there be any logs on the server 2 on the dos prompt of cacheserver reflecting that the processing is done here.



Gemfire Query Performance

$
0
0

Hi guys,

 

Currently I build Client-Server model with gemfire 6.5 and the cache is Partition with redundant default 0. And the authentication is configured.

 

There're two cache servers and one locator. The total bucket is 7. The related query fields has been indexed.

 

Then I put about 25G data(about 7 million entities) into the cache server.

 

But the query time is about 6ms that only calculate the Query.execute() run time and the OQL conly contains one indexed field.

 

The OQL example:  "select * from /Region1 where field1 = 'value1' ".

 

If I set the total bucket to 1 and only start one cache server then the query time is about 2ms. This is the lowest.

 

I'm confused that the query performance is so bad.

 

By print the query log on the cache server, the query is less than the total time about 1.5ms.

 

Where does the 1.5ms cost?

 

Whether will the authentication reduce the query performance?

 

Is there any other configuration to improve the performance?

Gemfire supports RFID application in M2M environment

$
0
0

Hi Everyone:

 

I have seen old Gemfire Real-Time Event Technical White Paper slides to refer some CEP and RFID business application introduction.

 

Has someone(Gemfire Expert or Guru) these hand-on experences for Gemfire-RFID proposals or solutions?

 

Best Regards!

 

Thank you very much!

 

 

theseus yang

 

theseus.xujun.yang@accenture.com

What is the CONNECTION_POOL_SIZE setting for?

$
0
0

How is it different from min-connections setting at the <pool> level?

 

thanks.

Gemfire function timeout

$
0
0

I need to run a function at the server side to clean up some old data. The function execution would take 5-10 min, and I set the Server's maximum-time-between-pings to 10 min and the Client's read-timeout to 10min. But there is still a broken pipe exception from the server side. How can I fix it?

 

Topology: Client/Server

Gemfire version: 6.5

Difference in write time in a region

$
0
0

I have a distributed region(configured through xml). I am inserting 100,000 records into it. Now there are three scenarios under which i am inserting records.

1. All the data on one server and on one node in which it takes 5 sec to write.

2. All the data on one server but on two nodes in which it takes 97 sec.

3. Now I have one distributed server on which I have started a gemfire server and from another server I am inserting the data in which it takes 137 secs.

 

Can you please let me know why there is such latency? Am i missing any configuration changes somewhere (in chache.xml or gemfire.properties)?

Introspecting gemfire_modules_sessions region

$
0
0

i am trying to run this query in data browser

 

select sessionContext from /gemfire_modules_sessions

 

 

I get this exception

 

---------------------------
DataBrowser Error
---------------------------
Following error occurred:
Failed to execute a Query : com.gemstone.gemfire.cache.client.ServerOperationException: com.gemstone.gemfire.SerializationException: failed serializing object
Caused by com.gemstone.gemfire.SerializationException: failed serializing object
Caused by java.io.NotSerializableException: org.apache.catalina.session.StandardSessionContext
Please check logs for further details.
---------------------------
OK  
---------------------------

 

Please suggest

Partition Regions - Client not receving all updates

$
0
0

Hi,

 

I am facing an issue with client-subscription. My PROXY client is not receiving all the updates from the cache. Cache has all the regions(defined as partitioned region).

 

I have verified from the client -statistics that client received only around 27K updates for a region, which has 60K+ rows.

Client is connected to one of the partiotioned VM. I also noticed that this behavior can be easily seen across the gateway.  i.e. Update on site 1. data gets replicated to site-2. and site-2 cache's client is misisng updates. It is reproducable when I try to push around 1.8 GB of data across the WAN.

 

 

Is there any special configuration required for Partitioned cache's clients?


Continues Query doesn't publish inconsistent event type to CQ client

$
0
0

Continues Query doesn't publish the corrent event type to CQ client.

 

Example:

 

1. register the CQ and get initial result

2. initial result returns 5 objects

3. Update the cached object and make all 5 objects not meeting the CQ criteria

4. CQ client receive 5 - DELETE event.

5. Update all 5 objects to meet the CQ criteria

6. Here is the problem. We expect CQ client receives 5 ADD event.  But we experiencing inconsistent event type - sometimes ADD, sometimes the event type is Update.

 

Region configuration: PARTITION REGION WITH ONE COPY

 

If anybody can help. Highly appreciate.

Databrowser - ClassNotFoundException

$
0
0

I am trying to run simple OQL query in Data Browser.

I am getting ClassNotFoundException although I have that jar on classpath, which has the class.

 

Please suggest.

Why is client request timeout take so long?

$
0
0

I have noticed that the timeout duration for the request is releated to value of the pool's min-connections? Can anyone confirm this?

 

My client setting is ...

 

<pool name="PrintServerClient" server-group="print-servers" min-connections="25">

<locator port="55221" host="gemfire-locator1" />
<locator port="55221" host="gemfire-locator2" />
</pool>
I am simulating timeout for the request by configuring the firewall to drop all packets to cacheserver port on the server
I noticed that for min-connections=25, the client request doesn't timeout until after 55 minutes and for min-connections=3, the client timeouts after 6 minutes.
Can anyone explain what is happening under the hood?
My client is the native C#
[config 2012/11/05 04:05:34.878458 Pacific Standard Time VCLP12:8268 10960] Using GemFire Native Client Product Directory: D:\Websites\CLIP\COS20\GemfireBin
[config 2012/11/05 04:05:34.878458 Pacific Standard Time VCLP12:8268 10960] Product version: vFabric GemFire Native Client 3.6.3.0 build 5548 06/05/2012 10:43:55 PDT
[config 2012/11/05 04:05:34.878458 Pacific Standard Time VCLP12:8268 10960] Source revision: 5548
[config 2012/11/05 04:05:34.878458 Pacific Standard Time VCLP12:8268 10960] Source repository: gfcpp/branches/ThinClient
My server is 6.3.3.4
Java version:   6.6.3.4 build 38188 09/26/2012 09:37:29 PDT javac 1.6.0_26
  Native version: 6.5  06/02/2010 11:16:48 PDT optimized i386 Linux 2.4.21-47.EL
  Source revision: 38188
  Source repository: gemfire/branches/gemfire663X_maint
  Running on: /10.40.16.53, 2 cpu(s), amd64 Linux 3.0.0-12-server
  Process ID: 27865
Thanks.

what does this error in WAN gateway log mean?

$
0
0

Java version:   6.6.3.4 build 38188 09/26/2012 09:37:29 PDT javac 1.6.0_26
  Native version: 6.5  06/02/2010 11:16:48 PDT optimized i386 Linux 2.4.21-47.EL
  Source revision: 38188
  Source repository: gemfire/branches/gemfire663X_maint
  Running on: /10.30.10.67, 8 cpu(s), amd64 Linux 3.0.0-16-server
  Process ID: 4144
  User: svc-gemfire

 

 

 

[warning 2012/12/13 14:22:09.809 PST  <Handshaker /10.30.10.68:11011 Thread 1> tid=0xf2] Bridge server: failed accepting                                                                 client connection  java.io.EOFException

 

 

[warning 2012/12/13 14:22:14.829 PST  <Handshaker /10.30.10.68:11011 Thread 1> tid=0xf2] Bridge server: failed accepting client connection  java.io.EOFException

 

[warning 2012/12/13 14:22:19.849 PST  <Handshaker /10.30.10.68:11011 Thread 1> tid=0xf2] Bridge server: failed accepting client connection  java.io.EOFException

Java heap space occurs by problem with Gemfire Region

$
0
0
Hi,
I have a big problem with my application.
This is working with 2 servers (Gemfire) in cluster and a thread procces that is running every five minutes, in this thread there is a procces that make a object and put it in a gemfire region (scope="distributed-ack" data-policy="persistent-replicate") , the problems is that when the procces put a object in this region, make a clear in this an then put the objetct in the primary server this work fine, but in the second server when the object is replicated in the region, the other objects are not erased, and the region grows indefinitely and after a time the server crash because occurs a have heap space.
I need help with that.

Gemfire Authentication - Performance Impact

$
0
0

We enabled authentication in our application and are seeing a drop by 25% in system performance. We have two clients in the DS. One which publishes the data(using putall) and another is only subscriber. As per the documentation below looks like client will get authenticated with a token generated each time.

 

a) Does it apply to subscriber only as well as publisher?

b)Is it expected performance drop?

c) Also if client gets token each time, when i enabled fine logging, why dont i see the token information?

 

 

 

 

 

•     Joining peer members are authenticated by the locator to which they connect.

 

•     Clients are authenticated by their server during the connection initialization and for each operation request.

 

•     Servers may be authenticated by their clients during the connection initialization.

 

•     Gateways mutually authenticate each other when they connect.

 

•     For each operation request after the initial connection is established:

 

o     The client sends the request with the unique identifier it received from the server in the last communication.

 

 

 

o     The server verifies the identifier and processes the request, then responds with a new randomly generated unique identifier, for the client to include in its next request.

 

 

Client Authentication Process

The client authentication process occurs for each connection established by a pool, regardless of whether the pool is configured for process-wide or single user connections. All credentials are checked for each connection between client and server, including the server-to-client notification channel.

 

http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.gemfire.6.6/managing/monitor_tune/socket_communication.html

Entry destroyed exception

$
0
0

Hi,

 

In application, When replicated region is used, some of the entries are scheduled to expire in future.  Currently ExpirationAttributes used to expire the entry in future. I beleive this attribute also replicated to other members. Entries are expirying as expected. But when these entries are expired, they are also expired in other replicated members (node) at the same time.

 

But this expiry itself replicated to other members and fails with exception "Entry destroyed". How to handle this scenario?

 

Thanks


OQL 3 joins and index usage

$
0
0

Hi,

 

I'm observing slow OQL and it seems it's because the indexes are not used. Assume there are 3 regions A, B and C. given the query:

"select distinct c.branchId from A as a, B as b, C as c where a.loginId='user' and  a.communityId=b.id and b.id=c.communityId"

The indexes and names are:

loginId

communityId (for A)

id

communityId (for C)

 

All 3 regions are replicated global scope regions. The region sizes are:

A Size=6554

B Size=1935

C Size=2177

 

the GF query log says:

Query Executed in 45010.18 ms; indexesUsed(3):id(Results: 0),A.loginId(Results: 11),communityId(Results: 11062) "select distinct c.branchId from A as a, B as b, C as c where a.loginId='user' and  a.communityId=b.id and b.id=c.communityId"

 

Why so long? Why only 3 indexes? We have the data also persisted to SQL so it's pretty easy to verify same query against the region's SQL tables. In SQL same exact query executes instantly. Maybe there is an issue that the indexes A and C have same expression and name 'communityId'? Or is there a limit in GF query optimizer when it sees more than 2 joins, it doesn't consider the indexes properly?

 

Thank you

Gemfire Error -Since a cache already existed a pool should also exist

$
0
0

I am getting the below error on client side while creating a cache object via ClientCacheFactory.

 

Caused by: java.lang.IllegalStateException: Since a cache already existed a pool should also exist.

        at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.determineDefaultPool(GemFireCacheImpl.java:2255)

        at com.gemstone.gemfire.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:194)

        at com.gemstone.gemfire.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:161)

 

Although the error goes away with a sequential restart of cache server and client.Please suggest how to avoid this.

 

 

Regards,

The function is not registered for function id TopTenListFunction

$
0
0

Hi,

 

I am trying to get up and running function related sample.  Usually it works. But I need to ensure, function always executed strictly in the server. Hence I have two different JVM

 

1) Server VM

 

<cache>
    <cache-server port="40404" />
    <region name="exampleRegion">
        <region-attributes refid="REPLICATE">
        </region-attributes>
    </region>
    <function-service>
        <function>
            <class-name>testcache.TopTenListFunction</class-name>
        </function>
    </function-service>
</cache>

 

2)      System.out.println("Functions...\n" + Arrays.deepToString(FunctionService.getRegisteredFunctions().keySet().toArray())); - This line in server process confirms that there is function registered in the server with id "testcache.TopTenListFunction"

 

3) Trying to execute using client cache JVM

 

<client-cache>
    <pool name="client" subscription-enabled="true">
        <server host="localhost" port="40404" />
    </pool>

 

    <region name="exampleRegion">
        <region-attributes refid="PROXY">
        </region-attributes>
    </region>
</client-cache>

 

4)  Invoking function using..

 

     ClientCache clientCache = new ClientCacheFactory()
                .set("name", "ClientWorker")
                .set("cache-xml-file", "xml2/FunctionClient.xml").create();

 

     Execution execution = FunctionService.onServer(clientCache)         
                .withArgs(Boolean.TRUE)
                .withCollector(new MyArrayListResultCollector());
        ResultCollector rc = execution.execute("nikias.testcache.TopTenListFunction");

 

But what I get is exception like below..

 

 

 

Exception in thread "main" com.gemstone.gemfire.cache.client.ServerOperationException: The function is not registered for function id testcache.TopTenListFunction
    at com.gemstone.gemfire.cache.client.internal.AbstractOp.processObjResponse(AbstractOp.java:281)
    at com.gemstone.gemfire.cache.client.internal.GetFunctionAttributeOp$GetFunctionAttributeOpImpl.processResponse(GetFunctionAttributeOp.java:38)
    at com.gemstone.gemfire.cache.client.internal.AbstractOp.attemptReadResponse(AbstractOp.java:160)
    at com.gemstone.gemfire.cache.client.internal.AbstractOp.attempt(AbstractOp.java:361)
    at com.gemstone.gemfire.cache.client.internal.ConnectionImpl.execute(ConnectionImpl.java:233)
    at com.gemstone.gemfire.cache.client.internal.pooling.PooledConnection.execute(PooledConnection.java:323)
    at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.executeWithPossibleReAuthentication(OpExecutorImpl.java:894)
    at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:145)
    at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:106)
    at com.gemstone.gemfire.cache.client.internal.PoolImpl.execute(PoolImpl.java:623)
    at com.gemstone.gemfire.cache.client.internal.GetFunctionAttributeOp.execute(GetFunctionAttributeOp.java:19)
    at com.gemstone.gemfire.internal.cache.execute.ServerFunctionExecutor.execute(ServerFunctionExecutor.java:314)
    at nikias.testcache.FunctionClient.main(FunctionClient.java:88)

 

Q1) Is the below line is causing issue? I am passing clientCache instead of server reference? if so, How to pass the reference of the server?

 

     Execution execution = FunctionService.onServer(clientCache)         
                .withArgs(Boolean.TRUE)
                .withCollector(new MyArrayListResultCollector());
        ResultCollector rc = execution.execute("testcache.TopTenListFunction");

 

Q2) if server refid="REPLICATE", what could be my client-cache refid, so I could ensure, function executed on the server?

 

Q3) How to ensure function executed by CacheServer? i.e, Ensure executed by other  than the JVM which invokes the function?

 

Please note I have one eclipse project on windows, so I can't reduce visibility in the classpath scope

 

Regards

Problem starting Pulse tool hosted in Tomcat

$
0
0

I have the pulse.war file hosted in a Tomcat instance and I am trying to get it to connect to my Gemfire 7 cluster via a locator running as a JMX Manager. The locator and my only gemfire cache server node in the cluster seem to both be communicating and operating properly and I can start the Pulse application but I don't see any stats relating to my gemfire cluster in the Pulse web interface. Furthermore in the catalina.out log file of the Tomcat server where I am running Pulse I am getting repeating stack traces like the following:

 

 

INFO: [Pulse] Creating New Cluster Thread...
Jan 29, 2013 5:55:09 PM com.vmware.gemfire.tools.pulse.internal.data.Cluster updateData
INFO: [Pulse] Updating Cluster data for Cluster :idcprdgflocator1:20003
Jan 29, 2013 5:55:09 PM com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater isConnected
INFO: [Pulse] Connection Not Found. Get new connection..
Jan 29, 2013 5:55:09 PM com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater getJMXConnection
INFO: [Pulse] Use Locator = true
Jan 29, 2013 5:55:09 PM com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater getJMXConnection
INFO: [Pulse] Locator host: idcprdgflocator1 and port: 20003
Jan 29, 2013 5:55:09 PM com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater getJMXConnection
INFO: [Pulse] Locator found jmx manager details : host 10.50.30.199 port 1099
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
        at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
        at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2329)
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater.getJMXConnection(Cluster.java:2101)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater.isConnected(Cluster.java:2168)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater.updateData(Cluster.java:2199)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster.updateData(Cluster.java:1170)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster.run(Cluster.java:1141)
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:189)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
        ... 12 more
java.lang.NullPointerException
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster$JMXDataUpdater.updateData(Cluster.java:2209)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster.updateData(Cluster.java:1170)
        at com.vmware.gemfire.tools.pulse.internal.data.Cluster.run(Cluster.java:1141)

 

 

 

Please let me know if you need more info or log files and I can post it.

Thanks

Tom

GemFire 7, PDX and ClassCastException

$
0
0

I'm running a fairly simple region. Or I thought I was...

Key is a Long.

Value is a custom class. Inside value class is a few member variables and a set of attributes modelled as a TreeSet (which is there for ordering).

 

There are a half dozen possible attributes, each subclassed from a common root. Each implements Comparable<Root>.

 

Region is PDX serialized.

I implement PdxSerializable in ~all~ the classes that can be in the value.

 

Regular gets and puts work fine. Region loads fine. All looks good until I start with the OQL....

 

When I try to execute a query such as the one below (using spring-data and a GemfireTemplate) I'm getting a ClassCastException server side.

Debugging has me in the TreeMap.put<K,V) code @542 - Comparable<? super K> k = (Comparable<? super K>) key;

 

The query is not complicated: SELECT DISTINCT a.value FROM /(myregion).entries a WHERE a.key = $1; Here $1 is just 1L.

 

My question(s):

 

Is there some strangeness with TreeSet and PDX I don't know about?

Or did I misunderstand something?

If so can anyone help me see what?

If not and it is a limitation, is there a workaround?

 

Clearly this is something silly, but I'm not a PDX expert so I'm not sure what I missed.

Any ideas anyone?

Viewing all 532 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>