客戶端tnsping不通問題
前幾天安裝好oracle12c後,今天想用客戶端去連線oracle。
1,客戶端能ping通ip
2,客戶端無法tnsping通oracle
3,在伺服器本機tnsping能連線到oracle
經過很久的問題查詢後
4,在客戶端直接ping ip 1521 不通 例如 ping 192.168.10.15 1521
5,判斷是1521埠沒有開啟
6,開啟1521埠
[root@ora1 ~]# sudo vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p tcp -m statde --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
COMMIT
重啟並儲存
[root@ora1 ~]# sudo service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: iptables-restore v1.4.7: Couldn't load match `statde':/lib64/xtables-1.4.7/libipt_statde.so: cannot open shared object file: No such file or directory
Error occurred at line: 13
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[FAILED]
[root@ora1 ~]# sudo service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
7,客戶端順利連結到oracle
附:檢視1521埠狀態
[oracle@ora1 ~]$ netstat -anp |grep tns
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 :::1521 :::* LISTEN 2512/tnslsnr
tcp 0 0 :::5500 :::* LISTEN 2512/tnslsnr
tcp 0 0 ::ffff:127.0.0.1:1521 ::ffff:127.0.0.1:33072 ESTABLISHED 2512/tnslsnr
unix 2 [ ACC ] STREAM LISTENING 18089 2512/tnslsnr /var/tmp/.oracle/s#2512.1
unix 2 [ ACC ] STREAM LISTENING 18091 2512/tnslsnr /var/tmp/.oracle/sEXTPROC1521
unix 2 [ ACC ] STREAM LISTENING 18093 2512/tnslsnr /var/tmp/.oracle/s#2512.2
1,客戶端能ping通ip
2,客戶端無法tnsping通oracle
3,在伺服器本機tnsping能連線到oracle
經過很久的問題查詢後
4,在客戶端直接ping ip 1521 不通 例如 ping 192.168.10.15 1521
5,判斷是1521埠沒有開啟
6,開啟1521埠
[root@ora1 ~]# sudo vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p tcp -m statde --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
COMMIT
重啟並儲存
[root@ora1 ~]# sudo service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: iptables-restore v1.4.7: Couldn't load match `statde':/lib64/xtables-1.4.7/libipt_statde.so: cannot open shared object file: No such file or directory
Error occurred at line: 13
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[FAILED]
[root@ora1 ~]# sudo service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
7,客戶端順利連結到oracle
附:檢視1521埠狀態
[oracle@ora1 ~]$ netstat -anp |grep tns
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 :::1521 :::* LISTEN 2512/tnslsnr
tcp 0 0 :::5500 :::* LISTEN 2512/tnslsnr
tcp 0 0 ::ffff:127.0.0.1:1521 ::ffff:127.0.0.1:33072 ESTABLISHED 2512/tnslsnr
unix 2 [ ACC ] STREAM LISTENING 18089 2512/tnslsnr /var/tmp/.oracle/s#2512.1
unix 2 [ ACC ] STREAM LISTENING 18091 2512/tnslsnr /var/tmp/.oracle/sEXTPROC1521
unix 2 [ ACC ] STREAM LISTENING 18093 2512/tnslsnr /var/tmp/.oracle/s#2512.2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-1249897/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- JAVA FTP客戶端問題JavaFTP客戶端
- MySQL客戶端中文亂碼問題。MySql客戶端
- xfire 客戶端呼叫webservice的問題客戶端Web
- TSM客戶端的排程問題客戶端
- Mac下SVN客戶端CornerStone使用問題Mac客戶端
- oracle客戶端同sap衝突的問題Oracle客戶端
- 客戶端TNSPING通 連線出現ORA-12514錯誤客戶端
- 客戶端安裝虛擬機器問題解答?客戶端虛擬機
- WebSphere客戶端遷移的一般問題Web客戶端
- 遠端客戶端 訪問 ASM 例項客戶端ASM
- MQTT 客戶端應用及常見問題(C#)MQQT客戶端C#
- wsus客戶端安裝時的許可權問題客戶端
- Nginx配置ssl_client_certificate客戶端認證問題Nginxclient客戶端
- 客戶端(windows)訪問FTP伺服器遇到的問題(總結)客戶端WindowsFTP伺服器
- 客戶端無法連線資料庫的小問題客戶端資料庫
- WebSphere客戶端遷移的常見問題解決二Web客戶端
- 客戶端爬取-答網友問客戶端
- 客戶端訪問POP3--SMTP客戶端
- dubbo客戶端客戶端
- Pulsar客戶端客戶端
- mqtt 客戶端MQQT客戶端
- 客戶端,服務端客戶端服務端
- 服務端,客戶端服務端客戶端
- Nacos - 客戶端心跳續約及客戶端總結客戶端
- 記一次eureka客戶端註冊失敗的問題客戶端
- 客戶端無法同步時間伺服器問題處理客戶端伺服器
- 虛擬平臺客戶端無法登陸問題記錄客戶端
- mysqldump資料匯出問題和客戶端授權後連線失敗問題MySql客戶端
- Docker部署mysql並提供客戶端訪問DockerMySql客戶端
- 客戶端 post ,get 訪問伺服器客戶端伺服器
- Hexo多客戶端同步問題Hexo客戶端
- 物理DataGuard客戶端無縫切換--客戶端TAF 配置客戶端
- 客戶端加解密客戶端解密
- Zookeeper 客戶端 API客戶端API
- java websocket 客戶端JavaWeb客戶端
- 客戶端筆記客戶端筆記
- Redis-客戶端Redis客戶端
- redis客戶端管理Redis客戶端