It is important to determine the port # on which the current instance of Shareplex is running, especially when running many Shareplex instances on a server. Determining the correct port # can ensure that there is no overstepping of Shareplex instances when launching Shareplex. The port number is the easiest way to relate to a Shareplex instance since it is a numerical entity as opposed to the variable directory which has the Unix path as its value (Shareplex instance is uniquely identified by the port # and the value of vardir as defined by the environment variable SP_SYS_VARDIR).
N.A.
There are multiple ways to find on which port SharePlex is running. This KB helps for Linux environment.
Please note that setting OS level environment variable take precedence.
For Ex: Let’s says, while installing SharePlex you configured port 1234, but we set below environment variable and started SharePlex, then SharePlex will be running on port 5678 even though the same parameters in paramdb shows 1234. If we don’t set these environment variables, then SharePlex start with port number mentioned in paramdb.
$ export SP_COP_TPORT=5678
$ export SP_COP_UPORT=5678
It is always good to have same value in both paramdb and environment variables for these parameters.
So, to get the correct port, it depends on how you started SharePlex.
1) If you have set environment variables and started SharePlex, then you can simply check using “env |grep PORT”
2) Without environment variables, then you can read paramdb file located in <VAR_DIR>/data directory to know the port.
3) Port number will be shown when we connect sp_ctrl as well. Note: SP_SYS_VARDIR environment variable required to set if there are multiple ports running.
$ cd <prod>/bin
./sp_ctrl
sp_ctrl (<HOSTNAME>:<PORT NUMBER>)
4) We can also get from event log on which port SharePlex started. $ cat event_log |grep 'using port'
5) Usually, we request to add -u<port_number> when you start SharePlex. For ex: ./sp_cop -u1234. If you have only one SharePlex port running in server and if you used port number while starting SharePlex, then we can also check using “ps -ef |grep sp_”.