nofile這個關(guān)鍵字很重要,查看下nofile這個參數(shù)設(shè)置

vi? ?/etc/security/limits.conf

* soft nofile 102400
* hard nofile 102400
* soft nofile 102400
* hard nofile 102400

然后查看下 nr_open

cat /proc/sys/fs/nr_open

100000

這個值小于hard nofile正常情況是無法這樣設(shè)置的,查看vi /etc/sysctl.conf

修改fs.nr_open大于或等于hard nofile重啟后OK (也可以sysctl -w fs.nr_open=100000000)

PS:單用戶模式輸入exec /sbin/init退出單用戶模式

問題解決:sysctl 設(shè)置 fs.nr_open 大于等于 /etc/security/limits.conf 的 hard nofile

 

 

贊(4)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享網(wǎng)絡(luò)內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-62778877-8306;郵箱:fanjiao@west.cn。本站原創(chuàng)內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明出處:西部數(shù)碼知識庫 » hard nofile參數(shù)設(shè)置引起的無法ssh連接問題(涉及另一個參數(shù)fs.nr_open)

登錄

找回密碼

注冊