lsnrctl start错误

[oracle@Oracle9iDemo ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-DEC-2009 00:31:53

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /u01/oracle/bin/tnslsnr: please wait...

TNS-12537: TNS:connection closed
 TNS-12560: TNS:protocol adapter error
  TNS-00507: Connection closed
   Linux Error: 29: Illegal seek

参阅链接:http://www.blogjava.net/decode360/archive/2009/08/26/292679.html

原因:在hosts文件的语法有错误,也由于tnslsnr进程在10g中得到了增强,通过ONS(Oracle Notification Services,Oracle通知服务)来支持FAN(Fast Application Notification快速应用通知)。这种新的代码在本地主机(localhost)上打开了一个套接字(socket),因此‘localhost’这个字符串应该在系统上被定义。

方法:在/etc/hosts 中加上,完整语法是:127.0.01 localhost.localdomain localhost

[root@Oracle9iDemo etc]# vi hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       Oracle9iDemo    my      first   linux
10.103.2.144    5422D5ABCF9343C Tao

于是我更改为:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       Oracle9iDemo          localhost
10.103.2.144    5422D5ABCF9343C Tao

为了使修改生效,需要完成如下步骤:

明确禁用的10G TNS监听的接受ONS服务,通过编辑listener.ora文件,添加以下参数:

    SUBSCRIBE_FOR_NODE_DOWN_EVENT_=OFF   #listener_name一般默认为listener

于是我随便找个地方把这句话塞了进去,我的listener.ora的地址在oracle_home/network/admin/samples里面,sqlnet.ora, tnsnames.ora也是这样,怎么多出来一个samples文件我也不知道。

[oracle@Oracle9iDemo network]$ cd admin
[oracle@Oracle9iDemo admin]$ ll
total 8
drwxr-x---  2 oracle oinstall 4096 Dec 14 00:47 samples
-rw-r-----  1 oracle oinstall  172 Dec 26  2003 shrept.lst
[oracle@Oracle9iDemo admin]$ ll samples/
total 40
-rw-r-----  1 oracle oinstall  3915 Dec 14 00:47 listener.ora
-rw-r-----  1 oracle oinstall 31023 Sep  9  2003 sqlnet.ora
-rw-r-----  1 oracle oinstall  2939 May 16  2000 tnsnames.ora

再次启动就成功了!
方法适用于任何平台

拓展延伸:

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 28-11月-2009 18:55:00

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

启动/home/oracle/product/11g/db_1/bin/tnslsnr: 请稍候...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
系统参数文件为/home/oracle/product/11g/db_1/network/admin/listener.ora
写入/home/oracle/diag/tnslsnr/Web2/listener/alert/log.xml的日志信息
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Web2.site)(PORT=1521)))
监听该对象时出错: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12555: TNS: 权限被拒绝
 TNS-12560: TNS: 协议适配器错误
  TNS-00525: 无足够权限以执行操作
   Linux Error: 1: Operation not permitted

监听程序未能启动。请参阅上面的错误消息...

解决方法:

/tmp/.oracle的权限 
/var/tmp/.oracle的权限

oracle应该有这些目录的权限,用oinstall 
chown -R  oracle:oinstall /tmp/.oracle 
chown -R  oracle:oinstall /var/tmp/.oracle

注:这篇博文是先看到的,我分别查了我的/tmp/.oracle和/var/tmp/.oracle,发现用户属性、主属性都是root,可能确实是因为和这篇文的作者一样吧,上次卸载时没有卸干净,不然的话可能系统又要报错了!

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

转载于:http://blog.itpub.net/24463783/viewspace-671410/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值