PosixSocketMuxer: unexpected exception in poll: (22) Invalid argument异常

本文分析了WebLogic服务器出现的频繁异常问题,包括PosixSocketMuxer异常及too many open files错误,并提供了通过调整Linux系统文件描述符限制来解决问题的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:

在一次WebLogic宕机日志中发现大量的异常:

PosixSocketMuxer: unexpected exception in poll: (22) Invalid argument

<2016-5-5 下午07时40分51秒 CST> <Error> <Socket> <BEA-000421> <Uncaught Throwable in processSockets
 java.io.IOException: unexpected exception in poll: (22) Invalid argument.
java.io.IOException: unexpected exception in poll: (22) Invalid argument
    at weblogic.socket.PosixSocketMuxer.poll(Native Method)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:102)
    at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    Truncated. see log file for complete stacktrace
>


随后系统宕机:

*** glibc detected *** /home/weblogic/jdk1.6.0_45/bin/java: munmap_chunk(): invalid pointer: 0x00000007aeaad700 ***
/home/weblogic/Oracle/Middleware/user_projects/domains/jk-sgpms-server/bin/startWebLogic.sh: line 180: 21210 已放弃               (core dumped) ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}

在一台机器上发现:too many open files错误:

<2016-5-5 下午07时40分19秒 CST> <Critical> <Server> <BEA-002616> <Failed to listen on channel "Default" on 10.137.254.186:17005, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>

可能的错误原因:

WebLogic使用本地IO,文件描述符(或文件句柄)数量不足。

解决:

增加打开文件句柄的句柄数。

在Linux操作系统设定nofile和nproc,具体编辑/etc/security/limits.conf文件,增加soft和hard nofile值:

  1. soft    nofile          2048  
  2. hard    nofile          8192 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值