検索
ホームページデータベースmysql チュートリアルOracle11gR2安装RAC错误之--HOSTS文件错误

Oracle 11gR2 安装RAC错误之--HOSTS文件错误 系统环境: 操作系统:RedHat EL5 Cluster: Oracle GI( Grid Infrastructure) Oracle: Oracle 11.2.0.1.0 如图所示:RAC 系统架构 650) this.width=650;" src="http://www.68idc.cn/help/uploads/allimg/151214

Oracle 11gR2 安装RAC错误之--HOSTS文件错误

系统环境:

操作系统:RedHat EL5

Cluster: Oracle GI(Grid Infrastructure)

Oracle:  Oracle 11.2.0.1.0


如图所示:RAC 系统架构

wKioL1OQLjuxVHmmAAHMpFKmO50370.jpg

  对于Oracle 11G构建RAC首先需要构建GI(Grid Infrastructure)的架构

错误现象:

节点2运行root.sh脚本错误:

[root@hk2 ~]# /u01/11.2.0/grid/root.sh

Running Oracle 11g root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2014-07-07 17:04:37: Parsing the host name
2014-07-07 17:04:37: Checking for super user privileges
2014-07-07 17:04:37: User has super user privileges
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE 
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node hk1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
CRS-2672: Attempting to start 'ora.mdnsd' on 'hk2'
CRS-2676: Start of 'ora.mdnsd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'hk2'
CRS-2676: Start of 'ora.gipcd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'hk2'
CRS-2676: Start of 'ora.gpnpd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'hk2'
CRS-2676: Start of 'ora.cssdmonitor' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'hk2'
CRS-2672: Attempting to start 'ora.diskmon' on 'hk2'
CRS-2676: Start of 'ora.diskmon' on 'hk2' succeeded
CRS-2676: Start of 'ora.cssd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'hk2'
CRS-2676: Start of 'ora.ctssd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'hk2'
CRS-2676: Start of 'ora.drivers.acfs' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'hk2'
CRS-2676: Start of 'ora.asm' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'hk2'
CRS-2676: Start of 'ora.crsd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'hk2'
CRS-2676: Start of 'ora.evmd' on 'hk2' succeeded
Timed out waiting for the CRS stack to start.

查看日志:

[root@hk2 crsd]# ls

core.12152  core.15934  core.16128  crsd.log  crsdOUT.log  crsd.trc

[root@hk2 crsd]# tail crsdOUT.log 

Unable to resolve address for localhost:2016

ONS runtime exiting

Fatal error: eONS: eonsapi.c: Aug  4 2009 21:09:36

2014-07-07 17:55:31  

Changing directory to /u01/11.2.0/grid/log/hk2/crsd

2014-07-07 17:55:31  

CRSD REBOOT

Unable to resolve address for localhost:2016

ONS runtime exiting

Fatal error: eONS: eonsapi.c: Aug  4 2009 21:09:36

[root@hk2 crsd]# more crsdOUT.log 

2014-07-07 17:08:23  

Changing directory to /u01/11.2.0/grid/log/hk2/crsd

2014-07-07 17:08:23  

CRSD REBOOT

Unable to resolve address for localhost:2016

ONS runtime exiting

Fatal error: eONS: eonsapi.c: Aug  4 2009 21:09:36

......

错误提示,无法解析localhost主机!


查看/etc/hosts文件:

[root@hk2 crsd]# cat /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.56.101  hk1
192.168.56.103  hk2
10.10.10.101  hk1-priv
10.10.10.103  hk2-priv
192.168.56.104 hk1-vip
192.168.56.105 hk2-vip
192.168.56.106 hk-scan

缺少对localhost的解析!


解决方法:

1、编辑/etc/hosts文件

[root@hk1 bin]# cat /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1  localhost
192.168.56.101  hk1
192.168.56.103  hk2
10.10.10.101  hk1-priv
10.10.10.103  hk2-priv
192.168.56.104 hk1-vip
192.168.56.105 hk2-vip
192.168.56.106 hk-scan

2、删除CRS的配置,重新运行root.sh

[root@hk2 install]# perl rootcrs.pl -deconfig -force

