Thứ Ba, 24 tháng 3, 2026

Patch 17380185 lỗi trên node 2

1.VẤN ĐỀ

[root@goldhpdb02 OPatch]# $GRID_HOME/OPatch/opatch auto /u01/setups/DB/17380185 -oh /u01/app/oracle/product/11.2.0/dbhome_1

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u01/setups/DB -patchn 17380185 -oh /u01/app/oracle/product/11.2.0/dbhome_1 -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-03-24_17-26-32.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-03-24_17-26-32.report.log

2026-03-24 17:26:32: Starting Clusterware Patch Setup

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

ERROR: Unable to run lspatches on /u01/app/oracle/product/11.2.0/dbhome_1

opatch auto failed.

2.NGUYÊN NHÂN

Do file /u01/app/oraInventory/ContentsXML/inventory.xml thiếu đoạn OraDB11g_home1
[root@goldhpdb01 oraInventory]# cat /u01/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="Ora11g_gridinfrahome1" LOC="/u01/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="goldhpdb01"/>
      <NODE NAME="goldhpdb02"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="2">
   <NODE_LIST>
      <NODE NAME="goldhpdb01"/>
      <NODE NAME="goldhpdb02"/>
   </NODE_LIST>
</HOME>
</HOME_LIST>
</INVENTORY>

File này phải liệt kê đường dẫn của ORACLE_HOME. Nếu file này trống, đó là lý do OPatch trả về null.

3.GIẢI PHÁP

Error Code 73Error Code 28 khi chạy opatch lsinventory thường chỉ ra rằng bộ cài OPatch không thể đọc được hoặc không tìm thấy thông tin trong Central Inventory hoặc Local Inventory.

Dựa trên log bạn cung cấp, có một sự lệch pha nhẹ giữa phiên bản OPatch (11.2.0.3.52) và OUI (11.2.0.2.0), nhưng nguyên nhân chính thường nằm ở quyền hạn hoặc file cấu hình bị lỗi.

1. Nguyên nhân chính

  • Inventory bị lock: Có một tiến trình cài đặt khác chưa kết thúc hoặc bị treo, để lại file lock.

  • Quyền truy cập (Permissions): User oracle không có quyền đọc/ghi vào thư mục /u01/app/oraInventory.

  • File oraInst.loc sai nội dung: Đường dẫn trỏ đến Central Inventory không chính xác.

  • Inventory bị hỏng (Corrupt): Các file XML trong thư mục ContentsXML bị trống hoặc lỗi định dạng.


2. Các bước xử lý chi tiết

Bước 1: Kiểm tra file định danh Inventory

Kiểm tra nội dung file tại đường dẫn mà OPatch báo (/u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc):

Bash
cat /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc

Đảm bảo dòng inventory_loc trỏ đúng về /u01/app/oraInventoryinst_groupoinstall.

Bước 2: Kiểm tra quyền hạn (Permissions)

Hãy chắc chắn user oracle sở hữu các thư mục này:

Bash
ls -ld /u01/app/oraInventory
ls -l /u01/app/oraInventory/ContentsXML/inventory.xml

Nếu không đúng, hãy dùng quyền root để sửa:

Bash
chown -R oracle:oinstall /u01/app/oraInventory
chmod -R 770 /u01/app/oraInventory

Bước 3: Xóa file Lock (Nếu có)

Kiểm tra xem có file lock nào đang ngăn cản OPatch truy cập không:

Bash
find /u01/app/oraInventory -name "*.lock"

Nếu thấy, hãy xóa chúng đi.

Bước 4: Kiểm tra nội dung Inventory

Mở file inventory.xml để xem nó có bị trống (0 byte) hay không:

Bash
cat /u01/app/oraInventory/ContentsXML/inventory.xml
[root@goldhpdb01 oraInventory]# cat /u01/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="Ora11g_gridinfrahome1" LOC="/u01/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="goldhpdb01"/>
      <NODE NAME="goldhpdb02"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="2">
   <NODE_LIST>
      <NODE NAME="goldhpdb01"/>
      <NODE NAME="goldhpdb02"/>
   </NODE_LIST>
