How to change the TCP port used by the PostgreSQL Bouncer in NetBackup

記事: 100054993
最終公開日: 2023-02-14
評価: 0 0
製品: Appliances, NetBackup & Alta Data Protection

Description

The PostgreSQL Bouncer connection pooler (pgbouncer) is used to pool and optimize connections from other parts of NetBackup to the PostgreSQL database engine.  The process is listening for connections from other local processes via the pooler port, which is TCP port 13787 by default, as shown by these examples.

Linux:
$ netstat -naopt | grep LISTEN | grep pgbouncer
tcp   0   0 127.0.0.1:13787   0.0.0.0:*   LISTEN   2115136/pgbouncer   off (0.00/0/0)

Windows:
C:\> netstat -nao | findstr /R /C:":13787 .*LISTEN"
  TCP   127.0.0.1:13787   0.0.0.0:0   LISTENING   12862

Because the NetBackup primary server is dedicated to NetBackup, the port 13787 should never conflict with other software services running on the same host.  If there is some rare situation that results in a conflict, then the pgbouncer process can be configured to use an alternate port number.  

Instructions

Configuring an alternate port number requires adjusting the NetBackup configuration in several places so that both the pgbouncer and all the connecting processes are aware of the changing of the port number.  The change must be made while NetBackup is confirmed down.

Steps to change the pooler port:

  1. Select an alternate TCP port number that is not currently utilized on the host.

    It should be greater than 1023 and less than the lower bound of the ephemeral port range.
       
    Linux: (default 32768)
    $ sysctl net.ipv4.ip_local_port_range
    net.ipv4.ip_local_port_range = 32768    60999

    Windows: (default 49152)
    C:\> netsh int ipv4 show dynamicport tcp
    Protocol tcp Dynamic Port Range
    ---------------------------------
    Start Port      : 49152
    Number of Ports : 16384

    Confirm the prospective alternate port number is not in use.  These examples use the default port number, replace 13787 with the prospective number.  The spaces in the command lines are significant and should be preserved during copy/paste.
     
    Linux:
    $ netstat -napt | egrep '^Proto |:13787 '
    Proto  Recv-Q  Send-Q  Local Address   Foreign Address   State   PID/Program name

    Windows:
    C:\> netstat -nao | findstr "Proto :13787"
    Proto   Local Address   Foreign Address   State   PID


    There should be just a header line in the output, without any sockets displayed.

  2. Shutdown NetBackup services on the primary server.

    Linux:    netbackup stop ( /usr/openv/netbackup/bin/goodies/netbackup stop)
    Windows:  bpdown (install_path\NetBackup\bin\bpdown -f -v)
     
  3. Confirm all NetBackup services are down.  There should not be any processes listed.

    bpps
     
  4. Update the pgbouncer initialization file to specify the alternate port number.

    On clustered primary servers, this path is on the shared volume.

    Linux:   /usr/openv/db/data/instance/pgbouncer.ini
    Windows: <install>\NetBackupDB\data\instance\pgbouncer.ini

    Edit this line and replace the port number.
       
    listen_port = 13787

  5. Update the VxDBMS configuration file to specify the alternate port number.

    On clustered primary servers, this path is on the shared volume.

    Linux:   /usr/openv/db/data/vxdbms.conf
    Windows: <install>\NetBackupDB\data\vxdbms.conf


    Edit this line and replace the port number.

    VXDBMS_POSTGRESQL_POOLER_ODBC_PORT = 13787

  6. Update the web service configuration file to specify the alternate port number.

    On clustered primary servers, this path is on the shared volume.

    Linux:   /usr/openv/var/global/wsl/config/web.conf
    Windows: <install>\NetBackup\var\global\wsl\config\web.conf


    Edit this line and replace the port number.

    db.pgsqlpoolerport=13787

  7. Restart NetBackup services on the primary server.

    Linux:    netbackup start (/usr/openv/netbackup/bin/goodies/netbackup start)
    Windows:  bpup (
    install_path\NetBackup\bin\bpup -f -v)
     
  8. Confirm the pgbouncer is listening on the newly configured port.

    In these commands, replace 13787 with the new port number, and preserve the space characters.
       
    Linux:
    $ netstat -napt | egrep ':13787 .*LISTEN'

    Windows:
    C:\> netstat -nao | findstr /R /C:":13787 .*LISTEN"

         
    There should be one or more sockets displayed depending on the networking configuration.

 

 

Was this content helpful?