请选择 进入手机版 | 继续访问电脑版

Oracle数据库出错ORA-27303,客户端无法连接!

[复制链接]
滚雪球少年 发表于 2021-1-2 12:12:11 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
文章目次



现象

安装了我们公司的产物后客户的数据库突然出现客户端无法毗连。查抄错误日志出现了大量的ORA-27300错误,下面是出现第一次ORA-27300的记载。
  1. Thu Dec 31 15:49:14 2020Archived Log entry 1248193 added for thread 1 sequence 1248219 ID 0x348d2cd1 dest 1:Thu Dec 31 15:49:39 2020Errors in file /odata/oracle/app/diag/rdbms/wind/WIND/trace/WIND_j000_125990.trc:ORA-27140: attach to post/wait facility failedORA-27300: OS system dependent operation:invalid_egid failed with status: 1ORA-27301: OS failure message: Operation not permittedORA-27302: failure occurred at: skgpwinit6ORA-27303: additional information: startup egid = 1000 (dba), current egid = 1001 (oinstall)Thu Dec 31 15:49:40 2020
复制代码
查抄red hat 7的系统日志:
  1. Dec 31 15:40:01 db1-gss systemd: Starting Session 63477 of user root.Dec 31 15:49:20 db1-gss systemd: Reloading.Dec 31 15:49:20 db1-gss systemd-sysv-generator[125498]: Configuration file /usr/lib/systemd/system/dbackup3-agent.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.Dec 31 15:49:20 db1-gss systemd: Configuration file /usr/lib/systemd/system/dbackup3-agent.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.Dec 31 15:49:20 db1-gss systemd: Configuration file /usr/lib/systemd/system/dbackup3-agent.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.Dec 31 15:49:20 db1-gss systemd: Reloading.Dec 31 15:49:20 db1-gss systemd-sysv-generator[125515]: Configuration file /usr/lib/systemd/system/dbackup3-agent.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.Dec 31 15:49:20 db1-gss systemd: Configuration file /usr/lib/systemd/system/dbackup3-agent.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.Dec 31 15:49:20 db1-gss systemd: Configuration file /usr/lib/systemd/system/dbackup3-agent.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.Dec 31 15:49:20 db1-gss systemd: Started dbackup3 agent daemon.Dec 31 15:49:20 db1-gss systemd: Starting dbackup3 agent daemon...Dec 31 15:49:21 db1-gss systemd: Stopping dbackup3 agent daemon...Dec 31 15:49:21 db1-gss systemd: Started dbackup3 agent daemon.
复制代码
数据库错误日志中的其他信息:
  1. : OS failure message: Operation not permittedORA-27302: failure occurred at: skgpwinit6ORA-27303: additional information: startup egid = 1000 (dba), current egid = 1001 (oinstall)Process J000 died, see its trace fileThu Dec 31 16:36:55 2020kkjcre1p: unable to spawn jobq slave processThu Dec 31 16:36:55 2020Errors in file :Thu Dec 31 16:36:56 2020Errors in file /odata/oracle/app/diag/rdbms/wind/WIND/trace/WIND_j000_348517.trc:ORA-27140: attach to post/wait facility failedORA-27300: OS system dependent operation:invalid_egid failed with status: 1ORA-27301: OS failure message: Operation not permittedORA-27302: failure occurred at: skgpwinit6ORA-27303: additional information: startup egid = 1000 (dba), current egid = 1001 (oinstall)Process J000 died, see its trace fileThu Dec 31 16:36:57 2020
复制代码
trace文件中的信息:
  1. Trace file /odata/oracle/app/diag/rdbms/wind/WIND/trace/WIND_j000_348517.trcOracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsORACLE_HOME = /odata/oracle/app/oracle/product/12.1.0/dbhome_1System name:    LinuxNode name:      db1-gssRelease:        3.10.0-693.el7.x86_64Version:        #1 SMP Thu Jul 6 19:56:57 EDT 2017Machine:        x86_64Instance name: WINDRedo thread mounted by this instance: 1Oracle process number: 0Unix process pid: 348517, image:*** 2020-12-31 16:36:56.427Unexpected error 27140 in job slave processORA-27140: attach to post/wait facility failedORA-27300: OS system dependent operation:invalid_egid failed with status: 1ORA-27301: OS failure message: Operation not permittedORA-27302: failure occurred at: skgpwinit6ORA-27303: additional information: startup egid = 1000 (dba), current egid = 1001 (oinstall)
