系統引數nofile設定不生效問題
1.直接登陸Oracle使用者如下報錯,從一下報錯資訊可以得知,open file修改沒有許可權,也就是nofile引數設定有問題
正在進行認證,請稍後 ...... Using username "oracle". Last login: Wed Mar 9 09:25:23 2022 from xx.xx.xx.xx stty erase ^H -bash: ulimit: open files: cannot modify limit: Operation not permitted [oracle@xxx~]$ ulimit -u -n max user processes (-u) 65536 open files (-n) 1024
2.從以上報錯馬上想到可能是/etc/profile中設定的引數要比/etc/security/limits.conf引數檔案中設定的要大導致的報錯
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi
grid soft nproc 65536 grid hard nproc 65536 grid soft nofile 65536 grid hard nofile 65536 grid soft stcak 10240 grid hard stcak 10240 oracle soft nproc 65536 oracle hard nproc 65536 oracle soft nofile 65536 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 10240 oracle soft memlock -1 oracle hard memlock -1 grid soft memlock -1 grid hard memlock -1
切換到oracle使用者檢視資源限制,這裡發現引數設定正常,那麼為什麼會出現此類問題呢?
這裡是因為UsePam引數未開啟,導致的問題
[root@xxx~]# su - oracle [oracle@xxx~]$ ulimit -u -n max user processes (-u) 65536 open files (-n) 65536
3.問題解決
修改/etc/ssh/sshd_config配置檔案中,我們需要體新增如下配置.
UsePAM yes
重啟sshd服務
--此時發現瞭如下報錯,提示不支援UsePam,這裡是因為沒有安裝openssh,重新安裝即可
[root@xxx~]# service sshd restart Stopping sshd: [ OK ] Starting sshd:/etc/ssh/sshd_config line 82: Unsupported option UsePAM [ OK ]
安裝openssh並重啟sshd服務
[root@xxx~]# rpm -qa | grep openssh [root@xxx~]# yum -y install openssh-server Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Install Process Determining fastest mirrors base | 2.9 kB 00:00 epel | 2.9 kB 00:00 epel/primary_db | 6.0 MB 00:00 extras | 2.9 kB 00:00 extras/primary_db | 27 kB 00:00 updates | 2.9 kB 00:00 updates/primary_db | 967 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package openssh-server.x86_64 0:5.3p1-124.el6_10 will be installed --> Processing Dependency: openssh = 5.3p1-124.el6_10 for package: openssh-server-5.3p1-124.el6_10.x86_64 --> Running transaction check ---> Package openssh.x86_64 0:5.3p1-124.el6_10 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================================== Installing: openssh-server x86_64 5.3p1-124.el6_10 updates 330 k Installing for dependencies: openssh x86_64 5.3p1-124.el6_10 updates 278 k Transaction Summary =================================================================================================================================================================== Install 2 Package(s) Total download size: 607 k Installed size: 1.4 M Downloading Packages: (1/2): openssh-5.3p1-124.el6_10.x86_64.rpm | 278 kB 00:00 (2/2): openssh-server-5.3p1-124.el6_10.x86_64.rpm | 330 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.5 MB/s | 607 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows: python-meh-0.12.1-3.el6.noarch has missing requires of openssh-clients Installing : openssh-5.3p1-124.el6_10.x86_64 1/2 warning: /etc/ssh/moduli created as /etc/ssh/moduli.rpmnew Installing : openssh-server-5.3p1-124.el6_10.x86_64 2/2 warning: /etc/ssh/sshd_config created as /etc/ssh/sshd_config.rpmnew Verifying : openssh-5.3p1-124.el6_10.x86_64 1/2 Verifying : openssh-server-5.3p1-124.el6_10.x86_64 2/2 Installed: openssh-server.x86_64 0:5.3p1-124.el6_10 Dependency Installed: openssh.x86_64 0:5.3p1-124.el6_10 Complete! [root@hrdb2 ~]# service sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31462978/viewspace-2868490/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP系統引數設定
- SAP 系統引數設定
- SAP 系統引數設定(zt)
- Oracle歸檔引數設定問題Oracle
- Oracle Sequence不設定cache引數的幾個潛在問題Oracle
- Windows系統常用系統引數設定文件Windows
- nofile引數的學習與整理
- 系統核心引數 設定 systemv (ipc)
- 定時任務裡面事務不生效問題
- flutter設定寬高不生效Flutter
- Docker修改/etc/default/docker裡的DOCKER_OPTS引數不生效問題解決Docker
- Mybatis動態傳入order by 引數的時候不生效的問題解決方案MyBatis
- 屏保設定不生效怎麼做?
- 解決 allure.dynamic.parameter 不生效問題 或者 allure 報告中因為引數導致排版的問題
- element UI前端樣式不生效問題UI前端
- shell 在/etc/profile中設定後不生效
- QTableView設定單元格顏色未生效的問題QTView
- docker下mysql連線數修改後不生效問題的解決DockerMySql
- Oracle RAC引數設定優先順序別問題分析Oracle
- vue scoped 解決樣式不生效問題Vue
- element UI 修改原生樣式不生效問題UI
- 記錄@EnumValue註解不生效的問題
- WPF 解決 CommandParameter 引數不更新問題
- 域名解析為什麼不生效?域名解析不生效常見問題彙總
- Docker for Windows 裡的Shared Drives 設定不生效DockerWindows
- win10系統引導怎麼設定_win10設定系統引導的方法Win10
- 由於歸檔路徑設定不當,系統無法響應的問題
- list元件設定flex-direction:row之後,設定的高度不生效元件Flex
- C# Redis 過期機制不生效問題C#Redis
- SGA設定過大造成的系統效能問題
- 解決text-overflow: ellipsis;不生效的問題
- uniapp 使用 picker 的 range-key 不生效問題APP
- 關於動態使用keepAlive不生效的問題
- PLSQL不規範的引數命名導致的問題SQL
- win10系統jdk 1.7環境變數不生效怎麼處理Win10JDK變數
- vsftpd設定引數FTP
- RAC 特定引數設定
- 兩個引數設定