2014-07-07 18:09:51: Parsing the host name
2014-07-07 18:09:51: Checking for super user privileges
2014-07-07 18:09:51: User has super user privileges
Using configuration parameter file: ./crsconfig_params
PRCR-1035 : Failed to look up CRS resource ora.cluster_vip.type for 1
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.eons is registered
Cannot communicate with crsd
ACFS-9200: Supported
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hk2'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'hk2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hk2'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hk2'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'hk2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hk2'
CRS-2673: Attempting to stop 'ora.evmd' on 'hk2'
CRS-2673: Attempting to stop 'ora.asm' on 'hk2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'hk2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hk2' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'hk2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'hk2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hk2' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'hk2' succeeded
CRS-2677: Stop of 'ora.asm' on 'hk2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hk2'
CRS-2677: Stop of 'ora.cssd' on 'hk2' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'hk2'
CRS-2673: Attempting to stop 'ora.gipcd' on 'hk2'
CRS-2677: Stop of 'ora.gipcd' on 'hk2' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'hk2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hk2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

重新运行root.sh:

[root@hk2 install]# /u01/11.2.0/grid/root.sh

Running Oracle 11g root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2014-07-07 18:11:35: Parsing the host name
2014-07-07 18:11:35: Checking for super user privileges
2014-07-07 18:11:35: User has super user privileges
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE 
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node hk1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
CRS-2672: Attempting to start 'ora.mdnsd' on 'hk2'
CRS-2676: Start of 'ora.mdnsd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'hk2'
CRS-2676: Start of 'ora.gipcd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'hk2'
CRS-2676: Start of 'ora.gpnpd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'hk2'
CRS-2676: Start of 'ora.cssdmonitor' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'hk2'
CRS-2672: Attempting to start 'ora.diskmon' on 'hk2'
CRS-2676: Start of 'ora.diskmon' on 'hk2' succeeded
CRS-2676: Start of 'ora.cssd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'hk2'
CRS-2676: Start of 'ora.ctssd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'hk2'
CRS-2676: Start of 'ora.drivers.acfs' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'hk2'
CRS-2676: Start of 'ora.asm' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'hk2'
CRS-2676: Start of 'ora.crsd' on 'hk2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'hk2'
CRS-2676: Start of 'ora.evmd' on 'hk2' succeeded
hk2     2014/07/07 18:13:53     /u01/11.2.0/grid/cdata/hk2/backup_20140707_181353.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.   Actual 4095 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

@脚本运行成功!


3、验证

[root@hk2 bin]# ./crs_stat -t

Name           Type           Target    State     Host        
------------------------------------------------------------
ora.eons       ora.eons.type  ONLINE    ONLINE    hk1         
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               
ora.hk1.gsd    application    OFFLINE   OFFLINE               
ora.hk1.ons    application    ONLINE    ONLINE    hk1         
ora.hk1.vip    ora....t1.type ONLINE    ONLINE    hk1         
ora.hk2.gsd    application    OFFLINE   OFFLINE               
ora.hk2.ons    application    ONLINE    ONLINE    hk2         
ora.hk2.vip    ora....t1.type ONLINE    ONLINE    hk2         
ora....network ora....rk.type ONLINE    ONLINE    hk1         
ora.ons        ora.ons.type   ONLINE    ONLINE    hk1

@至此,问题解决!


声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
複数の単一列インデックスに対して複合インデックスをいつ使用する必要がありますか?複数の単一列インデックスに対して複合インデックスをいつ使用する必要がありますか?Apr 11, 2025 am 12:06 AM

データベースの最適化では、クエリ要件に従ってインデックス作成戦略を選択する必要があります。1。クエリに複数の列が含まれ、条件の順序が固定されている場合、複合インデックスを使用します。 2。クエリに複数の列が含まれているが、条件の順序が修正されていない場合、複数の単一列インデックスを使用します。複合インデックスは、マルチコラムクエリの最適化に適していますが、単一列インデックスは単一列クエリに適しています。

MySQLでスロークエリを識別して最適化する方法は? (スロークエリログ、Performance_schema)MySQLでスロークエリを識別して最適化する方法は? (スロークエリログ、Performance_schema)Apr 10, 2025 am 09:36 AM

MySQLスロークエリを最適化するには、slowquerylogとperformance_schemaを使用する必要があります。1。LowerQueryLogを有効にし、しきい値を設定して、スロークエリを記録します。 2。performance_schemaを使用してクエリの実行の詳細を分析し、パフォーマンスのボトルネックを見つけて最適化します。

MySQLおよびSQL:開発者にとって不可欠なスキルMySQLおよびSQL:開発者にとって不可欠なスキルApr 10, 2025 am 09:30 AM

MySQLとSQLは、開発者にとって不可欠なスキルです。 1.MYSQLはオープンソースのリレーショナルデータベース管理システムであり、SQLはデータベースの管理と操作に使用される標準言語です。 2.MYSQLは、効率的なデータストレージと検索機能を介して複数のストレージエンジンをサポートし、SQLは簡単なステートメントを通じて複雑なデータ操作を完了します。 3.使用の例には、条件によるフィルタリングやソートなどの基本的なクエリと高度なクエリが含まれます。 4.一般的なエラーには、SQLステートメントをチェックして説明コマンドを使用することで最適化できる構文エラーとパフォーマンスの問題が含まれます。 5.パフォーマンス最適化手法には、インデックスの使用、フルテーブルスキャンの回避、参加操作の最適化、コードの読み取り可能性の向上が含まれます。

MySQL非同期マスタースレーブレプリケーションプロセスを説明してください。MySQL非同期マスタースレーブレプリケーションプロセスを説明してください。Apr 10, 2025 am 09:30 AM

MySQL非同期マスタースレーブレプリケーションにより、BINLOGを介したデータの同期が可能になり、読み取りパフォーマンスと高可用性が向上します。 1)マスターサーバーレコードはBinlogに変更されます。 2)スレーブサーバーは、I/Oスレッドを介してBINLOGを読み取ります。 3)サーバーSQLスレッドは、BINLOGを適用してデータを同期させます。

MySQL:簡単な学習のためのシンプルな概念MySQL:簡単な学習のためのシンプルな概念Apr 10, 2025 am 09:29 AM

MySQLは、オープンソースのリレーショナルデータベース管理システムです。 1)データベースとテーブルの作成:createdatabaseおよびcreateTableコマンドを使用します。 2)基本操作:挿入、更新、削除、選択。 3)高度な操作:参加、サブクエリ、トランザクション処理。 4)デバッグスキル:構文、データ型、およびアクセス許可を確認します。 5)最適化の提案:インデックスを使用し、選択*を避け、トランザクションを使用します。

MySQL:ユーザーフレンドリーなデータベースの紹介MySQL:ユーザーフレンドリーなデータベースの紹介Apr 10, 2025 am 09:27 AM

MySQLのインストールと基本操作には、次のものが含まれます。1。mysqlをダウンロードしてインストールし、ルートユーザーパスワードを設定します。 2。sqlコマンドを使用して、createdatabaseやcreateTableなどのデータベースとテーブルを作成します。 3. CRUD操作を実行し、挿入、選択、更新、コマンドを削除します。 4.パフォーマンスを最適化し、複雑なロジックを実装するためのインデックスとストアドプロシージャを作成します。これらの手順を使用すると、MySQLデータベースをゼロから構築および管理できます。

InnoDBバッファープールはどのように機能し、なぜパフォーマンスに不可欠なのですか?InnoDBバッファープールはどのように機能し、なぜパフォーマンスに不可欠なのですか?Apr 09, 2025 am 12:12 AM

Innodbbufferpoolは、データとインデックスページをメモリにロードすることにより、MySQLデータベースのパフォーマンスを向上させます。 1)データページは、ディスクI/Oを削減するためにBufferPoolにロードされます。 2)汚れたページは、定期的にディスクにマークされ、リフレッシュされます。 3)LRUアルゴリズム管理データページの排除。 4)読み出しメカニズムは、可能なデータページを事前にロードします。

MySQL:初心者向けのデータ管理の容易さMySQL:初心者向けのデータ管理の容易さApr 09, 2025 am 12:07 AM

MySQLは、インストールが簡単で、強力で管理しやすいため、初心者に適しています。 1.さまざまなオペレーティングシステムに適した、単純なインストールと構成。 2。データベースとテーブルの作成、挿入、クエリ、更新、削除などの基本操作をサポートします。 3.参加オペレーションやサブクエリなどの高度な機能を提供します。 4.インデックス、クエリの最適化、テーブルパーティション化により、パフォーマンスを改善できます。 5。データのセキュリティと一貫性を確保するために、バックアップ、リカバリ、セキュリティ対策をサポートします。

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

Dreamweaver Mac版

Dreamweaver Mac版

ビジュアル Web 開発ツール

EditPlus 中国語クラック版

EditPlus 中国語クラック版

サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

WebStorm Mac版

WebStorm Mac版

便利なJavaScript開発ツール

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)