cancel
Showing results for 
Search instead for 
Did you mean: 

Xserver TCP port configuration (serv.exe on windows)

oschmidt1
Discoverer
0 Kudos

Hi SCN folks,

Where do I configure the TCP-Ports 'serv.exe' uses internally?

This is the output of 'netstat -ano' (german version).

1st call (filtered to PID 1236 = serv.exe):

<output>

  Proto  Lokale Adresse         Remoteadresse          Status           PID

  TCP    0.0.0.0:7210           0.0.0.0:0              ABHÖREN         1236

  TCP    127.0.0.1:7210         127.0.0.1:50754        HERGESTELLT     1236

  TCP    127.0.0.1:7210         127.0.0.1:50757        HERGESTELLT     1236

  TCP    127.0.0.1:7210         127.0.0.1:50758        HERGESTELLT     1236

  TCP    127.0.0.1:7210         127.0.0.1:50760        HERGESTELLT     1236

  TCP    127.0.0.1:7210         127.0.0.1:50762        HERGESTELLT     1236

  TCP    127.0.0.1:7210         127.0.0.1:50764        HERGESTELLT     1236

  TCP    127.0.0.1:7210         127.0.0.1:50766        HERGESTELLT     1236

</output>

2nd call after restarting service (filtered to PID 5144 = serv.exe):

<output>

  Proto  Lokale Adresse         Remoteadresse          Status           PID

  TCP    0.0.0.0:7210           0.0.0.0:0              ABHÖREN         5144

  TCP    127.0.0.1:7210         127.0.0.1:50938        HERGESTELLT     5144

  TCP    127.0.0.1:7210         127.0.0.1:50940        HERGESTELLT     5144

  TCP    127.0.0.1:7210         127.0.0.1:50942        HERGESTELLT     5144

  TCP    127.0.0.1:7210         127.0.0.1:50944        HERGESTELLT     5144

  TCP    127.0.0.1:7210         127.0.0.1:50946        HERGESTELLT     5144

</output>

Everytime I start 'serv.exe' another range of ports is used.

I need a deterministic behavior where some ports are never used by MAXDB.

Feedback would be appreciated.

Thanks

Olaf

Accepted Solutions (0)

Answers (1)

Answers (1)

oschmidt1
Discoverer
0 Kudos

Hello folks,

there is no answer to my question yet so I want to get a little bit more concrete.

We connect to the remote database using the method described in Global Listener and X Servers - SAP Documentation. We specify database name and database computer to the global listener (port 7210). Now internally the global listener selects a port number and sends it back.

I want to define a range of port numbers from which the global listener may select one port number every time it gets a connection request. As an alternative I would provide a list of port numbers, which must not be used (because they will be used otherwise). We can't provide a single (different) port number for each connection, this bookkeeping belongs to the global listener.

How is it possible to define this range?

Your feedback would be highly appreciated.

Thanks

Olaf

thorsten_zielke
Contributor
0 Kudos

Hello Olaf,

the ports of the Globallistener process (introduced with MaxDB 7.8 and higher) for TCP, NI, SSL cannot be changed.
Then you have the TCP port for each x_server installation. Every time you install a new database, a new port for the x_server gets assigned. Depending on the installation type, it should give you the option to chose the port you want to use.

However, it should also be possible to reassign/change existing x_server ports by editing the database installation file:
On Windows, it is located in the Registry "HKEY_LOCAL_MACHINE\SOFTWARE\SAP\SAPDBTech\Installations...", for the Unix types we keep it in the "Installation.ini" file.

Regards,
Thorsten

oschmidt1
Discoverer
0 Kudos

Ok, Thorsten,

you can't change the ports of the Globallistener process. Thank you for your answer.

May be a little off-topic but our task can be accomplished by using windows 'netsh':

  netsh int ipv4 add excludedportrange tcp startport=<x> numberofports=<y>

excludes port numbers from automatic use. Seems to work...

Thanks again

Olaf