</HOME>
</HOME_LIST>
</INVENTORY>

File này phải liệt kê đường dẫn của ORACLE_HOME. Nếu file này trống, đó là lý do OPatch trả về null.


3. Giải pháp khắc phục triệt để: Re-attach Inventory

Nếu các bước trên không xong, bạn cần "đăng ký" lại Oracle Home với Central Inventory. Chạy lệnh sau (thay đổi đường dẫn nếu cần):

Bash
cd $ORACLE_HOME/oui/bin
./runInstaller -attachHome ORACLE_HOME="/u01/app/oracle/product/11.2.0/dbhome_1" ORACLE_HOME_NAME="OraDb11g_home1"

Lưu ý: Sau khi chạy lệnh này, hãy thử lại opatch lsinventory.


4. Nâng cấp OPatch (Khuyến nghị)

Phiên bản OPatch của bạn khá cũ. Vì bạn đang có kế hoạch nâng cấp hệ thống, bạn nên tải bản OPatch mới nhất cho 11.2.0.3 từ trang hỗ trợ của Oracle (Patch 6880880).

Cách cài lại OPatch:

  1. Download file zip OPatch mới.

  2. Backup thư mục cũ: mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old.

  3. Unzip file mới trực tiếp vào $ORACLE_HOME.

💡 Bài học:

Lỗi LsInventorySession failed: null là lỗi rất "vô duyên" của Oracle, thường do file inventory.xml bị lỗi định dạng sau một lần cài đặt không thành công hoặc disk bị đầy (giống trường hợp /u01 100% bạn vừa gặp).

=============================
TƯ VẤN: Click Here hoặc Hotline/Zalo 090.29.12.888
=============================
Website không chứa bất kỳ quảng cáo nào, mọi đóng góp để duy trì phát triển cho website (donation) xin vui lòng gửi về STK 90.2142.8888 - Ngân hàng Vietcombank Thăng Long - TRAN VAN BINH
=============================
Nếu bạn không muốn bị AI thay thế và tiết kiệm 3-5 NĂM trên con đường trở thành DBA chuyên nghiệp hay làm chủ Database thì hãy đăng ký ngay KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE, được Coaching trực tiếp từ tôi với toàn bộ bí kíp thực chiến, thủ tục, quy trình của gần 20 năm kinh nghiệm (mà bạn sẽ KHÔNG THỂ tìm kiếm trên Internet/Google) từ đó giúp bạn dễ dàng quản trị mọi hệ thống Core tại Việt Nam và trên thế giới, đỗ OCP.
- CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
- Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
2 khóa học online qua video giúp bạn nhanh chóng có những kiến thức nền tảng về Linux, Oracle, học mọi nơi, chỉ cần có Internet/4G:
- Oracle cơ bản: https://bit.ly/admin_1200
- Linux: https://bit.ly/linux_1200
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile/Zalo: 0902912888
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: https://www.youtube.com/@binhguru
👨 Tiktok: https://www.tiktok.com/@binhguru
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhguru
👨 Podcast: https://www.podbean.com/pu/pbblog-eskre-5f82d6
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
cơ sở dữ liệu, cơ sở dữ liệu quốc gia, database, AI, trí tuệ nhân tạo, artificial intelligence, machine learning, deep learning, LLM, ChatGPT, DeepSeek, Grok, oracle tutorial, học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,sql tutorial, khóa học pl/sql tutorial, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c/21c/23c/23ai, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail,oracle RAC, ASM, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle oca, oracle ocp, oracle ocm , oracle weblogic, postgresql tutorial, mysql tutorial, mariadb tutorial, ms sql server tutorial, nosql, mongodb tutorial, oci, cloud, middleware tutorial, docker, k8s, micro service, hoc solaris tutorial, hoc linux tutorial, hoc aix tutorial, unix tutorial, securecrt, xshell, mobaxterm, putty

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master