Product Examples Troubleshooting Checklist

Product Examples Troubleshooting Checklist

This topic covers possible problems with running the examples and suggests corrective actions.

If your problems are not resolved here, please contact Pivotal technical support at

Connection Problems

If you get errors indicating you are unable to join the distributed system, you might have to change firewall settings or your distributed system connection information.

Connection problems due to firewall restrictions

GemFire is a network-centric distributed system, so if you have a firewall running on your machine it could cause connection problems. For example, your connections may fail if your firewall places restrictions on inbound or outbound permissions for Java-based sockets. You may need to modify your firewall configuration to permit traffic to Java applications running on your machine. The specific configuration depends on the firewall you are using.

Connection problems due to system member discovery conflict

By default, the examples use multicasting for system member discovery. You might run into connection problems because you are unable to use multicasting or because you need to use a different multicast port.

On Systems with Multicasting

If your system is configured for multicasting, connection problems might be due to contention between GemFire and non-GemFire applications for the same multicast port. GemFire is configured to use port 10334 by default. To change the port you use for the examples, edit the file in the examples quickstart directory and change the setting for mcast-port. You might want to check with your system administrator to be sure you are switching to an unused port.

On Systems without Multicasting

If you are not able to use multicasting, you can use the GemFire locator process instead. To do this, start a GemFire locator to listen on a port of your choosing with the command. At a gfsh prompt, type:

gfsh>start locator --name=my_locator --port=yourPort

then modify the file in the examples quickstart directory, setting the multicast port to zero (mcast-port=0) and the locators property to the host and port where you started the locator (locators=locator_hostname[yourPort]).

For example, you can start a locator (named locator1) with this command on a machine named "rosa":

gfsh>start locator --name=locator1 --port=10987

and modify the file:


Exception in thread "main" java.lang.NoClassDefFoundError

If you have problems finding the classes used in the examples, verify that you have completed all environment configuration steps in Installing Pivotal GemFire and Setting Up the Product Examples, so Java can find the product jar files and the quick start example classes.

Exception . . . CacheXML file/resource . . . does not exist

If you have problems finding the xml files used in the examples, verify that you have completed all environment configuration steps in Installing Pivotal GemFire and Setting Up the Product Examples and that you are in the example installation quickstart directory, the parent directory to the xml directory where the cache configuration files are stored. If you do not have your environment configured properly or you are not in the quickstart directory, you may see errors like this:

Exception in thread "main" com.gemstone.gemfire.cache.CacheXmlException: 
Declarative Cache XML file/resource "xml\BenchmarkHierarchicalServer.xml" 
does not exist

Exception . . . Cannot create region

If program startup fails with an exception similar to the one listed below, a conflict may exist with an example that is already running.

Exception in thread "main" java.lang.IllegalStateException: Cannot 
create region /root/exampleRegion with DISTRIBUTED_ACK scope because 
another cache has same region with DISTRIBUTED_NO_ACK scope at

This conflict can occur if two examples are run at the same time with the same distributed system settings and different example region configuration. Distributed regions must satisfy consistency requirements across the system. Thus if you try to create a region that is already defined by another process in the system and your new region configuration conflicts with the existing one, the creation fails.

Check that you have not left another example running in one of your sessions. If you suspect that you are running your examples in the same distributed system as another person, change the mcast-port setting in the example installation quickstart directory's file.