描述
新安装的系统,在装完11.2.0.1.0数据库后。关机再重启,数据库进不去。报如下错误。
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=bogon)(PORT=1521))'
解决办法修改LOCAL_LISTENER参数值,bogon换成能解析的主机名.如localhost.或修改系统配置能够解析bogon,此解决方法见参考资料第二个url地址。
环境
OS
[oracle@bogon ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[oracle@bogon ~]$ uname -a
Linux bogon 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
[oracle@bogon ~]$
DB
11.2.0.1.0
结构
ORACLE_SID=odi
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
alert日志位置 /u01/app/oracle/diag/rdbms/odi/odi/trace/alert_odi.log
步骤
新安装的系统,未做任何设置,直接安装数据库。安装好数据库后,将系统重启,再启动数据库时报 ORA-00119 ORA-00130错误。 结果如下:
[oracle@bogon dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 31 14:54:36 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=bogon)(PORT=1521))'
SQL>
查看alert日志内容
Tue Jan 31 14:55:22 2012
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Autotune of undo retention is turned on.
IMODE=BR
ILAT =84
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side pfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initodi.ora
System parameters with non-default values:
processes = 500
memory_target = 812M
control_files = "/u01/app/oracle/oradata/odi/control01.ctl"
control_files = "/u01/app/oracle/oradata/odi/control02.ctl"
db_block_size = 8192
compatible = "11.2.0.0.0"
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
audit_file_dest = "/u01/app/oracle/admin/odi/adump"
audit_trail = "DB"
db_name = "odi"
open_cursors = 800
query_rewrite_enabled = "TRUE"
query_rewrite_integrity = "TRUSTED"
diagnostic_dest = "/u01/app/oracle"
Tue Jan 31 14:55:33 2012
USER (ospid: 6418): terminating the instance due to error 119
Instance terminated by USER, pid = 6418
查看alert日志中说明的数据库启动时使用的pfile
[oracle@bogon ~]$ cat /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initodi.ora
odi.__db_cache_size=150994944
odi.__java_pool_size=58720256
odi.__large_pool_size=4194304
odi.__oracle_base='/u01/app/oracle'
odi.__pga_aggregate_target=297795584
odi.__sga_target=553648128
odi.__shared_io_pool_size=0
odi.__shared_pool_size=331350016
odi.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/odi/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/odi/control01.ctl','/u01/app/oracle/oradata/odi/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='odi'
*.diagnostic_dest='/u01/app/oracle'
*.memory_target=848297984
*.open_cursors=800
*.processes=500
*.query_rewrite_enabled='TRUE'
*.query_rewrite_integrity='TRUSTED'
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
[oracle@bogon ~]$
可见pfile中并未对LOCAL_LISTENER这一参数进行设置,但数据库启动是这个参数是在哪里定义的不得而知。折腾了一会儿,寻找数据库启动时的参数,没有结果。翻过头仔细查看错误说明
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=bogon)(PORT=1521))'
ora 00130中提示说 LOCAL_LISTENER的参数值设置不正确。对着此值发呆半天,意识到很可能是HOST=bogon这里出了问题。虽然bash的提示符显示的 [oracle@bogon ~]$ 中似乎bogon是主机名,但是真正去解析bogon这个主机时却找不到。
[oracle@bogon ~]$ ping bogon
ping: unknown host bogon
[oracle@bogon ~]$
于是向数据库pfile参数文件中添加一行 LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' 明确告诉数据库启动时 LOCAL_LISTENER参数使用 '(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))'此值。 数据库正常启动。
[oracle@bogon ~]$ cat /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initodi.ora
odi.__db_cache_size=150994944
odi.__java_pool_size=58720256
odi.__large_pool_size=4194304
odi.__oracle_base='/u01/app/oracle'
odi.__pga_aggregate_target=297795584
odi.__sga_target=553648128
odi.__shared_io_pool_size=0
odi.__shared_pool_size=331350016
odi.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/odi/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/odi/control01.ctl','/u01/app/oracle/oradata/odi/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='odi'
*.diagnostic_dest='/u01/app/oracle'
*.memory_target=848297984
*.open_cursors=800
*.processes=500
*.query_rewrite_enabled='TRUE'
*.query_rewrite_integrity='TRUSTED'
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))'
[oracle@bogon ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 31 15:33:19 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 692063824 bytes
Database Buffers 150994944 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
SQL>
个人总结
[root@bogon ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
[root@bogon ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29:96:f3:4a
ONBOOT=yes
[root@localhost ~]#
关于bogon曾经有过注意,但没太注意。这次补一下,从网络搜到的
网络技术中bogon是什么?
Derived from the slang term of bogus (non-existent or fake),
in Internet terminology the the term bogon is often used to describe a bogus IP address;
or more specifically, the use of an address or a route object that is not properly authorized by the entity to which the address, or resource, was originally assigned.
Bogon filtering
A bogon is an informal name for an IP packet on the public Internet that claims to be from an area of the IPaddress space reserved, but not yet allocated or delegated by the Internet Assigned Numbers Authority (IANA) or a delegated Internet registry. The areas of unallocated address space are called "bogon space".
Many ISPs and end user firewalls filter bogons, because they have no legitimate use, and are therefore the result of accidental or malicious misconfiguration at the sender. Bogons can be filtered by using router ACLs, or byBGP blackholing.
However, as IANA and other registries continue to allocate more of the IP address space, bogon filter lists need to be kept up to date, as otherwise newly legitimate areas of address space will be filtered.
后面文档作者给了一个解释 :I think that bogon is “DNS解析不出来的ip的主机名” 。
由于出问题环境中 /etc/hosts 跟/etc/resolv.conf 里面配置的内容都无法解析出本机除lo外的ip。所以就给分配了bogon这么一个主机名。看/etc/sysconfig/network中的hostname的值添写的是主机域名localhost.localdomain 网卡配置文件ifcfg-eth0 中又为dhcp自动获取IP.所以机器的主机名是由上层ISP分配的.本机的IP地址没有办法在上DNS中解析到,所以就给分配了bogon这个主机名.
--转自
该贴由koei123转至本版2015-2-6 4:47:19