Oracle啟動兩個監聽
Oracle伺服器更換IP後,辦公網路裡面可以正常訪問了,外地的同事,連了vpn 也可以訪問,以為可以收工回家,突然又有同事過來說,機房的伺服器ping不通新的ip了。
換了幾臺機器,都ping不通,ping其他新ip一個段的伺服器又正常,也可以ssh,又試了下以前的ip地址,可以ping通。
總結起來,
ping不通的伺服器都是Oracle伺服器在同一個網段的伺服器,以前都是10段的,Oracle伺服器換了ip後,外部訪問的地址就不是10段了,但是同一個段的伺服器,又不能去另一個路由器繞一圈回來訪問192段,所有不能訪問
。(猜測)
Oracle伺服器路由如下,預設訪問地址為192段
[oracle@venn01 admin]$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface192.xx.xx.0 * 255.255.255.0 U 0 0 0 eth1192.xx.xx.0 * 255.255.255.0 U 0 0 0 virbr010.xx.xx.0 * 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth0 link-local * 255.255.0.0 U 1003 0 0 eth1 default 192.xx.xx.x 0.0.0.0 UG 0 0 0 eth1
網路卡 eth0 ip :10.xx.xx.xx
網路卡 eth1 ip :192.xx.xx.xx
伺服器的預設路由地址是192段的
不想去配路由,因為不會
所以解決辦法就是, 給Oracle啟動兩個監聽,分別監聽伺服器的兩個IP地址,埠保持不變
修改 listener.ora
[oracle@ut25 admin]$ pwd/opt/oracle/db01/app/oracle/product/11.2.0/network/admin[oracle@venn01 admin]$ more listener.ora # listener.ora Network Configuration File: /opt/oracle/db01/app/oracle/product/11.2.0/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /opt/oracle/db01/app/oracle/product/11.2.0) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.xx.xx.xx)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.xx.xx.xx)(PORT = 1521)) ) ) ADR_BASE_LISTENER = /opt/oracle/db01/app/oracle 重啟監聽: [oracle@venn01 ~]$ lsnrctl stopLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-SEP-2018 13:11:05Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))) The command completed successfully [oracle@venn01 admin]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-SEP-2018 13:25:51Copyright (c) 1991, 2009, Oracle. All rights reserved. TNS-01106: Listener using listener name LISTENER has already been started [oracle@venn01 admin]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-SEP-2018 13:25:55Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))) The command completed successfully [oracle@venn01 admin]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-SEP-2018 13:26:00Copyright (c) 1991, 2009, Oracle. All rights reserved. Starting /opt/oracle/db01/app/oracle/product/11.2.0/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /opt/oracle/db01/app/oracle/product/11.2.0/network/admin/listener.oraLog messages written to /opt/oracle/db01/app/oracle/diag/tnslsnr/venn01/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.xx.xx.xx)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.xx.xx.xx)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))) STATUS of the LISTENER------------------------Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 11-SEP-2018 13:26:00Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/oracle/db01/app/oracle/product/11.2.0/network/admin/listener.ora Listener Log File /opt/oracle/db01/app/oracle/diag/tnslsnr/venn01/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.xx.xx.xx)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.xx.xx.xx)(PORT=1521)))Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
可見,Oracle的兩個監聽分別在兩個IP地址:10和192 都起來了
在辦公網可以正常訪問
在機房內網也可以正常訪問了
搞定
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25469263/viewspace-2647692/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle監聽日誌2g-監聽啟動報錯Oracle
- 自動重新啟動oracle監聽程式 for windowsOracleWindows
- Oracle監聽啟動後自動關閉Oracle
- Oracle監聽服務無法啟動Oracle
- oracle 監聽重啟Oracle
- oracle 10g出現兩個監聽程式Oracle 10g
- Oracle 10g 兩個監聽程式的故障Oracle 10g
- ORACLE動態監聽與靜態監聽Oracle
- oracle靜態監聽和動態監聽Oracle
- 【oracle】動態監聽與靜態監聽Oracle
- oracle之 監聽器無法啟動的幾個原因總結Oracle
- oracle監聽開啟trace fileOracle
- Oracle 動態監聽配置Oracle
- ORACLE 動態註冊,靜態註冊,多個監聽,一個監聽多個埠配置Oracle
- 啟動資料庫監聽資料庫
- oracle資料庫監聽啟動不了的原因分析Oracle資料庫
- oracle 10g rac當監聽程式監聽對方vip時啟動監聽報錯TNS-12545Oracle 10g
- 【監聽】兩庫互配靜態監聽
- 【listener】oracle靜態監聽和動態監聽 【轉載】Oracle
- ORACLE動態監聽總結Oracle
- oracle 監聽 靜態 動態Oracle
- Oracle 動態監聽註冊Oracle
- 2.5.4. 測試Oracle net——2.5.4.1. 啟動監聽程式Oracle
- 如何讓oracle DB、監聽和oem開機啟動(dbstart)Oracle
- Oracle 三個監聽檔案Oracle
- oracle 監聽配置多個埠Oracle
- 監聽啟動失敗解決
- Oracle 監聽Oracle
- ORACLE啟動監聽器 The listener supports no services 問題解決方法Oracle
- oracle listener 監聽啟動不起來處理案例一則Oracle
- 同一個伺服器建立兩個監聽器的話,兩個監聽器的port和KEY都不能相同伺服器
- 配置作業系統重啟後,Oracle資料庫和監聽自動啟動作業系統Oracle資料庫
- oracle 多個例項監聽不到Oracle
- oracle偵聽無法啟動Oracle
- LINUX開機自動啟動ORACLE資料庫和監聽指令碼LinuxOracle資料庫指令碼
- linux平臺下監聽器和Oracle的自動啟動與停止LinuxOracle
- oracle監聽器啟動lsnrctl status例程的狀態為unknownOracle
- 【LISTENER】一個資料庫配置兩個監聽埠號資料庫