Oracle Linux 7 and Redhat Linux 7: /var/tmp/.oracle下面的socket文件被删除(Doc ID 2455193.1)

Oracle Linux 7 and Redhat Linux 7: The socket files in /var/tmp/.oracle Location Get Deleted (Doc ID 2455193.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Linux x86-64

SYMPTOMS

On Redhat Linux 7 and Oracle Linux 7, the socket files in /var/tmp/.oracle location mysteriously get deleted.

CAUSE

Both Oracle Linux 7 and Redhat Linux 7 have a kernel service systemd-tmpfiles-clean.service that is managed by systemd and deletes the files in the temp location.   Oracle Linux 7和Redhat Linux 7都具有内核服务systemd-tmpfiles-clean.service,该服务由systemd管理,并删除临时位置中的文件。

The above service removes

  1. files/directories in /tmp/ un-accessed more than 10 days(defined in tmp.conf)  /tmp/中的文件/目录超过10天未访问(在tmp.conf中定义)
  2. files/directories in /var/tmp/ un-accessed more than 30 days(defined in tmp.conf)  /var/tmp/中的文件/目录超过30天未访问(在tmp.conf中定义)

The "un-accessed" is decided by checking all of atime/mtime/ctime of the file/directory.  通过检查文件/目录的所有atime/mtime/ctime来确定"un-accessed"。

atime/mtime/ctime的获取方法参考文章:https://blog.csdn.net/u010692693/article/details/103182285

SOLUTION

Exclude the socket files from getting deleted by the kernel service systemd-tmpfiles-clean.service  在内核服务systemd-tmpfiles-clean.service的删除策略中排除socket文件

To exclude the socket files in a tmp directory from getting deleted by the tempfile clean service, change the content of /usr/lib/tmpfiles.d/tmp.conf and add  要排除tempfile clean服务删除tmp目录中的socket文件,请更改/usr/lib/tmpfiles.d/tmp.conf的内容,并添加
x /tmp/.oracle*
x /var/tmp/.oracle*
x /usr/tmp/.oracle*

The "x" option above indicates to the systemd-tmpfiles-clean.service to exclude files in the listed directory.   上面的"x"选项指示systemd-tmpfiles-clean.service排除列出目录中的文件。

Note: The directory /var/tmp/.oracle contains a number of "special" socket files that are used by local clients to connect via the IPC protocol (sqlnet) to various Oracle processes including the TNS listener, the CSS, CRS & EVM daemons or even database or ASM instances. The symptoms as per Doc ID 391790.1 results when socket files are removed while Clusterware is running   注意:目录/var/tmp/.oracle包含许多"special" socket文件,本地客户端使用这些socket文件通过IPC协议(sqlnet)连接到各种Oracle进程,包括TNS侦听器,CSS,CRS和EVM守护程序,甚至数据库或ASM实例。在Clusterware运行时删除socket文件时  ,会出现Doc ID 391790.1的症状

REFERENCES

NOTE:391790.1 - Unable To Connect To Cluster Manager Ora-29701 as Network Socket Files are Removed

https://developers.redhat.com/blog/2016/09/20/managing-temporary-files-with-systemd-tmpfiles-on-rhel7/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值