This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
Overview
Download & View Sandesh_rac_troubleshooting_diagnosability_otnyathra2.pdf as PDF for free.
Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Grid Infrastructure Overview • Grid Infrastructure is the name for the combination of – Oracle Cluster Ready Services (CRS) – Oracle Automatic Storage Management (ASM)
• The Grid Home contains the software for both products • CRS can also be Standalone for ASM and/or Oracle Restart • CRS can run by itself or in combination with other vendor clusterware • Grid Home and RDBMS home must be installed in different locations – The installer locks the Grid Home path by setting root permissions.
Grid Infrastructure Overview • CRS requires shared Oracle Cluster Registry (OCR) and Voting files – Must be in ASM or CFS – OCR backed up every 4 hours automatically GIHOME/cdata – Kept 4,8,12 hours, 1 day, 1 week – Restored with ocrconfig – Voting file backed up into OCR at each change. – Voting file restored with crsctl
Grid Infrastructure Overview • For network CRS requires – One/multiple high speed, low latency, redundant private network for inter node communications – Think of interconnect as a memory backplane for the cluster – Should be a separate physical network or managed converged network – VLANS are supported – Used for :• • • •
Clusterware messaging RDBMS messaging and block transfer ASM messaging HANFS for block traffic
Grid Infrastructure Overview • Only one set of Clusterware daemons can run on each node • The CRS stack is spawned from Oracle HA Services Daemon (ohasd) • On Unix ohasd runs out of inittab with respawn • A node can be evicted when deemed unhealthy – May require reboot but at least CRS stack restart (rebootless restart) – IPMI integration or diskmon in case of Exadata
• CRS provides Cluster Time Synchronization services – Always runs but in observer mode if ntpd configured
• oraagent, orarootagent, application agent, script agent, cssdagent • Single process started from init on Unix (ohasd) • Diagram below shows all core resources
Grid Infrastructure Processes • Level 2b: OHASD oraagent spawns: – MDNSD– Multicast DNS daemon – GIPCD – Grid IPC Daemon – GPNPD – Grid Plug and Play Daemon – EVMD – Event Monitor Daemon – ASM – ASM instance started here as may be required by CRSD
• Level 3: CRSD spawns: – orarootagent - Agent responsible for managing all root owned crsd resources. – oraagent - Agent responsible for managing all nonroot owned crsd resources. • One is spawned for every user that has CRS resources to manage.
• Level 4: CRSD oraagent spawns: – ASM Resouce - ASM Instance(s) resource (proxy resource) – Diskgroup - Used for managing/monitoring ASM diskgroups. – DB Resource - Used for monitoring and managing the DB and instances – SCAN Listener - Listener for single client access name, listening on SCAN VIP – Listener - Node listener listening on the Node VIP – Services - Used for monitoring and managing services – ONS - Oracle Notification Service – eONS - Enhanced Oracle Notification Service ( pre 11.2.0.2 ) – GSD - For 9i backward compatibility – GNS (optional) - Grid Naming Service - Performs name resolution
Under the Hood: Any New Install Ends Up in a Flex Cluster
[GRID]> crsctl get cluster name CRS-6724: Current cluster name is 'SolarCluster' [GRID]> crsctl get cluster class CRS-41008: Cluster class is 'Standalone Cluster' [GRID]> crsctl get cluster type CRS-6539: The cluster type is 'flex'.
ASM Flex Diskgroups 2 Database-oriented Storage Management for more flexibility and availability 12.2 Flex Diskgroup Organization
• Flex Diskgroups enable
Flex Diskgroup
Quota
DB1
DB2
DB3
File 1 File 2 File 3
File 1 File 2 File 3 File 4
File 1 File 2 File 3
DB3 File 1 File 2
– Quota Management - limit the space databases can allocate in a diskgroup and thereby improve the customers’ ability to consolidate databases into fewer DGs – Redundancy Change – utilize lower redundancy for less critical databases – Shadow Copies (“split mirrors”) to easily and dynamically create database clones for test/dev or production databases
Node Weighting in Oracle RAC 12c Release 2 Idea: Everything equal, let the majority of work survive
1
✔ 2
• Node Weighting is a new feature that considers the workload hosted in the cluster during fencing • The idea is to let the majority of work survive, if everything else is equal – Example: In a 2-node cluster, the node hosting the majority of services (at fencing time) is meant to survive
CSS_CRITICAL – Fencing with Manual Override Node eviction despite WL; WL will failover.
srvctl modify database -help |grep critical … -css_critical {YES | NO} Define whether the database or service is CSS critical
“Conflict”.
✔
crsctl set server css_critical {YES|NO} + server restart
CSS_CRITICAL can be set on various levels / components to mark them as “critical” so that the cluster will try to preserve them in case of a failure.
CSS_CRITICAL will be honored if no other technical reason prohibits survival of the node which has at least one critical component at the time of failure.
A fallback scheme is applied if CSS_CRITICAL settings do not lead to an actionable outcome.
Autonomous Health Framework (powered by machine learning) works more efficiently for you on the DSC, as continuous analysis is taken off the production cluster.
The DSC is the ideal hosting environment for Rapid Home Provisioning (RHP) enabling software fleet management.
Oracle ASM 12c Rel. 2 based storage consolidation is best performed on the DSC, as it enables numerous additional features and use cases.
What does CSSD do? CSSD monitors and evicts nodes • Monitors nodes using 2 communication channels: – Private Interconnect ó Network Heartbeat – Voting Disk based communication ó Disk Heartbeat
Network Heartbeat Interconnect basics • Each node in the cluster is “pinged” every second • Nodes must respond in css_misscount time (defaults to 30 secs.) – Reducing the css_misscount time is generally not supported
• Network heartbeat failures will lead to node evictions – CSSD-log: [date / time] [CSSD][1111902528]clssnmPollingThread: node mynodename (5) at 75% heartbeat fatal, removal in 6.770 seconds
Disk Heartbeat Voting Disk basics – Part 1 • Each node in the cluster “pings” (r/w) the Voting Disk(s) every second • Nodes must receive a response in (long / short) diskTimeout time – I/O errors indicate clear accessibility problems à timeout is irrelevant
• Disk heartbeat failures will lead to node evictions – CSSD-log: … [CSSD] [1115699552] >TRACE: clssnmReadDskHeartbeat: node(2) is down. rcfg(1) wrtcnt(1) LATS(63436584) Disk lastSeqNo(1)
Voting Disk Structure Voting Disk basics – Part 2 • Voting Disks contain dynamic and static data: – Dynamic data: disk heartbeat logging – Static data: information about the nodes in the cluster
• With 11.2.0.1 Voting Disks got an “identity”: – E.g. Voting Disk serial number: [GRID]> crsctl query css votedisk
“Simple Majority Rule” Voting Disk basics – Part 3 • Oracle supports redundant Voting Disks for disk failure protection • “Simple Majority Rule” applies: – Each node must “see” the simple majority of configured Voting Disks
at all times in order not to be evicted (to remain in the cluster) Ø trunc(n/2+1) with n=number of voting disks configured and n>=1
• Oracle ASM auto creates 1/3/5 Voting Files – Based on Ext/Normal/High redundancy and on Failure Groups in the Disk Group – Per default there is one failure group per disk – ASM will enforce the required number of disks – New failure group type: Quorum Failgroup
Why are nodes evicted? è To prevent worse things from happening… • Evicting (fencing) nodes is a preventive measure (a good thing)! • Nodes are evicted to prevent consequences of a split brain: – Shared data must not be written by independently operating nodes – The easiest way to prevent this is to forcibly remove a node from the cluster
How are nodes evicted? EXAMPLE: Heartbeat failure • The network heartbeat between nodes has failed – It is determined which nodes can still talk to each other – A “kill request” is sent to the node(s) to be evicted § Using all (remaining) communication channels à Voting Disk(s) • A node is requested to “kill itself”; executer: typically CSSD
Re-bootless Node Fencing (restart) Fence the cluster, do not reboot the node • Until Oracle Clusterware 11.2.0.2, fencing meant “re-boot” • With Oracle Clusterware 11.2.0.2, re-boots will be seen less, because:
– Re-boots affect applications that might run an a node, but are not protected – Customer requirement: prevent a reboot, just stop the cluster – implemented...
Re-bootless Node Fencing (restart) How it works • With Oracle Clusterware 11.2.0.2, re-boots will be seen less:
– Instead of fast re-booting the node, a graceful shutdown of the stack is attempted • Then IO issuing processes are killed; it is made sure that no IO process remains
– For a RAC DB mainly the log writer and the database writer are of concern
Re-bootless Node Fencing (restart) EXCEPTIONS • With Oracle Clusterware 11.2.0.2, re-boots will be seen less, unless…:
– – – –
IF the check for a successful kill of the IO processes fails → reboot IF CSSD gets killed during the operation → reboot IF cssdmonitor is not scheduled → reboot IF the stack cannot be shutdown in “short_disk_timeout”-seconds → reboot
Troubleshooting Scenarios Cluster Startup Problem Triage
• Multicast Domain Name Service Daemon (mDNS(d)) – Used by Grid Plug and Play to locate profiles in the cluster, as well as by GNS to perform name resolution. The mDNS process is a background process on Linux and UNIX and on Windows. – Uses multicast for cache updates on service advertisement arrival/departure. – Advertises/serves on all found node interfaces. – Log is GI_HOME/log/<node>/mdnsd/mdnsd.log
Missing Network Heartbeat (6) • ===> Node 2 is aborting itself to resolve the split brain and ensure the cluster integrity • 2016-08-13 17:00:40.707: [ CSSD][4052061088](:CSSNM00008:)clssnmCheckDskInfo: Aborting local node to avoid splitbrain. Cohort of 1 nodes with leader 2, drrac2, is smaller than cohort of 1 nodes led by node 1, drrac1, based on map type 2 • 2016-08-13 17:00:40.707: [ CSSD][4052061088]################################### • 2016-08-13 17:00:40.707: [ CSSD][4052061088]clssscExit: CSSD aborting from thread clssnmRcfgMgrThread • 2016-08-13 17:00:40.707: [ CSSD][4052061088]###################################
Voting Disk Access Problem (2) ====> The error message that shows a problem accessing the voting disk repeats once every 4 seconds 2016-08-13 18:31:23.782: [ CSSD][150477728]clssnmvDiskOpen: Opening /dev/sdb8 2016-08-13 18:31:23.782: [ SKGFD][150477728]Handle 0xf43fc6c8 from lib :UFS:: for disk :/dev/sdb8: 2016-08-13 18:31:23.782: [ CLSF][150477728]Opened hdl:0xf4365708 for dev:/dev/sdb8: 2016-08-13 18:31:23.787: [ SKGFD][150477728]ERROR: -9(Error 27072, OS Error (Linux Error: 5: Input/output error Additional information: 4 Additional information: 720913 Additional information: -1) ) 2016-08-13 18:31:23.787: [ CSSD][150477728](:CSSNM00060:)clssnmvReadBlocks: read failed at offset 17 of /dev/sdb8
Voting Disk Access Problem (4) ====> This message shows that ocssd.bin tried accessing the voting disk for 200 seconds 2016-08-13 18:34:38.205: [ CSSD][4110736288](:CSSNM00058:)clssnmvDiskCheck: No I/O completions for 200880 ms for voting file /dev/sdb8) ====> ocssd.bin aborts itself with an error message that the majority of voting disks are not available. In this case, there was only one voting disk, but if three voting disks were available, as long as two voting disks are accessible, ocssd.bin will not abort. 2016-08-13 18:34:38.206: [ CSSD][4110736288](:CSSNM00018:)clssnmvDiskCheck: Aborting, 0 of 1 configured voting disks available, need 1 2016-08-13 18:34:38.206: [ CSSD][4110736288]################################### 2016-08-13 18:34:38.206: [ CSSD][4110736288]clssscExit: CSSD aborting from thread clssnmvDiskPingMonitorThread 2016-08-13 18:34:38.206: [ CSSD][4110736288]###################################
Troubleshooting Scenarios Node Eviction Triage • Time synchronisation issue • Cluster Time Synchronisation Services daemon – Provides time management in a cluster for Oracle. • Observer mode when Vendor time synchronisation s/w is found – Logs time difference to the CRS alert log • Active mode when no Vendor time sync s/w is found
Troubleshooting Scenarios Node Eviction Triage • Cluster Ready Services Daemon – The CRSD daemon is primarily responsible for maintaining the availability of application resources, such as database instances. CRSD is responsible for starting and stopping these resources, relocating them when required to another node in the event of failure, and maintaining the resource profiles in the OCR (Oracle Cluster Registry). In addition, CRSD is responsible for overseeing the caching of the OCR for faster access, and also backing up the OCR. – Log file is GI_HOME/log/<node>/crsd/crsd.log • Rotation policy 10-50M • Retention policy 10 logs • Dynamic in 12.1 and can be changed
Troubleshooting Scenarios Node Eviction Triage • CRSD oraagent – CRSD’s oraagent manages • all database, instance, service and diskgroup resources • node listeners • SCAN listeners, and ONS – If the Grid Infrastructure owner is different from the RDBMS home owner then you would have 2 oraagents each running as one of the installation owners. The database, and service resources would be managed by the RDBMS home owner and other resources by the Grid Infrastructure home owner. – Log file is • GI_HOME/log/<node>/agent/crsd/oraagent_<user>/oraagent_<user>.log
• Agent return codes – Check entry must return one of the following return codes: • ONLINE • UNPLANNED_OFFLINE – Target=online, may be recovered failed over
• PLANNED_OFFLINE • UNKNOWN – Cannot determine, if previously online, partial then monitor
• PARTIAL – Some of a resources services are available. Instance up but not open.
Troubleshooting Scenarios Automatic Diagnostic Repository (ADR) § Important logs and traces § 11.2 – Databases only use ADR • Grid Infrastructure files in $GI_HOME/log/<node_name>/ – $GI_HOME/log/myHost/cssd – $GI_HOME/log/myHost/alertmyHost.log
§ 12c – Grid Infrastructure and Database use ADR § Different locations for Grid Infrastructure and Databases § Grid Infrastructure • Alert.log, cssd.log, csrd.log, etc
§ Databases §
Alert.log, background process traces, foreground process traces
Oracle Stack Coverage • Oracle Engineered Systems • Oracle Database Appliance o Oracle Exadata Database Machine o Oracle SuperCluster / MiniCluster o Oracle Private Cloud Appliance o Oracle Big Data Appliance o Oracle Exalogic Elastic Cloud o Oracle Exalytics In-Memory Machine o Oracle Zero Data Loss Recovery Appliance • Oracle ASR • Oracle Systems • Oracle Solaris • Cross stack checks • Solaris Cluster • OVN
• Oracle Database
• Oracle E-Business Suite
• Standalone Database • Grid Infrastructure & RAC
• Oracle Payables • Oracle Workflow
• Maximum Availability Architecture (MAA) Scorecard
• Oracle Purchasing
• Upgrade Readiness Validation
• Oracle Process Manufacturing
• Golden Gate • Oracle Restart • Oracle Enterprise Manager Cloud Control • Repository • Agent
• Profiles provide logical grouping of checks which are about similar topics • Run only checks in a specific profile ./exachk –profile <profile>
• Run everything except checks in a specific profile ./exachk –excludeprofile <profile>
Description
ASM Checks Audit Vault Configuration checks Oracle clusterware checks Checks only for Control VM(ec1-vm, ovmm, db, pc1, pc2). No cross node checks corroborate Exadata checks needs further review by user to determine pass or fail dba DBA Checks ebs Oracle E-Business Suite checks eci_healthchecks Enterprise Cloud Infrastructure Healthchecks ecs_healthchecks Enterprise Cloud System Healthchecks goldengate Oracle GoldenGate checks hardware Hardware specific checks for Oracle Engineered systems maa Maximum Availability Architecture Checks ovn Oracle Virtual Networking platinum Platinum certification checks preinstall Pre-installation checks prepatch Checks to execute before patching security Security checks solaris_cluster Solaris Cluster Checks storage Oracle Storage Server Checks switch Infiniband switch checks sysadmin Sysadmin checks user_defined_checks Run user defined checks from user_defined_checks.xml
Profiles • Profiles provide logical grouping of checks which are about similar topics • Run only checks in a specific profile ./orachk –profile <profile>
• Run everything except checks in a specific profile ./orachk –excludeprofile <profile>
ASM Checks Oracle Business Intelligence checks Oracle clusterware checks DBA Checks Oracle E-Business Suite checks Cloud control agent checks Cloud Control management server Cloud control checks Oracle GoldenGate checks Hardware specific checks for Oracle Engineered systems Oracle Access Manager checks Oracle Identify Manager checks Oracle Unified Directory server checks Oracle Virtual Networking Peoplesoft best practices Pre-installation checks Checks to execute before patching Security checks Siebel Checks Solaris Cluster Checks Oracle Storage Server Checks Infiniband switch checks Sysadmin checks Run user defined checks from user_defined_checks.xml
Keep Track of Changes to the Attributes of Important Files • Track changes to the attributes of important files with –fileattr – Looks at all files & directories within Grid Infrastructure and Database homes by default – The list of monitored directories and their contents can be configured to your specific requirements – Use –fileattr start to start the first snapshot ./orachk –fileattr start $ ./orachk -fileattr start CRS stack is running and CRS_HOME is not set. Do you want to set CRS_HOME to /u01/app/11.2.0.4/grid?[y/n][y] Checking ssh user equivalency settings on all nodes in cluster Node mysrv22 is configured for ssh user equivalency for oradb user Node mysrv23 is configured for ssh user equivalency for oradb user List of directories(recursive) for checking file attributes: /u01/app/oradb/product/11.2.0/dbhome_11203 /u01/app/oradb/product/11.2.0/dbhome_11204 orachk has taken snapshot of file attributes for above directories at: /orahome/oradb/orachk/orachk_mysrv21_20170504_041214
Keep Track of Changes to the Attributes of Important Files • Compare current attributes against first snapshot using –fileattr check ./orachk –fileattr check $ ./orachk -fileattr check -includedir "/root/myapp/config" -excludediscovery CRS stack is running and CRS_HOME is not set. Do you want to set CRS_HOME to /u01/app/12.2.0/grid?[y/n][y] Checking for prompts on myserver18 for oragrid user... Checking ssh user equivalency settings on all nodes in cluster Node myserver17 is configured for ssh user equivalency for root user List of directories(recursive) for checking file attributes: /root/myapp/config
• Results of snapshot comparison will also be shown in the HTML report output
Checking file attribute changes... . "/root/myapp/config/myappconfig.xml" is different: Baseline :
0644
oracle
root /root/myapp/config/myappconfig.xml
Current
0644
root
root /root/myapp/config/myappconfig.xml
:
…etc …etc
Note: • • •
Use the same arguments with check that you used with start Will proceed to perform standard health checks after attribute checking File Attribute Changes will also show in HTML report output
Improve performance of SQL queries • Many new checks focus on known issues in 12c Optimizer as well as SQL Plan Management
All contained in the dba profile: -profile dba
• These checks target problems such as: – Wrong results returned – High memory & CPU usage – Errors such as ORA-00600 or ORA-07445 – Issues with cursor usage – Other general SQL plan management problems
Upgrade to Database 12.2 with confidence • New checks to help when upgrading the database to 12.2 • Both pre and post upgrade verification to prevent problems related to: • OS configuration • Grid Infrastructure & Database patch prerequisites • Database configuration • Cluster configuration
JSON Output to Integrate with Kibana, Elastic Search etc • The JSON provides many tags to allow dashboard filtering based on facts such as: • • • • • • • • •
Engineered System type Engineered System version Hardware type Node name OS version Rack identifier Rack type Database version And more...
Supported Platforms and Versions • All Oracle Database & Grid versions 10.2+ are supported
• All major Operating Systems are supported – Linux (OEL, RedHat, SUSE, Itanium & zLinux) – Oracle Solaris (SPARC & x86-64) – AIX – HPUX (Itanium & PA-RISC) – Windows
• You probably already have TFA installed as it is included with: Oracle Grid Infrastructure
11.2.0.4+ 12.1.0.2+ 12.2.0.1+
Oracle Database
12.2.0.1+
• Updated quarterly via 1513912.1 OS versions supported are the same as those supported by the Database Java Runtime Edition 1.8 required
Perform Analysis Using the Included Tools Tool orachk or exachk
oswatcher procwatcher oratop sqlt alertsummary ls pstack
Description Provides health checks for the Oracle stack. Oracle Trace File Analyzer will install either • Oracle EXAchk for Engineered Systems, see document 1070954.1 for more details or • Oracle ORAchk for all non-Engineered Systems, see document 1268927.2 for more details Collects and archives OS metrics. These are useful for instance or node evictions & performance Issues. See document 301137.1 for more details Automates & captures database performance diagnostics and session level hang information. See document 459694.1 for more details
Tool
Description
grep
Search alert or trace files with a given database and file name pattern, for a search string.
summary
Provides high level summary of the configuration
vi
Opens alert or trace files for viewing a given database and file name pattern in the vi editor
tail
Runs a tail on an alert or trace files for a given database and file name pattern
param
Shows all database and OS parameters that match a specified pattern
dbglevel
Sets and unsets multiple CRS trace levels with one command
Provides near real-time database monitoring. See document 1500864.1 for more details.
history
Shows the shell history for the tfactl shell
changes
Captures SQL trace data useful for tuning. See document 215187.1 for more details.
Reports changes in the system setup over a given time period. This includes database parameters, OS parameters and patches applied
calog
Reports major events from the Cluster Event log
events
Reports warnings and errors seen in the logs
Provides summary of events for one or more database or ASM alert files from all nodes Lists all files TFA knows about for a given file name pattern across all nodes Generate process stack for specified processes across all nodes
Not all tools are included in Grid or Database install. Download from 1513912.1 to get full collection of tools
managelogs Shows disk space usage and purges ADR log and trace files ps triage
Finds processes Summarize oswatcher/exawatcher data
OS Watcher (Support Tools Bundle) Collect & Archive OS Metrics • Executes standard UNIX utilities (e.g. vmstat, iostat, ps, etc) on regular intervals • Built in Analyzer functionality to summarize, graph and report upon collected metrics • Output is Required for node reboot and performance issues • Simple to install, extremely lightweight • Runs on ALL platforms (Except Windows) • MOS Note: 301137.1 – OS Watcher Users Guide
Procwatcher (Support Tools Bundle) Monitor & Examine Database Processes • Single instance & RAC • Generates session wait, lock and latch reports as well as call stacks from any problem process(s) • Ability to collect stack traces of specific processes using Oracle Tools and OS Debuggers • Typically reduces SR resolution for performance related issues • Runs on ALL major UNIX Platforms • MOS Note: 459694.1 – Procwatcher Install Guide
Manual Data Gathering vs One Command SRDC Manual Data Gathering
TFA SRDC
1. Generate ADDM reviewing Document 1680075.1
1. Run tfactl diagcollect –srdc dbperf
2. Identify “good” and “problem” periods and gather AWR reviewing Document 1903158.1
2. Upload resulting zip file to SR
3. Generate AWR compare report (awrddrpt.sql) using “good” and “problem” periods 4. Generate ASH report for “good” and “problem” periods reviewing Document 1903145.1 5. Collect OSWatcher data reviewing Document 301137.1 6. Check alert.log if there are any errors during the “problem” period 7. Find any trace files generated during the “problem” period 8. Collate and upload all the above files/outputs to SR