Linux问题备忘录

 

1. ssh无法正常访问

1.1 错误信息

-bash: fork: retry: Resource temporarily unavailable

 

1.2 解决办法

# ulimit -u 10000

 

2. ssh无法登陆

2.1 错误信息

# su otheruser
su: cannot set user id: Resource temporarily unavailable

 

2.2 问题查找

# lsof | grep otheruser

2.3异常信息

java      22452   otheruser  206u     IPv6           66845952        0t0        TCP localhost:35068->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  207u     IPv6           66845953        0t0        TCP localhost:35069->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  208u     IPv6           66845954        0t0        TCP localhost:35070->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  209u     IPv6           66845955        0t0        TCP localhost:35071->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  210u     IPv6           66845956        0t0        TCP localhost:35072->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  211u     IPv6           66845957        0t0        TCP localhost:35073->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  212u     IPv6           66845958        0t0        TCP localhost:35074->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  213u     IPv6           66845959        0t0        TCP localhost:35075->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  214u     IPv6           66845977        0t0        TCP localhost:35078->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  215u     IPv6           66845979        0t0        TCP localhost:35079->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  216u     IPv6           66845980        0t0        TCP localhost:35080->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  217u     IPv6           66845981        0t0        TCP localhost:35081->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  218u     IPv6           66845982        0t0        TCP localhost:35082->42.120.181.22:http (CLOSE_WAIT)
java      22452   otheruser  219u     IPv6           66845986        0t0        TCP localhost:35083->42.120.181.22:http (CLOSE_WAIT)

 2.4 临时解决

#kill -9 22452

 2.5 解决办法

 2.5.1 打开文件

# vi /etc/security/limits.conf

 2.5.2 添加内容

* soft nofile 4096
* hard nofile 4096

 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值