`
SnailWong
  • 浏览: 183970 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

ORA-12157: TNS:internal network communication error

 
阅读更多

 

ORA-12157: TNS:internal network communication error

 

分三种情况:

 

安装时

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 11.1.0.99
This problem can occur on any platform.
Although this problem was first identified on x86 and x86_64 Linux, it is a generic potential issue when the TMPDIR variable is incorrectly set.

Symptoms

Immediately following my 10.2.0.1 install onto RHEL 4 u3 x86_64 (“default-RPMs”), when the
DBCA starts to create the initial DB, the following error pops up:

ORA-12157: TNS:internal network communication error

Changes

First attempted use of the DBCA tool, whether manually, or by "install-requested" automatic instance creation.

Cause

You have the environment variable TMPDIR set to a directory that does not exist.

Solution

Ensure that the TMP and TMPDIR environment variables are set to a valid file system with at
least 400 MB of writable free space.

 

 

一言以蔽之:检查环境变量TMPTMPDIR正确设置,并且目录下有足够的空间

 

 

尝试加载服务时

RHEL5无法ping 本地所有接口处理

前两天一台测试机器出了问题,系统为redhat 5.2AP,安装完oracle后发现监听起不来,处理过程记录如下:

Symptoms

 [root@btsweb ~]# su - oracle

[oracle@btsweb ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 25 21:07:46 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

ERROR:

ORA-12157: TNS:internal network communication error

Enter user-name:

Cause

1  listerner.ora从其他机器复制,编辑得来,不会有错;

2  提示network communication error。应该是网络问题;通过ora-12157查也是网络问题导致。

进一步分析:

Ping [hostname]无法ping通;

Ping 127.0.0.1无法ping通;

Ping [eth0_ip]无法ping通;

处理步骤1

至此,首先想到的是iptables引起的问题。

Service iptables status

Service ip6tables status

发现防火墙都开着了。关闭之,同时在设置开机不启动iptables

Service iptables stop

Service ip6tables stop

Chkconfig iptable off

Chkconfig ip6tables off

验证ping是否正常,此时,发现仍无法ping通本机(localhost 127.0.0.1)。

处理步骤2

Ifconfig –a

发现有一虚拟网卡virbr0存在,关闭虚拟网卡相应的服务

 service libvirt stop

验证ping是否正常,此时,发现仍无法ping通本机(localhost 127.0.0.1)。

删除libvirt相关包;

Yum erase libvirt

验证libvirt删除情况:

Rp m –qa libvirt

[root@btsweb network-scripts]# rpm -q libvirt

package libvirt is not installed

处理步骤3

reboot机器后,ifconfig –a发现

[root@btsweb ~]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:1F:D0:92:DB:73

          inet addr:220.178.10.35  Bcast:220.178.10.47  Mask:255.255.255.240

          inet6 addr: fe80::21f:d0ff:fe92:db73/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:124 errors:0 dropped:29034178756 overruns:0 frame:0

          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:16600 (16.2 KiB)  TX bytes:15460 (15.0 KiB)

          Interrupt:177 Base address:0xc000

 

lo        Link encap:Local Loopback

          LOOPBACK  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

 

sit0      Link encap:IPv6-in-IPv4

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

禁用IPV6

1.       使用vi编辑器,打开/etc/modprobe.conf
2.
在文档中加入如下的两条:
alias net-pf-10 off
alias ipv6 off

关闭selinux

Vi /etc/selinux/config

设置

[root@btsweb ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#       enforcing - SELinux security policy is enforced.

#       permissive - SELinux prints warnings instead of enforcing.

#       disabled - SELinux is fully disabled.

SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:

#       targeted - Only targeted network daemons are protected.

#       strict - Full SELinux protection.

经验证发现和selinux的配置没有关系。

处理步骤4

步骤3中发现lo接口没有IP地址。检查其配置文件,

/etc/sysconfig/network-script下看到配置文件为ifcfg-lo_bak而不是ifcfg-lo,将该文件重命名后问题解决。

未重命名之前,需手动ifconfig lo up方可启用Lo接口。因配置文件名为ifcfg-lo_bak,但内部为device=lo

分析结果:配置文件名和配置文件中的device名和对应不上,导致lo接口无法启用,启用后无法ping通过本地地址。

 

尝试用客户端连接时

Symptoms

 

Every attempt to login locally to any database (using "sqlplus '/ as sysdba'") fails with the following error :
ORA-12157: TNS:internal network communication error

 

Solution

 

Check to make sure the address you are trying to bind to exists on the local machine. This check should be done via   "ifconfig lo" or  "ip addr"    commands, because there are situations when an IP address is invalid although the /etc/hosts file shows the correct  settings.  Ask the system engineers to redefine the loopback address back to 127.0.0.1 in case it was changed.

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics