Gestion des IP par gns :
node | IP | defined name | type | assigné par | resolve by |
gerer par le cluster oracle | A VOIR AVEC LES ADMIN DHCP/DNS | A VOIR AVECLES ADMIN DNS | virtual | fixe | dns |
aix-rac1 | 192.168.100.180 | aix-rac1 | public | fixe | gns |
aix-rac1 | 172.16.22.180 | rac1-priv | privé | fixe | gns |
gerer par le cluster oracle | rac-vip | virtual | dhcp | gns | |
aix-rac2 | 192.168.100.181 | aix-rac2 | public | fixe | gns |
aix-rac2 | 172.16.22.181 | rac2-priv | privé | fixe | gns |
gerer par le cluster oracle | virtual | dhcp | gns | ||
gerer par le cluster oracle | virtual | dhcp | gns | ||
gerer par le cluster oracle | virtual | dhcp | gns | ||
gerer par le cluster oracle | virtual | dhcp | gns |
Sans l option gns il faut des ip fixes renseignées dans le fichier hosts :
network identity | Node | IP | defined name |
adresse host 1 | Aix_rac1 | 192.168.100.180 | aix-rac1 |
private1 | Aix_rac1 | 172.16.21.180 | rac1-priv |
adresse vip1 | 192.168.100.102 | rac-vip1 | |
adress host 2 | Aix_rac2 | 192.168.100.181 | aix-rac2 |
private2 | Aix_rac2 | 172.16.21.181 | rac2-priv |
adresse vip2 | 192.168.100.103 | rac-vip2 | |
scan vip1 | gerer par le cluster oracle | 192.168.100.204 | aix-scan |
Le fichier hosts sans gns :
127.0.0.1 loopback localhost # loopback (lo0) name/address
172.16.21.180 rac1-priv #interconnect rac1
172.16.21.181 rac2-priv #interconnect rac2
172.16.22.181 rac2_nim
172.16.22.202 aixnim
192.168.100.180 aix_rac1
192.168.100.181 aix_rac2
192.168.100.102 aix-vip1
192.168.100.103 aix-vip2
192.168.100.204 aix-scan1 aix-scan
#192.168.100.205 aix-scan2 aix-scan
#192.168.100.206 aix-scan3 aix-scan
Avec une configuration gns on aurait plus besoin de garnir le fichier hosts.
Principe :
Sur les serveurs AIX on a donc 2 listener manager par le users os grid.
Mais pour les modifications il faut etre root :
crsctl getperm resource ora.scan1.vip | Name: ora.scan1.vip owner:root:rwx,pgrp:system:r-x,other::r--,group:oinstall:r-x,user:grid:r-x |
LISTENER_SCAN<X> gerer par notre user grid
LISTENER geré par le user grid
ps -ef | grep tns | grep –v grep
grid 9437238 1 0 Apr 08 - 0:09 /u01/app/grid/11.2.0/bin/tnslsnr LISTENER -inherit
grid 11731076 1 0 Apr 08 - 0:09 /u01/app/grid/11.2.0/bin/tnslsnr LISTENER_SCAN1 -inherit
Check du LISTENER_SCAN1 :
Connecter en tant que user grid.
srvctl status scan | SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node aix_rac1 |
srvctl config scan | SCAN name: aix-scan, Network: 1/192.168.100.0/255.255.252.0/en2 SCAN VIP name: scan1, IP: /aix-scan1/192.168.100.204 |
srvctl stop scan_listener -i 1 | |
srvctl start scan_listener -i 1 | |
srvctl config scan_listener | SCAN Listener LISTENER_SCAN1 exists. Port: TCP:2115 |
Check du listener LISTENER :
srvctl status listener | Listener LISTENER is enabled Listener LISTENER is running on node(s): aix_rac1,aix_rac2 |
srvctl start listener | |
srvctl stop listener | |
srvctl config listener | Name: LISTENER Network: 1, Owner: grid Home: <CRS home> End points: TCP:1521 |
Configuration au niveau base :
La scan remplace le jeux de vip pour le parametre remote_listener.
Si on a 10 nœud on a qu une seule ligne a mettre.
local_listener sur node 1 | (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=aix-vip1)(PORT=1521)))) |
local_listener sur node 2 | (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=aix-vip2)(PORT=1521)))) |
remote_listener | aix-scan:1521 |
En 10g c etait :
Le parametre remote_listener inclus toute les vip
local_listener sur node 1 | (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=aix-vip1)(PORT=1521)))) |
local_listener sur node 2 | (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=aix-vip2)(PORT=1521)))) |
remote_listener | (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=aix-vip2)(PORT=1521)))) (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=aix-vip1)(PORT=1521)))) |
Creation d un service pour tester :
#srvctl add service -s testscan -d RACTEST -r RACTEST1,RACTEST2
En user os oracle
srvctl start service -s testscan -d RACTEST
La partie cliente
Les connections clients doive nt resoudre les ip scan,et vip sinon on aura une ORA-12545.
Connection
Sqlplus mg@aix-scan:1521/testscan
Si pas de resolution des ip alors on aura une
ORA-12545
En fait le scan redirige vers le aix-vip<1| 2> pas l adresse ip.
Sur mon client w7 j ai modifié le fichier c:\windows\system32\driver\etc\hosts pour y inclure toute les ip et les nom de hosts
Modification de configuration :
Listener_scan1
Queue_size/SDU :
Ca se fait au niveau du fichier listener.ora en rajoutant (docid 1292915.1)
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER_ASM_NETRAC=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_ASM_NETRAC)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))# line added by Agent
#LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
LISTENER_SCAN1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
)
(DESCRIPTION =
(SDU = 10240)
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.100.204)(PORT = 1521)(QUEUESIZE=199)) --defaut 128
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_ASM_NETRAC=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
--c est pour tracer et checker ca configurationTRACE_LEVEL_LISTENER_SCAN1=16
DIAG_ADR_ENABLED_LISTENER_SCAN1=off
TRACE_DIRECTORY_LISTENER_SCAN1=/u01/app/11.2.0/grid/network/trace
LISTENER_ASM_NETRAC=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_ASM_NETRAC)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))# line added by Agent
#LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
LISTENER_SCAN1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
)
(DESCRIPTION =
(SDU = 10240)
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.100.204)(PORT = 1521)(QUEUESIZE=199)) --defaut 128
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_ASM_NETRAC=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
--c est pour tracer et checker ca configurationTRACE_LEVEL_LISTENER_SCAN1=16
DIAG_ADR_ENABLED_LISTENER_SCAN1=off
TRACE_DIRECTORY_LISTENER_SCAN1=/u01/app/11.2.0/grid/network/trace
Ports :
1 en root
srvctl modify scan_listener -p 2115
en grid
srvctl stop scan_listener
srvctl stop scan_listener
srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:2115
Modification au niveau db :
alter system set remote_listener='aix-scan:2115' scope=both;
listener:
Modification du port d’écoute :
Par défaut le listener se nomme listener et écoute sur le port 1521.
L’ objectif est de modifier le port d ecoute de 1521 a 1421.
Ca va impliquer aussi une modification du paramètre local_listener de la base RAC.
Aspect listener et clusterware
En root :
# srvctl modify listener -l LISTENER -p 1421
# su - grid
#srvctl stop listener -l LISTENER
#srvctl start listener -l LISTENER
#srvctl config listener -l LISTENER
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
End points: TCP:1421
Aspect bd :
Su - oracle
#sqlplus / as sysdba
SQL> show parameter listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
listener_networks string
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=aix-
vip1)(PORT=1521))))
remote_listener string aix-scan:2115
alter system set local_listener='(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =aix-vip1)(PORT = 1421)))' sid='RACTEST1' ;
alter system set local_listener='(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =aix-vip2)(PORT = 1421)))' sid='RACTEST2' ;
Arret relance d une vip et probleme listener
Suite au redemarrage du clusterware j ai noté ce probleme :
# crsctl status resource -t
ora.aix_rac1.vip
1 ONLINE INTERMEDIATE aix_rac2 FAILED OVER
-
Arret de la vip :
# srvctl status vip -n aix_rac1
VIP aix-vip1 is enabled
VIP aix-vip1 is running on node: aix_rac1
· En fait on ne peut pas arrêter la vip comme ca car il y a des dépendances :
# srvctl stop vip -n aix_rac1
PRCR-1014 : Failed to stop resource ora.aix_rac1.vip
PRCR-1065 : Failed to stop resource ora.aix_rac1.vip
CRS-2529: Unable to act on 'ora.aix_rac1.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
# srvctl stop listener -l LISTENER -n aix_rac1
# srvctl stop vip -n aix_rac1
PRCR-1014 : Failed to stop resource ora.aix_rac1.vip
PRCR-1065 : Failed to stop resource ora.aix_rac1.vip
CRS-2529: Unable to act on 'ora.aix_rac1.vip' because that would require stopping or relocating 'ora.ractest.testscan.svc', but the force option was not specified
# srvctl stop scan -i 1
PRCR-1065 : Failed to stop resource ora.scan1.vip
CRS-2529: Unable to act on 'ora.scan1.vip' because that would require stopping or relocating 'ora.LISTENER_SCAN1.lsnr', but the force option was not specified
# srvctl stop scan_listener -i 1
# srvctl stop scan -i 1
# srvctl stop listener -l LISTENER -n aix_rac1
# srvctl stop vip -n aix_rac1
PRCR-1014 : Failed to stop resource ora.aix_rac1.vip
PRCR-1065 : Failed to stop resource ora.aix_rac1.vip
CRS-2529: Unable to act on 'ora.aix_rac1.vip' because that would require stopping or relocating 'ora.ractest.testscan.svc', but the force option was not specified
# srvctl stop vip -n aix_rac1
# srvctl stop service -s testscan -d RACTEST -n aix_rac1
# srvctl stop vip -n aix_rac1
# srvctl start vip -n aix_rac1
# srvctl start service -s testscan -d RACTEST -n aix_rac1
# srvctl start scan -i 1
# srvctl start scan_listener -i 1
Apres tous semble OK mais le listener LISTENER n’écoute aucun service.
#lsnrctl service listener
The listener supports no services
The command completed successfully
En fin de compte j ai fait u n arrêt de la db en locale :
#srvctl stop instance -d RACTEST -i RACTEST1
#srvctl start instance -d RACTEST -i RACTEST1
Donc dans notre cas :
1 – arret du listener scan
2 – arret du listener
3 – arret des services
4--- arret de la vip
Start en sens inverse
Eventuellement arret de la db et du listener.
Aucun commentaire:
Enregistrer un commentaire