客户端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
              

                                                                                                                                                                                                                                                 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29108064/viewspace-1249897/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29108064/viewspace-1249897/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值