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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 2.5.4. 測試Oracle net——2.5.4.1. 啟動監聽程式Oracle
- 啟動資料庫監聽資料庫
- oracle靜態監聽Oracle
- JMS監聽Oracle AQOracle
- 【DB寶49】Oracle如何設定DB、監聽和EM開機啟動Oracle
- Oracle dblink監聽問題Oracle
- 6、oracle網路(監聽)Oracle
- Oracle 監聽異常處理Oracle
- Oracle 建立非1521埠監聽Oracle
- Oracle 監聽投毒COST解決Oracle
- hyperf 啟動、重啟、停止、檔案變化監聽命令包
- oracle rac scan監聽更改埠號Oracle
- oracle監聽不到例項服務Oracle
- zabbix-agent啟動之後10050埠未監聽
- Oracle 19C 監聽無法動態註冊例項Oracle
- Oracle 11g RAC 監聽日常管理Oracle
- oracle 最全的監聽、tnsnames.ora格式Oracle
- oracle之 單例項監聽修改埠Oracle單例
- Oracle 修改預設監聽埠故障分析Oracle
- Android之監聽View的兩個指頭是放大和縮小AndroidView
- npmscript命令同時開啟多個監聽服務concurrentlyNPM
- 監聽div滾動高度
- ORACLE之手動註冊監聽listener。alter system set local_listener="XXX"Oracle
- ORACLE EXPDP IMPDP 的停止和啟動及監控Oracle
- [重慶思莊每日技術分享]-ORACLE 19C資料庫啟動後,無監聽服務Oracle資料庫
- 監聽 watch props物件屬性監聽 或深度監聽物件
- flutter 中監聽滑動事件Flutter事件
- 監聽滾動,上下翻頁
- 監聽配置細節引數詳解兩則
- vue監聽input是否為空(監聽值為物件某個屬性)Vue物件
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- 【LISTENER】Oracle通過監聽連線緩慢分析Oracle
- nginx 80埠監聽多個域名Nginx
- rac監聽不能動態註冊
- vue 監聽頁面滾動事件Vue事件
- 直播平臺軟體開發,監聽WebView滑動到底部的兩種方式WebView
- Oracle監聽器中的XDB、XPT和PLSExtProc服務Oracle
- select監聽多個client -- linux函式clientLinux函式