Document Type | Technical Information
Category | Administration
Applicable Product Version | T6, T7
Document Number | TADTI195
Overview
This document explains the procedure to configure multiple Tibero instances on a single server to use the same PORT.
* HW Requirement: NIC CARD per Tibero Instance
Method
1. Create Tibero USER
Add Tibero USER and apply environment settings
[tibero@VM_TMAXSOFT ~]$ su - Password: [root@VM_TMAXSOFT ~]# adduser tibero -g dba [root@VM_TMAXSOFT ~]# passwd tibero Changing password for user tibero. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@VM_TMAXSOFT ~]# su - tibero [tibero@VM_TMAXSOFT ~]$ cp /home/tibero/.bash_profile ~/
2. Modify Tibero Environment Settings
Profile
### JAVA ENV ### export JAVA_HOME=/usr/java/default export JDK_HOME=$JAVA_HOME export PATH=$JAVA_HOME/bin:/usr/local/bin:$PATH ######## TIBERO ENV ######## export TB_BASE=/sdiske/ps1/kkw export TB_HOME=$TB_BASE/tibero7 export TB_SID=tibero7 export TB_PROF_DIR=$TB_HOME/bin/prof export PATH=.:$TB_HOME/bin:$TB_HOME/client/bin:$PATH export LD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib:$LD_LIBRARY_PATH export TB_SQLPATH=$TB_HOME/config
$TB_SID.tip
DB_NAME=tibero7
LISTENER_PORT=8629
CONTROL_FILES="/sdiske/ps1/kkw/tibero7/database/tibero7/c1.ctl"
#CERTIFICATE_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/tibero7.crt"
#PRIVKEY_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/tibero7.key"
#WALLET_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/WALLET"
#ILOG_MAP="/sdiske/ps1/kkw/tibero7/config/ilog.map"
MAX_SESSION_COUNT=20
TOTAL_SHM_SIZE=2G
MEMORY_TARGET=4G
3. Modify Settings of Tibero Instance 1
$TB_SID.tip
- Specify the IP on which the Listener of this instance will run.
DB_NAME=tibero
LISTENER_PORT=8629
CONTROL_FILES="/sdiske/ps1/kkw/tibero7/database/tibero/c1.ctl"
#CERTIFICATE_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/tibero7.crt"
#PRIVKEY_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/tibero7.key"
#WALLET_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/WALLET"
#ILOG_MAP="/sdiske/ps1/kkw/tibero7/config/ilog.map"
MAX_SESSION_COUNT=20
TOTAL_SHM_SIZE=2G
MEMORY_TARGET=4G
LISTENER_IP=192.168.139.68
tbdsn.tbr
- Change the IP set to localhost to the IP where this listener runs.
tibero=(
(INSTANCE=(HOST=192.168.139.68
)
(PORT=8629)
(DB_NAME=tibero)
)
)
4. Modify Settings of Tibero Instance 2
$TB_SID.tip
- Specify the IP on which the Listener of this instance will run.
DB_NAME=tibero7
LISTENER_PORT=8629
CONTROL_FILES="/sdiske/ps1/kkw/tibero7/database/tibero7/c1.ctl"
#CERTIFICATE_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/tibero7.crt"
#PRIVKEY_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/tibero7.key"
#WALLET_FILE="/sdiske/ps1/kkw/tibero7/config/tb_wallet/WALLET"
#ILOG_MAP="/sdiske/ps1/kkw/tibero7/config/ilog.map"
MAX_SESSION_COUNT=20
TOTAL_SHM_SIZE=2G
MEMORY_TARGET=4G
LISTENER_IP=192.168.139.70
tbdsn.tbr
- Change the IP set to localhost to the IP where this listener runs.
tibero7=(
(INSTANCE=(HOST=192.168.139.70)
(PORT=8629)
(DB_NAME=tibero7)
)
5. Tibero Instance BOOT
Tibero Instance 1
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ tbboot
Change core dump dir to /sdiske/ps1/kkw/tibero7/bin/prof.
Listener port = 8629
Tibero 7
TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.
Tibero instance started up (NORMAL mode).
Tibero Instance 2
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ tbboot
Change core dump dir to /sdiske/ps1/kkw/tibero7/bin/prof.
Listener port = 8629
Tibero 7
TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.
Tibero instance started up (NORMAL mode).
Startup confirmed successfully.
Netstat Check
[kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ netstat -na|grep 192.168.139.
tcp 0 0 192.168.139.68:8808 0.0.0.0:* LISTEN
tcp 0 0 192.168.139.70:8808 0.0.0.0:* LISTEN
6. ERROR Situations
1) special port
Situation:
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ tbboot
Listener port = 8629
bind() failed: Address already in use.
Error: Timed out while trying to open port 8629
Check if there are any Tibero instances running.
Tibero instance startup failed!
Issue:
If the special port is assigned to 0.0.0.0 port +1 instead of Listener IP port +1, the second Tibero instance booting will fail due to special port conflict.
Solution:
Add a parameter to change the special port in the configuration file $TB_SID.tip to resolve the special port conflict.
Parameter:
: _LSNR_SPECIAL_PORT=86402) SHM_KEY
Situation:
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ tbboot
Listener port = 8629
Change core dump dir to /sdiske/ps1/kkw/tibero7/bin/prof.
***************************************************************************
* Cannot get semaphore:
* key = 0x3f1396c2, errno=28
***************************************************************************
Tibero instance startup failed!
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$
Issue:
The first started Tibero secures the SHM_KEY value, causing the second instance to fail to secure the same SHM_KEY value.
Solution:
Change the SHM_KEY of the second instance and restart.
Reproduction:
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$
Listener port = 8629
Change core dump dir to /sdiske/ps1/kkw/tibero7/bin/prof.
***************************************************************************
* Cannot get semaphore:
* key = 0x3f1396c2, errno=28
***************************************************************************
Tibero instance startup failed!
Semaphore check:
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ ipcs
------Shared Memory Segments------
key shmid owner perms bytes nattch status
0x545fe9c2 917515 tibero 640 53687091213
0x63276b8c 950289 tibero7 640 536870912 0
------Semaphore Arrays------
key semid owner perms nsems
0x3f139696 13500500 tibero7 600 2
0x3f139697 13533269 tibero7 600 2
0x3f139698 13566038 tibero7 600 2
0x3f139699 13598807 tibero7 600 2
0x3f13969a 13631576 tibero7 600 2
0x3f13969b 13664345 tibero7 600 2
0x3f13969c 13697114 tibero7 600 2
0x3f13969d 13729883 tibero7 600 2
0x3f13969e 13762652 tibero7 600 2
0x3f13969f 13795421 tibero7 600 2
0x3f1396a0 13828190 tibero7 600 2
0x3f1396a1 13860959 tibero7 600 2
0x3f1396a2 13893728 tibero7 600 2
0x3f1396a3 13926497 tibero7 600 2
0x3f1396a4 13959266 tibero7 600 2
0x3f1396a5 13992035 tibero7 600 2
0x3f1396a6 14024804 tibero7 600 2
0x3f1396a7 14057573 tibero7 600 2
0x3f1396a8 14090342 tibero7 600 2
0x3f1396a9 14123111 tibero7 600 2
0x3f1396aa 14155880 tibero7 600 2
0x3f1396ab 14188649 tibero7 600 2
0x3f1396ac 14221418 tibero7 600 2
0x3f1396ad 14254187 tibero7 600 2
0x3f1396ae 14286956 tibero7 600 2
0x3f1396af 14319725 tibero7 600 2
0x3f1396b0 14352494 tibero7 600 2
0x3f1396b1 14385263 tibero7 600 2
0x3f1396b2 14418032 tibero7 600 2
0x3f1396b3 14450801 tibero7 600 2
0x3f1396b4 14483570 tibero7 600 2
0x3f1396b5 14516339 tibero7 600 2
0x3f1396b6 14549108 tibero7 600 2
0x3f1396b7 14581877 tibero7 600 2
0x3f1396b8 14614646 tibero7 600 2
0x3f1396b9 14647415 tibero7 600 2
0x3f1396ba 14680184 tibero7 600 2
0x3f1396bb 14712953 tibero7 600 2
0x3f1396bc 14745722 tibero7 600 2
0x3f1396bd 14778491 tibero7 600 2
0x3f1396be 14811260 tibero7 600 2
0x3f1396bf 14844029 tibero7 600 2
0x3f1396c0 14876798 tibero7 600 2
0x3f1396c1 14909567 tibero7 600 2
------Message Queues------
key msqid owner perms used bytes messages
Change SHM_KEY:
kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ export SHM_KEY=0x3f1396e8
Confirm Tibero Instance startup:
[kkw@localhost.localdomain:/sdiske/ps1/kkw/tibero7/config]$ tbboot
Change core dump dir to /sdiske/ps1/kkw/tibero7/bin/prof.
Listener port = 8629
Tibero 7
TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.