复制代码
分析

从现象上看,客户的数据库正好是我们的产物第一次安装的时候了问题,所以客户猜疑是我们的软件问题。从数据库系统的日志看数据库上次启动时间是Thu Mar 05 22:27:32 2020,已经9个月没有启动了。
从trace记载内里分析,oracle历程9个月前启动的时候egid(有效组id)是1000 (dba),当前是1001 (oinstall)。
查抄oracle执行文件的属性
  1. [oracle@db1-gss trace]$ ls -l /odata/oracle/app/oracle/product/12.1.0/dbhome_1/bin/oracle-rwsr-s--x. 1 oracle oinstall 323649840 Dec 27  2019 /odata/oracle/app/oracle/product/12.1.0/dbhome_1/bin/oracl
复制代码
发现组是oinstall。
再查抄正在运行的oracle历程,发现组号是1000
  1. [root@db1-gss ~]# ps -eo pid,stat,pri,uid,gid,cmd |grep oracle 56474 Ss    19  1000  1000 oracleWIND (LOCAL=NO) 72953 S     19     0     0 su - oracle 97310 S+    19     0     0 grep --color=auto oracle198434 Ss    19  1000  1000 oracleWIND (LOCAL=NO)198452 Ss    19  1000  1000 oracleWIND (LOCAL=NO)311705 Ss    19  1000  1000 oracleWIND (LOCAL=NO)313106 Ssl   19  1000  1000 /odata/oracle/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr LISTENER -inherit313475 Ss    19  1000  1000 oracleWIND (LOCAL=NO)327504 Ss    19  1000  1000 oracleWIND (LOCAL=NO)327637 Ss    19  1000  1000 oracleWIND (LOCAL=NO)331933 Ss    19  1000  1000 oracleWIND (LOCAL=NO)338102 Ss    19  1000  1000 oracleWIND (LOCAL=NO)
复制代码
查抄oracle用户,主组是1000(dba)
  1. # id oracleuid=1000(oracle) gid=1000(dba) groups=1000(dba),1001(oinstall)[root@db1-gss ~]#
复制代码
结论

文件系统内里的oracle执行步伐的组是oinstall,而oracle用户的组是dba,因此当我们软件安装的时候需要产生一个从历程(spawn jobq slave process)是dba,和之前的历程组oinstall差别,造成辩说
管理过程

关闭数据库,将oracle用户的主组从dba改成oinstall,
  1. [root@oracle18 orcl]# id oracleuid=54321(oracle) gid=54322(dba) groups=54322(dba),54321(oinstall),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)[root@oracle18 orcl]# usermod -g  oinstall oracle[root@oracle18 orcl]# id oracleuid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)[root@oracle18 orcl]#
复制代码
效果关构造不了
  1. SQL> shutdown immediate;ERROR:ORA-27140: attach to post/wait facility failedORA-27300: OS system dependent operation:invalid_egid failed with status: 1ORA-27301: OS failure message: Operation not permittedORA-27302: failure occurred at: skgpwinit6ORA-27303: additional information: startup egid = 1000 (dba), current egid =1001 (oinstall)
复制代码
效果关构造不了,修改用户和oracle执行文件的属主成错误的组号后才关数据库。
再把组号改成正确的,再启动数据库,乐成!
完成后客户毗连不进来,原来监听的历程也是同样的问题,组号不对,重新启动后管理。
回首

又是帮客户背锅,他们修改了组id,自己不知道,我们的产物启动了一次从历程就袒露了!
                                                                    
                                                姚远ACE                                           
                CSDN认证博客专家                                        ACE                华为云 MVP                            Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;得到过两次国家部级科技进步奖;发明过两项盘算机专利。微信 yao_scott
来源:https://blog.csdn.net/weixin_43424368/article/details/112028699
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题

专注素材教程免费分享
全国免费热线电话

18768367769

周一至周日9:00-23:00

反馈建议

27428564@qq.com 在线QQ咨询

扫描二维码关注我们

Powered by Discuz! X3.4© 2001-2013 Comsenz Inc.( 蜀ICP备2021001884号-1 )