关于listener无法启动的问题解决

今天照例开始学习oracle,实例启动了,但是listener却突然很奇怪,怎么都起不来。

我检查了下listener配置,网络配置,ssh服务,一切都正常,最后看防火墙开着,关了以后,问题还是照旧。

[oracle@oel log]$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 02-MAY-2013 12:11:38
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
sWelcome to LSNRCTL, type "help" for information.
LSNRCTL> tatus
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
start
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
LSNRCTL> Starting /u01/app/ora10g/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/ora10g/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521)))
Error listening on: (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted
Listener failed to start. See the error message(s) above...

最后各处查找,总算找到了问题根源。在 /var/tmp下的 .oracle权限有问题

[root@oel tmp]# ll -a
total 24
drwxrwxrwt  4 root   root 4096 May  2 12:10 .
drwxr-xr-x 24 root   root 4096 Jun 16  2012 ..
drwxrwxrwt  2 root   root 4096 May  2 12:11 .oracle
drwx------  2 oracle dba  4096 May  1 12:36 yum-oracle-n3UNcY
[root@oel tmp]# cd .oracle
[root@oel .oracle]# ll
total 0
srwxrwxrwx 1 oracle dba 0 Apr  1 16:44 s#16480.1
srwxrwxrwx 1 oracle dba 0 Apr  1 16:44 s#16480.2
srwxrwxrwx 1 ora11g dba 0 Apr 21 16:59 s#2171.1
srwxrwxrwx 1 ora11g dba 0 Apr 21 16:59 s#2171.2
srwxrwxrwx 1 ora11g dba 0 Apr 21 16:59 sPNPKEY
[root@oel .oracle]# 

改正一下,应该是上次启动的时候用root来启动,之后再用oracle用户就启动不了了。

[root@oel tmp]# chown oracle:dba .oracle
[root@oel tmp]# ll
total 4
drwx------ 2 oracle dba 4096 May  1 12:36 yum-oracle-n3UNcY
[root@oel tmp]# ll -a
total 24
drwxrwxrwt  4 root   root 4096 May  2 12:10 .
drwxr-xr-x 24 root   root 4096 Jun 16  2012 ..
drwxrwxrwt  2 oracle dba  4096 May  2 12:11 .oracle
drwx------  2 oracle dba  4096 May  1 12:36 yum-oracle-n3UNcY

修改以后,再启动一次试试。成功了。

LSNRCTL> status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
startTNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
LSNRCTL> 
Starting /u01/app/ora10g/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/ora10g/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                02-MAY-2013 12:15:07
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/ora10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Services Summary...
Service "CUST01" has 1 instance(s).
  Instance "CUST01", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> 

原文发布于微信公众号 - 杨建荣的学习笔记(jianrong-notes)

原文发表时间:2014-03-11

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏杨建荣的学习笔记

oracle共享服务器配置汇总(53天)

oracle共享服务器配置汇总 对于共享服务器的配置进行了汇总,也发现一些隐藏的错误 方式一,多种监听(专用连接有专有连接的监听,共享服务有共享服务的监听) 方...

2273
来自专栏运维

CentOS6.3 x86_64位安装xfce4桌面vncserver服务

CentOS6.3 x86_64位安装xfce4桌面vncserver服务 注意这里用的是最小化安装纯净系统212个包CentOS-6.3-x86_64-...

1161
来自专栏java系列博客

curl的安装与简单使用

2675
来自专栏后端之路

SpringBoot实现Mybatis多数据源方案

背景 目前报表导出需要多数据库的数据,因此我们需要做Mybatis多数据源的配置 我们之前使用Spring的AbstractRoutingDataSource ...

8397
来自专栏Hadoop实操

Yarn的JobHistory目录权限问题导致MapReduce作业异常

0: jdbc:hive2://localhost:10000>select count(*) from student;

1.1K7
来自专栏10km的专栏

cmake:vs2015/MinGW静态编译leveldb

leveldb是google的开源项目(https://github.com/google/leveldb), 在linux下编译很方便,然而官方版本却没有提供...

4856
来自专栏linux驱动个人学习

高通 sensor 从native到HAL

前几篇sensor相关的文章介绍了sensor的hal的知识,以press_sensor实时显示气压坐标来分析,app层数据获取的过程,其实实现数据监控非常简单...

2822
来自专栏Kubernetes

Controlling Access to the Kubernetes API

? API Server Ports and IPs By default the Kubernetes API server serves HTTP o...

2778
来自专栏cmazxiaoma的架构师之路

VMware WorkStation的烦心事

1552
来自专栏数据和云

偷梁换柱 | 无备份情况下的数据恢复实践

在实际环境中,许多数据库环境并没有做好完整的数据备份恢复计划及容灾方案,无法保证数据安全,并且出现一些灾难性的错误。那么我们就面临这样的问题:在什么样的最极端情...

3195

扫码关注云+社区