客戶端tnsping不通問題

fei890910發表於2014-08-12
前幾天安裝好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
              

                                                                                                                         

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-1249897/,如需轉載,請註明出處,否則將追究法律責任。

相關文章