Summary: Default ports used by the space, container, and Jini Lookup Service, and how to configure them.
Overview GigaSpaces space and client components open different ports in various situations. The following list describes the different ports used by GigaSpaces and how these can be modified: Learn how to set GigaSpaces over a firewall.
Port defaults |
Description |
Configuration File/s |
Schema Modifications |
10098 |
Default RMI port which is used as part of the Space URL. |
Container schema |
<jndi> <enabled>true</true> <url>localhost:10098</url></jndi> |
Free ports |
When Jini is enabled, several temporary ports are open and closed while running. |
Container schema |
true if enabled, false otherwise. Default value: true <jini_lus><enabled>false</enabled></jini_lus> Disabling this element causes the space not to be registered in a running Jini Lookup Service. As a result, clusters which use a failover policy like partitioned-sync2backup-cluster-schema.xsl, do not function. For more details, please refer to the Active Election and Avoiding Split-Brain Scenarios section. |
The bindPort argument in the <GigaSpaces Root>\config\services.config file is the server port used for incoming client requests, or notifications from server to client. The server port is set by default to 0, which means next free port. This means that whenever GigaSpaces is launched, it allocates one of the available ports. Define a specific port value to enforce a specific port on the space server or client side. It is possible to override this option. For more details, refer to the Setting Communication Protocol section. When starting a space and providing the port as part of the URL - i.e. java://localhost:PORT/container/space - the specified port will be used both for the RMI registry listener and also for the container to register into the RMI registry. The Space Container, GSC, GSM, GS CLI, GMC, stand alone LUS and Mahalo an embedded start an embedded HTTPD (Webster) web server. Independent space uses port 9813 by default, Service Grid by default uses free port, but that can be modified. See the Defining HTTP Port*** section for more details. The Jini Lookup Service uses unicast and multicast announcements and requests.
- The unicast discovery protocol, set using the locators (through setenv.sh, space url and services.config) is using by default the 4162 port.
- The multicast discovery protocol uses ports 4162, 4163 and a range of free ports.
In GigaSpaces version 6.5 and onwards, you can control the Lookup Service ports and even completely disable multicast announcement traffic. Refer to the Lookup Service Configuration or Setting GigaSpaces Over Firewall sections for more details. When running a clustered space using replication via multicast, additional ports are used. Service Settings The scripts: gsm, gsc, and gs (under <ServiceGrid>\bin) use the following settings:
Service |
Disable |
Default Port |
System Property |
Overrides |
Comments |
Webster |
linux: NO_HTTP Windows: noHTTP |
0 |
-Dcom.gigaspaces.start.httpPort=0 -Dcom.gigaspaces.start.httpServerRetries=20 |
webster.xml |
Additional properties can also be overridden (for example: httpServerRetries, hostAddress) httpServerRetries retries N-1 consecutive ports if the initial port is used (relevant if the initial port is different than zero). Default is 20. |
JMX |
linux: NO_JMX Windows: noJMX |
10098 |
-Dcom.gigaspaces.system.registryPort=10098 |
XML override using com.gigaspaces.start.jmx.svcDesc |
registryRetries retries N-1 consecutive ports if the initial port is used (for example: 10098, 10099, ..[10098+(N-1)]) |
***Link required |