NutzCN Logo
问答 nutzwk运行一段时间就出现Socket accept failed
发布于 240天前 作者 qq_d6c9c504 642 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

运行一段时间,出现如下错误日志之后就不提供服务了,使用不了了,不知道有没有约到过这问题

13-Apr-2018 17:53:18.477 SEVERE [http-nio-8080-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed

	at java.lang.Thread.run(Thread.java:745)
	at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:693)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
 java.io.IOException: Too many open files
13-Apr-2018 17:53:16.876 SEVERE [http-nio-8080-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed

	at java.lang.Thread.run(Thread.java:745)
	at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:693)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
 java.io.IOException: Too many open files
13-Apr-2018 17:53:15.276 SEVERE [http-nio-8080-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed

	at java.lang.Thread.run(Thread.java:745)
	at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:693)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
 java.io.IOException: Too many open files
13-Apr-2018 17:53:13.675 SEVERE [http-nio-8080-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed

	at java.lang.Thread.run(Thread.java:745)
	at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:693)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
	at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
 java.io.IOException: Too many open files
13-Apr-2018 17:53:12.074 SEVERE [http-nio-8080-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed

	at java.lang.Thread.run(Thread.java:745)
	at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:693)
	at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
44 回复

java.io.IOException: Too many open files

百度一下你就知道答案了~~

nutzwk有没有什么地方忘记关闭资源呢?

open file已经很大了

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15087
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 8192
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 15087
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

@qq_d6c9c504 nutzwk有六年商业项目历史,且线上运行的项目有很多:)
1、检查你的项目里新增的代码,特别是文件操作;
2、确定你修改的系统参数已生效(重启试试配置还在么),另外设置为65536看看;
3、换个最新版本tomcat看看;
4、目前贴的东西很难判断问题在哪,nutzwk版本、JDK、tomcat版本、详细日志等等都没有;
5、如果最终定位是nutzwk的问题请发issue;

linux系统下,查出进程id,然后

cd /proc/进程号/fd
ls -a -l

就能看到打开的所有句柄。

另外,提醒一下,ulimit需要在进程启动之前设置

这两天基本上是半天崩溃一次,得重启才可以用。修改已经重启过机器了。现在是当前句柄,但是还没崩溃

[root@iZ2ze6ukmd4cl8b7m5ogx1Z fd]# ls -a -l
总用量 0
dr-x------ 2 root root  0 4月  16 07:26 .
dr-xr-xr-x 9 root root  0 4月  16 07:26 ..
lr-x------ 1 root root 64 4月  16 07:26 0 -> /dev/null
l-wx------ 1 root root 64 4月  16 07:26 1 -> /usr/local/tomcat8/logs/catalina.out
l-wx------ 1 root root 64 4月  16 07:26 10 -> /usr/local/tomcat8/logs/host-manager.2018-04-16.log
lr-x------ 1 root root 64 4月  16 07:26 11 -> /usr/local/tomcat8/lib/catalina-storeconfig.jar
lr-x------ 1 root root 64 4月  16 07:26 118 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/classes/ehcache.xml
lr-x------ 1 root root 64 4月  16 07:26 119 -> /usr/local/Java/jre/lib/charsets.jar
lr-x------ 1 root root 64 4月  16 07:26 12 -> /usr/local/tomcat8/lib/jasper.jar
lr-x------ 1 root root 64 4月  16 07:26 120 -> /usr/local/Java/jre/lib/resources.jar
lrwx------ 1 root root 64 4月  16 07:26 121 -> socket:[2329518]
lrwx------ 1 root root 64 4月  16 07:26 122 -> socket:[2331644]
lrwx------ 1 root root 64 4月  16 07:26 126 -> socket:[2331643]
lr-x------ 1 root root 64 4月  16 07:26 13 -> /usr/local/tomcat8/lib/tomcat-util-scan.jar
lrwx------ 1 root root 64 4月  16 07:26 132 -> socket:[2329526]
lr-x------ 1 root root 64 4月  16 07:26 14 -> /usr/local/tomcat8/lib/websocket-api.jar
lr-x------ 1 root root 64 4月  16 07:26 15 -> /usr/local/tomcat8/lib/tomcat-websocket.jar
lrwx------ 1 root root 64 4月  16 07:49 150 -> socket:[2364233]
lr-x------ 1 root root 64 4月  16 07:26 151 -> /usr/local/Java/jre/lib/ext/localedata.jar
lr-x------ 1 root root 64 4月  16 07:26 153 -> /usr/local/Java/jre/lib/ext/cldrdata.jar
lrwx------ 1 root root 64 4月  16 07:26 154 -> socket:[2365347]
lrwx------ 1 root root 64 4月  16 07:34 155 -> socket:[2365934]
lr-x------ 1 root root 64 4月  16 07:26 156 -> /usr/local/Java/jre/lib/fonts/simsun.ttf
lr-x------ 1 root root 64 4月  16 07:26 157 -> /usr/local/Java/jre/lib/fonts/LucidaBrightDemiBold.ttf
lr-x------ 1 root root 64 4月  16 07:26 158 -> /usr/local/Java/jre/lib/fonts/LucidaTypewriterBold.ttf
lr-x------ 1 root root 64 4月  16 07:26 159 -> /usr/local/Java/jre/lib/fonts/LucidaBrightRegular.ttf
lr-x------ 1 root root 64 4月  16 07:26 16 -> /usr/local/tomcat8/lib/tomcat-dbcp.jar
lr-x------ 1 root root 64 4月  16 07:26 160 -> /usr/local/Java/jre/lib/fonts/LucidaSansRegular.ttf
lr-x------ 1 root root 64 4月  16 07:26 161 -> /usr/local/Java/jre/lib/fonts/LucidaBrightItalic.ttf
lr-x------ 1 root root 64 4月  16 07:26 162 -> /usr/local/Java/jre/lib/fonts/LucidaBrightDemiItalic.ttf
lr-x------ 1 root root 64 4月  16 07:26 163 -> /usr/local/Java/jre/lib/fonts/LucidaSansDemiBold.ttf
lr-x------ 1 root root 64 4月  16 07:26 164 -> /usr/local/Java/jre/lib/fonts/LucidaTypewriterRegular.ttf
lrwx------ 1 root root 64 4月  16 08:18 166 -> socket:[2380883]
lrwx------ 1 root root 64 4月  16 08:19 168 -> socket:[2382722]
lr-x------ 1 root root 64 4月  16 07:26 17 -> /usr/local/tomcat8/lib/annotations-api.jar
lrwx------ 1 root root 64 4月  16 08:19 170 -> socket:[2393397]
lrwx------ 1 root root 64 4月  16 08:39 171 -> socket:[2401835]
lrwx------ 1 root root 64 4月  16 08:55 176 -> socket:[2425052]
lrwx------ 1 root root 64 4月  16 07:26 178 -> socket:[2430495]
lrwx------ 1 root root 64 4月  16 07:26 179 -> socket:[2432853]
lr-x------ 1 root root 64 4月  16 07:26 18 -> /usr/local/tomcat8/lib/catalina-ha.jar
lrwx------ 1 root root 64 4月  16 09:15 180 -> socket:[2436336]
lrwx------ 1 root root 64 4月  16 09:41 181 -> socket:[2465534]
lrwx------ 1 root root 64 4月  16 09:41 182 -> socket:[2463007]
lrwx------ 1 root root 64 4月  16 07:26 184 -> socket:[2470152]
lrwx------ 1 root root 64 4月  16 07:26 185 -> socket:[2466565]
lrwx------ 1 root root 64 4月  16 10:06 188 -> socket:[2487761]
lrwx------ 1 root root 64 4月  16 07:26 189 -> socket:[2477783]
lr-x------ 1 root root 64 4月  16 07:26 19 -> /usr/local/tomcat8/lib/tomcat-jni.jar
lrwx------ 1 root root 64 4月  16 10:14 190 -> socket:[2496612]
l-wx------ 1 root root 64 4月  16 07:26 2 -> /usr/local/tomcat8/logs/catalina.out
lr-x------ 1 root root 64 4月  16 07:26 20 -> /usr/local/tomcat8/lib/el-api.jar
lr-x------ 1 root root 64 4月  16 07:26 21 -> /usr/local/tomcat8/lib/catalina.jar
lr-x------ 1 root root 64 4月  16 07:26 22 -> /usr/local/tomcat8/lib/catalina-tribes.jar
lr-x------ 1 root root 64 4月  16 07:26 23 -> /usr/local/tomcat8/lib/jasper-el.jar
lr-x------ 1 root root 64 4月  16 07:26 24 -> /usr/local/tomcat8/lib/tomcat-i18n-fr.jar
lr-x------ 1 root root 64 4月  16 07:26 25 -> /usr/local/tomcat8/lib/ecj-4.5.jar
lr-x------ 1 root root 64 4月  16 07:26 26 -> /usr/local/tomcat8/lib/tomcat-i18n-es.jar
lr-x------ 1 root root 64 4月  16 07:26 27 -> /usr/local/tomcat8/lib/catalina-ant.jar
lr-x------ 1 root root 64 4月  16 07:26 28 -> /usr/local/tomcat8/lib/servlet-api.jar
lr-x------ 1 root root 64 4月  16 07:26 29 -> /usr/local/tomcat8/lib/tomcat-util.jar
lr-x------ 1 root root 64 4月  16 07:26 3 -> /usr/local/Java/jre/lib/rt.jar
lr-x------ 1 root root 64 4月  16 07:26 30 -> /usr/local/tomcat8/lib/tomcat-i18n-ja.jar
lr-x------ 1 root root 64 4月  16 07:26 31 -> /usr/local/tomcat8/lib/jsp-api.jar
lr-x------ 1 root root 64 4月  16 07:26 32 -> /usr/local/tomcat8/lib/tomcat-api.jar
lr-x------ 1 root root 64 4月  16 07:26 33 -> /usr/local/tomcat8/lib/tomcat-coyote.jar
lr-x------ 1 root root 64 4月  16 07:26 34 -> /usr/local/tomcat8/lib/tomcat-jdbc.jar
lr-x------ 1 root root 64 4月  16 07:26 35 -> /usr/local/Java/jre/lib/jsse.jar
lr-x------ 1 root root 64 4月  16 07:26 36 -> /usr/local/Java/jre/lib/jce.jar
lr-x------ 1 root root 64 4月  16 07:26 37 -> /usr/local/Java/jre/lib/ext/sunec.jar
lr-x------ 1 root root 64 4月  16 07:26 38 -> /usr/local/Java/jre/lib/ext/sunpkcs11.jar
lr-x------ 1 root root 64 4月  16 07:26 39 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 4 -> /usr/local/tomcat8/bin/bootstrap.jar
lr-x------ 1 root root 64 4月  16 07:26 40 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 41 -> /dev/random
lr-x------ 1 root root 64 4月  16 07:26 42 -> /dev/random
lr-x------ 1 root root 64 4月  16 07:26 43 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 44 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 45 -> /usr/local/Java/jre/lib/ext/sunjce_provider.jar
lrwx------ 1 root root 64 4月  16 07:26 46 -> socket:[2329484]
lrwx------ 1 root root 64 4月  16 07:26 47 -> socket:[2329485]
lr-x------ 1 root root 64 4月  16 07:26 48 -> pipe:[2329487]
l-wx------ 1 root root 64 4月  16 07:26 49 -> pipe:[2329487]
lr-x------ 1 root root 64 4月  16 07:26 5 -> /usr/local/tomcat8/bin/commons-daemon.jar
lrwx------ 1 root root 64 4月  16 07:26 50 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:26 51 -> socket:[2329488]
lr-x------ 1 root root 64 4月  16 07:26 52 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 53 -> pipe:[2329493]
l-wx------ 1 root root 64 4月  16 07:26 54 -> pipe:[2329493]
lrwx------ 1 root root 64 4月  16 07:26 55 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:26 56 -> socket:[2329494]
lr-x------ 1 root root 64 4月  16 07:26 57 -> pipe:[2329495]
l-wx------ 1 root root 64 4月  16 07:26 58 -> pipe:[2329495]
lrwx------ 1 root root 64 4月  16 07:26 59 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 6 -> /usr/local/tomcat8/bin/tomcat-juli.jar
l-wx------ 1 root root 64 4月  16 07:26 60 -> /usr/local/tomcat8/logs/localhost_access_log.2018-04-16.txt
lr-x------ 1 root root 64 4月  16 07:26 62 -> pipe:[2329521]
l-wx------ 1 root root 64 4月  16 07:26 63 -> pipe:[2329521]
lrwx------ 1 root root 64 4月  16 07:26 64 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 65 -> pipe:[2329522]
l-wx------ 1 root root 64 4月  16 07:26 66 -> pipe:[2329522]
lrwx------ 1 root root 64 4月  16 07:26 67 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 68 -> pipe:[2329523]
l-wx------ 1 root root 64 4月  16 07:26 69 -> pipe:[2329523]
l-wx------ 1 root root 64 4月  16 07:26 7 -> /usr/local/tomcat8/logs/catalina.2018-04-16.log
lrwx------ 1 root root 64 4月  16 07:26 70 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:57 71 -> socket:[2365064]
lr-x------ 1 root root 64 4月  16 07:26 72 -> pipe:[2329525]
l-wx------ 1 root root 64 4月  16 07:26 73 -> pipe:[2329525]
lrwx------ 1 root root 64 4月  16 07:26 74 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 75 -> pipe:[2331645]
l-wx------ 1 root root 64 4月  16 07:26 76 -> pipe:[2331645]
lrwx------ 1 root root 64 4月  16 07:26 77 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 08:53 78 -> socket:[2413366]
lr-x------ 1 root root 64 4月  16 07:26 79 -> pipe:[2331647]
l-wx------ 1 root root 64 4月  16 07:26 8 -> /usr/local/tomcat8/logs/localhost.2018-04-16.log
l-wx------ 1 root root 64 4月  16 07:26 80 -> pipe:[2331647]
lrwx------ 1 root root 64 4月  16 07:26 81 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:26 82 -> socket:[2331650]
lrwx------ 1 root root 64 4月  16 08:20 83 -> socket:[2383274]
lrwx------ 1 root root 64 4月  16 08:17 84 -> socket:[2379961]
lrwx------ 1 root root 64 4月  16 07:26 85 -> socket:[2332830]
lrwx------ 1 root root 64 4月  16 08:16 86 -> socket:[2379456]
lrwx------ 1 root root 64 4月  16 08:57 87 -> socket:[2418090]
lrwx------ 1 root root 64 4月  16 08:47 88 -> socket:[2408095]
lrwx------ 1 root root 64 4月  16 09:12 89 -> socket:[2430414]
l-wx------ 1 root root 64 4月  16 07:26 9 -> /usr/local/tomcat8/logs/manager.2018-04-16.log
lrwx------ 1 root root 64 4月  16 08:40 90 -> socket:[2408302]
lrwx------ 1 root root 64 4月  16 10:02 91 -> socket:[2480174]
lrwx------ 1 root root 64 4月  16 10:01 92 -> socket:[2479470]
lrwx------ 1 root root 64 4月  16 10:00 93 -> socket:[2479363]
lrwx------ 1 root root 64 4月  16 10:22 96 -> socket:[2329526]
lrwx------ 1 root root 64 4月  16 10:22 97 -> socket:[2329526]

挂了的时候

dr-x------ 2 root root  0 4月  16 07:26 .
dr-xr-xr-x 9 root root  0 4月  16 07:26 ..
lr-x------ 1 root root 64 4月  16 07:26 0 -> /dev/null
l-wx------ 1 root root 64 4月  16 07:26 1 -> /usr/local/tomcat8/logs/catalina.out
l-wx------ 1 root root 64 4月  16 07:26 10 -> /usr/local/tomcat8/logs/host-manager.2018-04-16.log
lrwx------ 1 root root 64 4月  16 10:25 100 -> socket:[2516492]
lrwx------ 1 root root 64 4月  16 11:25 101 -> socket:[2560955]
lrwx------ 1 root root 64 4月  16 11:17 102 -> socket:[2554588]
lrwx------ 1 root root 64 4月  16 12:41 103 -> socket:[2634632]
lrwx------ 1 root root 64 4月  16 12:21 104 -> socket:[2614894]
lrwx------ 1 root root 64 4月  16 12:03 105 -> socket:[2597260]
lrwx------ 1 root root 64 4月  16 12:25 106 -> socket:[2618450]
lrwx------ 1 root root 64 4月  16 12:03 107 -> socket:[2597409]
lrwx------ 1 root root 64 4月  16 12:26 108 -> socket:[2619299]
lrwx------ 1 root root 64 4月  16 12:41 109 -> socket:[2634432]
lr-x------ 1 root root 64 4月  16 07:26 11 -> /usr/local/tomcat8/lib/catalina-storeconfig.jar
lrwx------ 1 root root 64 4月  16 12:41 110 -> socket:[2633278]
lrwx------ 1 root root 64 4月  16 12:42 111 -> socket:[2636081]
lrwx------ 1 root root 64 4月  16 12:41 112 -> socket:[2635080]
lrwx------ 1 root root 64 4月  16 13:20 113 -> socket:[2672277]
lrwx------ 1 root root 64 4月  16 12:46 114 -> socket:[2637260]
lrwx------ 1 root root 64 4月  16 12:48 115 -> socket:[2641689]
lrwx------ 1 root root 64 4月  16 13:07 116 -> socket:[2660517]
lrwx------ 1 root root 64 4月  16 12:41 117 -> socket:[2635804]
lr-x------ 1 root root 64 4月  16 07:26 118 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/classes/ehcache.xml
lr-x------ 1 root root 64 4月  16 07:26 119 -> /usr/local/Java/jre/lib/charsets.jar
lr-x------ 1 root root 64 4月  16 07:26 12 -> /usr/local/tomcat8/lib/jasper.jar
lr-x------ 1 root root 64 4月  16 07:26 120 -> /usr/local/Java/jre/lib/resources.jar
lrwx------ 1 root root 64 4月  16 07:26 121 -> socket:[2329518]
lrwx------ 1 root root 64 4月  16 07:26 122 -> socket:[2331644]
lrwx------ 1 root root 64 4月  16 10:25 123 -> socket:[2516448]
lrwx------ 1 root root 64 4月  16 12:55 124 -> socket:[2648314]
lrwx------ 1 root root 64 4月  16 12:46 125 -> socket:[2639141]
lrwx------ 1 root root 64 4月  16 07:26 126 -> socket:[2331643]
lrwx------ 1 root root 64 4月  16 13:07 127 -> socket:[2660320]
lrwx------ 1 root root 64 4月  16 13:43 128 -> socket:[2694898]
lrwx------ 1 root root 64 4月  16 13:29 129 -> socket:[2680789]
lr-x------ 1 root root 64 4月  16 07:26 13 -> /usr/local/tomcat8/lib/tomcat-util-scan.jar
lrwx------ 1 root root 64 4月  16 13:38 130 -> socket:[2687531]
lrwx------ 1 root root 64 4月  16 07:26 132 -> socket:[2329526]
lrwx------ 1 root root 64 4月  16 13:42 133 -> socket:[2695425]
lrwx------ 1 root root 64 4月  16 14:01 134 -> socket:[2712292]
lrwx------ 1 root root 64 4月  16 13:29 135 -> socket:[2677639]
lrwx------ 1 root root 64 4月  16 14:15 136 -> socket:[2725176]
lrwx------ 1 root root 64 4月  16 13:46 137 -> socket:[2698289]
lrwx------ 1 root root 64 4月  16 13:37 138 -> socket:[2689848]
lrwx------ 1 root root 64 4月  16 14:34 139 -> socket:[2741125]
lr-x------ 1 root root 64 4月  16 07:26 14 -> /usr/local/tomcat8/lib/websocket-api.jar
lrwx------ 1 root root 64 4月  16 13:42 140 -> socket:[2692915]
lrwx------ 1 root root 64 4月  16 14:35 141 -> socket:[2745316]
lrwx------ 1 root root 64 4月  16 14:40 142 -> socket:[2751344]
lrwx------ 1 root root 64 4月  16 14:29 143 -> socket:[2739225]
lrwx------ 1 root root 64 4月  16 14:29 144 -> socket:[2739548]
lrwx------ 1 root root 64 4月  16 14:36 145 -> socket:[2747375]
lrwx------ 1 root root 64 4月  16 14:37 146 -> socket:[2748013]
lrwx------ 1 root root 64 4月  16 14:32 147 -> socket:[2741138]
lrwx------ 1 root root 64 4月  16 14:36 148 -> socket:[2746403]
lrwx------ 1 root root 64 4月  16 14:37 149 -> socket:[2747621]
lr-x------ 1 root root 64 4月  16 07:26 15 -> /usr/local/tomcat8/lib/tomcat-websocket.jar
lrwx------ 1 root root 64 4月  16 07:49 150 -> socket:[2364233]
lr-x------ 1 root root 64 4月  16 07:26 151 -> /usr/local/Java/jre/lib/ext/localedata.jar
lr-x------ 1 root root 64 4月  16 07:26 153 -> /usr/local/Java/jre/lib/ext/cldrdata.jar
lrwx------ 1 root root 64 4月  16 07:26 154 -> socket:[2365347]
lrwx------ 1 root root 64 4月  16 07:34 155 -> socket:[2365934]
lr-x------ 1 root root 64 4月  16 07:26 156 -> /usr/local/Java/jre/lib/fonts/simsun.ttf
lr-x------ 1 root root 64 4月  16 07:26 157 -> /usr/local/Java/jre/lib/fonts/LucidaBrightDemiBold.ttf
lr-x------ 1 root root 64 4月  16 07:26 158 -> /usr/local/Java/jre/lib/fonts/LucidaTypewriterBold.ttf
lr-x------ 1 root root 64 4月  16 07:26 159 -> /usr/local/Java/jre/lib/fonts/LucidaBrightRegular.ttf
lr-x------ 1 root root 64 4月  16 07:26 16 -> /usr/local/tomcat8/lib/tomcat-dbcp.jar
lr-x------ 1 root root 64 4月  16 07:26 160 -> /usr/local/Java/jre/lib/fonts/LucidaSansRegular.ttf
lr-x------ 1 root root 64 4月  16 07:26 161 -> /usr/local/Java/jre/lib/fonts/LucidaBrightItalic.ttf
lr-x------ 1 root root 64 4月  16 07:26 162 -> /usr/local/Java/jre/lib/fonts/LucidaBrightDemiItalic.ttf
lr-x------ 1 root root 64 4月  16 07:26 163 -> /usr/local/Java/jre/lib/fonts/LucidaSansDemiBold.ttf
lr-x------ 1 root root 64 4月  16 07:26 164 -> /usr/local/Java/jre/lib/fonts/LucidaTypewriterRegular.ttf
lr-x------ 1 root root 64 4月  16 14:39 165 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-plugins-cache-1.r.62.jar
lrwx------ 1 root root 64 4月  16 08:18 166 -> socket:[2380883]
lrwx------ 1 root root 64 4月  16 14:39 167 -> socket:[2749690]
lrwx------ 1 root root 64 4月  16 08:19 168 -> socket:[2382722]
lr-x------ 1 root root 64 4月  16 07:26 17 -> /usr/local/tomcat8/lib/annotations-api.jar
lrwx------ 1 root root 64 4月  16 08:19 170 -> socket:[2393397]
lrwx------ 1 root root 64 4月  16 08:39 171 -> socket:[2401835]
lr-x------ 1 root root 64 4月  16 14:40 172 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-beanutils-1.8.3.jar
lr-x------ 1 root root 64 4月  16 14:30 173 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/beetl-2.5.0.jar
lr-x------ 1 root root 64 4月  16 14:30 174 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutzwk-code-generator-1.1.jar
lr-x------ 1 root root 64 4月  16 14:30 175 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/javax.servlet-api-3.1.0.jar
lrwx------ 1 root root 64 4月  16 08:55 176 -> socket:[2425052]
lr-x------ 1 root root 64 4月  16 14:30 177 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/simplecaptcha-1.2.2.jar
lrwx------ 1 root root 64 4月  16 07:26 178 -> socket:[2430495]
lrwx------ 1 root root 64 4月  16 07:26 179 -> socket:[2432853]
lr-x------ 1 root root 64 4月  16 07:26 18 -> /usr/local/tomcat8/lib/catalina-ha.jar
lrwx------ 1 root root 64 4月  16 09:15 180 -> socket:[2436336]
lrwx------ 1 root root 64 4月  16 09:41 181 -> socket:[2465534]
lrwx------ 1 root root 64 4月  16 09:41 182 -> socket:[2463007]
lr-x------ 1 root root 64 4月  16 14:30 183 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/core-3.3.0.jar
lrwx------ 1 root root 64 4月  16 07:26 184 -> socket:[2470152]
lrwx------ 1 root root 64 4月  16 07:26 185 -> socket:[2466565]
lr-x------ 1 root root 64 4月  16 14:30 186 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jackson-annotations-2.8.0.jar
lr-x------ 1 root root 64 4月  16 14:30 187 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-logging-1.1.jar
lrwx------ 1 root root 64 4月  16 10:06 188 -> socket:[2487761]
lrwx------ 1 root root 64 4月  16 07:26 189 -> socket:[2477783]
lr-x------ 1 root root 64 4月  16 07:26 19 -> /usr/local/tomcat8/lib/tomcat-jni.jar
lrwx------ 1 root root 64 4月  16 10:14 190 -> socket:[2496612]
lrwx------ 1 root root 64 4月  16 10:19 191 -> socket:[2501859]
lrwx------ 1 root root 64 4月  16 10:02 192 -> socket:[2502509]
lr-x------ 1 root root 64 4月  16 14:30 193 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-lang-2.6.jar
lr-x------ 1 root root 64 4月  16 14:30 194 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jsoup-1.8.1.jar
lrwx------ 1 root root 64 4月  16 10:34 195 -> socket:[2511199]
lr-x------ 1 root root 64 4月  16 14:30 196 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/evo-inflector-1.0.1.jar
lr-x------ 1 root root 64 4月  16 14:30 197 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-1.r.62.jar
lrwx------ 1 root root 64 4月  16 10:40 198 -> socket:[2535151]
lr-x------ 1 root root 64 4月  16 14:30 199 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/javase-3.2.1.jar
l-wx------ 1 root root 64 4月  16 07:26 2 -> /usr/local/tomcat8/logs/catalina.out
lr-x------ 1 root root 64 4月  16 07:26 20 -> /usr/local/tomcat8/lib/el-api.jar
lrwx------ 1 root root 64 4月  16 10:40 200 -> socket:[2524392]
lr-x------ 1 root root 64 4月  16 14:30 201 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/druid-1.0.24.jar
lr-x------ 1 root root 64 4月  16 14:30 202 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/antlr4-runtime-4.2.jar
lrwx------ 1 root root 64 4月  16 11:05 203 -> socket:[2542448]
lrwx------ 1 root root 64 4月  16 11:04 204 -> socket:[2545418]
lrwx------ 1 root root 64 4月  16 11:10 205 -> socket:[2547233]
lr-x------ 1 root root 64 4月  16 14:30 206 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-plugins-views-1.r.62.jar
lr-x------ 1 root root 64 4月  16 14:30 207 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/servlet-api-2.3.jar
lrwx------ 1 root root 64 4月  16 11:39 208 -> socket:[2574313]
lrwx------ 1 root root 64 4月  16 11:12 209 -> socket:[2573767]
lr-x------ 1 root root 64 4月  16 07:26 21 -> /usr/local/tomcat8/lib/catalina.jar
lrwx------ 1 root root 64 4月  16 11:36 210 -> socket:[2575059]
lrwx------ 1 root root 64 4月  16 11:56 211 -> socket:[2594938]
lr-x------ 1 root root 64 4月  16 14:30 212 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/emoji-java-3.1.3.jar
lrwx------ 1 root root 64 4月  16 11:42 213 -> socket:[2577203]
lr-x------ 1 root root 64 4月  16 14:30 214 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/ehcache-2.10.2.2.21.jar
lr-x------ 1 root root 64 4月  16 14:30 215 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-integration-jedis-1.r.62.jar
lr-x------ 1 root root 64 4月  16 14:30 216 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/joda-time-2.9.4.jar
lrwx------ 1 root root 64 4月  16 12:03 217 -> socket:[2602214]
lr-x------ 1 root root 64 4月  16 14:30 218 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/guava-15.0.jar
lrwx------ 1 root root 64 4月  16 12:09 219 -> socket:[2621785]
lr-x------ 1 root root 64 4月  16 07:26 22 -> /usr/local/tomcat8/lib/catalina-tribes.jar
lr-x------ 1 root root 64 4月  16 14:30 220 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/org.abego.treelayout.core-1.0.1.jar
lrwx------ 1 root root 64 4月  16 12:29 221 -> socket:[2626618]
lrwx------ 1 root root 64 4月  16 12:30 222 -> socket:[2629144]
lr-x------ 1 root root 64 4月  16 14:30 223 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jackson-databind-2.8.1.jar
lr-x------ 1 root root 64 4月  16 14:30 224 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/mysql-connector-java-5.1.44.jar
lr-x------ 1 root root 64 4月  16 14:30 225 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-plugins-daocache-1.r.62.jar
lr-x------ 1 root root 64 4月  16 14:30 226 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/log4j-1.2.17.jar
lr-x------ 1 root root 64 4月  16 14:30 227 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/c3p0-0.9.1.1.jar
lr-x------ 1 root root 64 4月  16 14:30 228 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-cli-1.2.jar
lr-x------ 1 root root 64 4月  16 14:30 229 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/slf4j-log4j12-1.7.21.jar
lr-x------ 1 root root 64 4月  16 07:26 23 -> /usr/local/tomcat8/lib/jasper-el.jar
lr-x------ 1 root root 64 4月  16 14:30 230 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/javax.mail-1.5.5.jar
lr-x------ 1 root root 64 4月  16 14:30 231 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-integration-shiro-1.r.62.jar
lr-x------ 1 root root 64 4月  16 14:30 232 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/shiro-core-1.2.5.jar
lr-x------ 1 root root 64 4月  16 14:30 233 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/activation-1.1.1.jar
lr-x------ 1 root root 64 4月  16 14:30 234 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutzwx-1.r.62.jar
lr-x------ 1 root root 64 4月  16 14:30 235 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/antlr4-annotations-4.2.jar
lr-x------ 1 root root 64 4月  16 14:30 236 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jjwt-0.6.0.jar
lr-x------ 1 root root 64 4月  16 14:30 237 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/quartz-2.2.3.jar
lr-x------ 1 root root 64 4月  16 14:30 238 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-lang3-3.4.jar
lr-x------ 1 root root 64 4月  16 14:30 239 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-beanutils-core-1.8.3.jar
lr-x------ 1 root root 64 4月  16 07:26 24 -> /usr/local/tomcat8/lib/tomcat-i18n-fr.jar
lr-x------ 1 root root 64 4月  16 14:30 240 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jackson-core-2.8.1.jar
lrwx------ 1 root root 64 4月  16 13:30 241 -> socket:[2690463]
lr-x------ 1 root root 64 4月  16 14:30 242 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jtds-1.3.1.jar
lr-x------ 1 root root 64 4月  16 14:30 243 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/nutz-integration-quartz-1.r.62.jar
lr-x------ 1 root root 64 4月  16 14:30 244 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/json-20160212.jar
lr-x------ 1 root root 64 4月  16 14:30 245 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/velocity-1.7.jar
lrwx------ 1 root root 64 4月  16 13:44 246 -> socket:[2703773]
lr-x------ 1 root root 64 4月  16 14:30 247 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jcommander-1.48.jar
lrwx------ 1 root root 64 4月  16 13:50 248 -> socket:[2714379]
lrwx------ 1 root root 64 4月  16 14:06 249 -> socket:[2724161]
lr-x------ 1 root root 64 4月  16 07:26 25 -> /usr/local/tomcat8/lib/ecj-4.5.jar
lrwx------ 1 root root 64 4月  16 14:00 250 -> socket:[2718949]
lrwx------ 1 root root 64 4月  16 14:07 251 -> socket:[2719609]
lrwx------ 1 root root 64 4月  16 14:15 252 -> socket:[2736637]
lrwx------ 1 root root 64 4月  16 14:15 253 -> socket:[2726427]
lrwx------ 1 root root 64 4月  16 14:15 254 -> socket:[2727183]
lr-x------ 1 root root 64 4月  16 14:30 255 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-pool2-2.4.2.jar
lrwx------ 1 root root 64 4月  16 14:17 256 -> socket:[2728148]
lr-x------ 1 root root 64 4月  16 14:30 257 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/slf4j-api-1.7.21.jar
lr-x------ 1 root root 64 4月  16 14:30 258 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/socialauth-4.12.jar
lrwx------ 1 root root 64 4月  16 14:30 259 -> socket:[2743201]
lr-x------ 1 root root 64 4月  16 07:26 26 -> /usr/local/tomcat8/lib/tomcat-i18n-es.jar
lr-x------ 1 root root 64 4月  16 14:30 260 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-email-1.4.jar
lr-x------ 1 root root 64 4月  16 14:30 261 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/shiro-all-1.3.0.jar
lrwx------ 1 root root 64 4月  16 14:33 262 -> socket:[2744365]
lr-x------ 1 root root 64 4月  16 14:33 263 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jedis-2.8.1.jar
lr-x------ 1 root root 64 4月  16 14:36 264 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/gson-2.2.4.jar
lr-x------ 1 root root 64 4月  16 14:36 265 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/shiro-web-1.2.5.jar
lr-x------ 1 root root 64 4月  16 14:38 266 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/commons-collections-3.2.1.jar
lr-x------ 1 root root 64 4月  16 14:38 267 -> /usr/local/tomcat8/webapps/nutzwk/WEB-INF/lib/jcl-over-slf4j-1.7.24.jar
lrwx------ 1 root root 64 4月  16 14:40 268 -> socket:[2329526]
lr-x------ 1 root root 64 4月  16 07:26 27 -> /usr/local/tomcat8/lib/catalina-ant.jar
lr-x------ 1 root root 64 4月  16 07:26 28 -> /usr/local/tomcat8/lib/servlet-api.jar
lr-x------ 1 root root 64 4月  16 07:26 29 -> /usr/local/tomcat8/lib/tomcat-util.jar
lr-x------ 1 root root 64 4月  16 07:26 3 -> /usr/local/Java/jre/lib/rt.jar
lr-x------ 1 root root 64 4月  16 07:26 30 -> /usr/local/tomcat8/lib/tomcat-i18n-ja.jar
lr-x------ 1 root root 64 4月  16 07:26 31 -> /usr/local/tomcat8/lib/jsp-api.jar
lr-x------ 1 root root 64 4月  16 07:26 32 -> /usr/local/tomcat8/lib/tomcat-api.jar
lr-x------ 1 root root 64 4月  16 07:26 33 -> /usr/local/tomcat8/lib/tomcat-coyote.jar
lr-x------ 1 root root 64 4月  16 07:26 34 -> /usr/local/tomcat8/lib/tomcat-jdbc.jar
lr-x------ 1 root root 64 4月  16 07:26 35 -> /usr/local/Java/jre/lib/jsse.jar
lr-x------ 1 root root 64 4月  16 07:26 36 -> /usr/local/Java/jre/lib/jce.jar
lr-x------ 1 root root 64 4月  16 07:26 37 -> /usr/local/Java/jre/lib/ext/sunec.jar
lr-x------ 1 root root 64 4月  16 07:26 38 -> /usr/local/Java/jre/lib/ext/sunpkcs11.jar
lr-x------ 1 root root 64 4月  16 07:26 39 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 4 -> /usr/local/tomcat8/bin/bootstrap.jar
lr-x------ 1 root root 64 4月  16 07:26 40 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 41 -> /dev/random
lr-x------ 1 root root 64 4月  16 07:26 42 -> /dev/random
lr-x------ 1 root root 64 4月  16 07:26 43 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 44 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 45 -> /usr/local/Java/jre/lib/ext/sunjce_provider.jar
lrwx------ 1 root root 64 4月  16 07:26 46 -> socket:[2329484]
lrwx------ 1 root root 64 4月  16 07:26 47 -> socket:[2329485]
lr-x------ 1 root root 64 4月  16 07:26 48 -> pipe:[2329487]
l-wx------ 1 root root 64 4月  16 07:26 49 -> pipe:[2329487]
lr-x------ 1 root root 64 4月  16 07:26 5 -> /usr/local/tomcat8/bin/commons-daemon.jar
lrwx------ 1 root root 64 4月  16 07:26 50 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:26 51 -> socket:[2329488]
lr-x------ 1 root root 64 4月  16 07:26 52 -> /dev/urandom
lr-x------ 1 root root 64 4月  16 07:26 53 -> pipe:[2329493]
l-wx------ 1 root root 64 4月  16 07:26 54 -> pipe:[2329493]
lrwx------ 1 root root 64 4月  16 07:26 55 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:26 56 -> socket:[2329494]
lr-x------ 1 root root 64 4月  16 07:26 57 -> pipe:[2329495]
l-wx------ 1 root root 64 4月  16 07:26 58 -> pipe:[2329495]
lrwx------ 1 root root 64 4月  16 07:26 59 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 6 -> /usr/local/tomcat8/bin/tomcat-juli.jar
l-wx------ 1 root root 64 4月  16 07:26 60 -> /usr/local/tomcat8/logs/localhost_access_log.2018-04-16.txt
lr-x------ 1 root root 64 4月  16 07:26 62 -> pipe:[2329521]
l-wx------ 1 root root 64 4月  16 07:26 63 -> pipe:[2329521]
lrwx------ 1 root root 64 4月  16 07:26 64 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 65 -> pipe:[2329522]
l-wx------ 1 root root 64 4月  16 07:26 66 -> pipe:[2329522]
lrwx------ 1 root root 64 4月  16 07:26 67 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 68 -> pipe:[2329523]
l-wx------ 1 root root 64 4月  16 07:26 69 -> pipe:[2329523]
l-wx------ 1 root root 64 4月  16 07:26 7 -> /usr/local/tomcat8/logs/catalina.2018-04-16.log
lrwx------ 1 root root 64 4月  16 07:26 70 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:57 71 -> socket:[2365064]
lr-x------ 1 root root 64 4月  16 07:26 72 -> pipe:[2329525]
l-wx------ 1 root root 64 4月  16 07:26 73 -> pipe:[2329525]
lrwx------ 1 root root 64 4月  16 07:26 74 -> anon_inode:[eventpoll]
lr-x------ 1 root root 64 4月  16 07:26 75 -> pipe:[2331645]
l-wx------ 1 root root 64 4月  16 07:26 76 -> pipe:[2331645]
lrwx------ 1 root root 64 4月  16 07:26 77 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 08:53 78 -> socket:[2413366]
lr-x------ 1 root root 64 4月  16 07:26 79 -> pipe:[2331647]
l-wx------ 1 root root 64 4月  16 07:26 8 -> /usr/local/tomcat8/logs/localhost.2018-04-16.log
l-wx------ 1 root root 64 4月  16 07:26 80 -> pipe:[2331647]
lrwx------ 1 root root 64 4月  16 07:26 81 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 4月  16 07:26 82 -> socket:[2331650]
lrwx------ 1 root root 64 4月  16 08:20 83 -> socket:[2383274]
lrwx------ 1 root root 64 4月  16 08:17 84 -> socket:[2379961]
lrwx------ 1 root root 64 4月  16 07:26 85 -> socket:[2332830]
lrwx------ 1 root root 64 4月  16 08:16 86 -> socket:[2379456]
lrwx------ 1 root root 64 4月  16 08:57 87 -> socket:[2418090]
lrwx------ 1 root root 64 4月  16 08:47 88 -> socket:[2408095]
lrwx------ 1 root root 64 4月  16 09:12 89 -> socket:[2430414]
l-wx------ 1 root root 64 4月  16 07:26 9 -> /usr/local/tomcat8/logs/manager.2018-04-16.log
lrwx------ 1 root root 64 4月  16 08:40 90 -> socket:[2408302]
lrwx------ 1 root root 64 4月  16 10:02 91 -> socket:[2480174]
lrwx------ 1 root root 64 4月  16 10:01 92 -> socket:[2479470]
lrwx------ 1 root root 64 4月  16 10:00 93 -> socket:[2479363]
lrwx------ 1 root root 64 4月  16 10:46 94 -> socket:[2522352]
lrwx------ 1 root root 64 4月  16 10:45 95 -> socket:[2521834]
lrwx------ 1 root root 64 4月  16 13:08 96 -> socket:[2660754]
lrwx------ 1 root root 64 4月  16 11:04 97 -> socket:[2537442]
lrwx------ 1 root root 64 4月  16 11:33 98 -> socket:[2568126]
lrwx------ 1 root root 64 4月  16 10:59 99 -> socket:[2535773]

挂了启动的时候会报错,日志如下

16-Apr-2018 07:26:34.034 SEVERE [http-nio-8080-exec-23] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/nutzwk] threw exception [java.lang.IllegalStateException: Cannot call sendError() after the response has been committed] with root cause
 java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
	at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:478)
	at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:129)
	at org.nutz.mvc.view.HttpServerResponse.render(HttpServerResponse.java:181)
	at org.nutz.mvc.view.HttpStatusView.render(HttpStatusView.java:103)
	at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
	at org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:30)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:49)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at cn.wizzer.common.filter.RouteFilter.doFilter(RouteFilter.java:34)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

16-Apr-2018 07:26:34.036 SEVERE [http-nio-8080-exec-27] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/nutzwk] threw exception [java.lang.IllegalStateException: Cannot call sendError() after the response has been committed] with root cause
 java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
	at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:478)
	at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:129)
	at org.nutz.mvc.view.HttpServerResponse.render(HttpServerResponse.java:181)
	at org.nutz.mvc.view.HttpStatusView.render(HttpStatusView.java:103)
	at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
	at org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:30)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:49)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at cn.wizzer.common.filter.RouteFilter.doFilter(RouteFilter.java:34)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

16-Apr-2018 07:26:34.037 SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/nutzwk] threw exception [java.lang.IllegalStateException: Cannot call sendError() after the response has been committed] with root cause
 java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
	at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:478)
	at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:129)
	at org.nutz.mvc.view.HttpServerResponse.render(HttpServerResponse.java:181)
	at org.nutz.mvc.view.HttpStatusView.render(HttpStatusView.java:103)
	at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
	at org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:30)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:49)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at cn.wizzer.common.filter.RouteFilter.doFilter(RouteFilter.java:34)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

16-Apr-2018 11:17:33.960 SEVERE [http-nio-8080-exec-42] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/nutzwk] threw exception [java.lang.IllegalStateException: Cannot call sendError() after the response has been committed] with root cause
 java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
	at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:478)
	at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:129)
	at org.nutz.mvc.view.HttpServerResponse.render(HttpServerResponse.java:181)
	at org.nutz.mvc.view.HttpStatusView.render(HttpStatusView.java:103)
	at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
	at org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:30)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:49)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at cn.wizzer.common.filter.RouteFilter.doFilter(RouteFilter.java:34)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

句柄不多

Cannot call sendError() 不是错误的根源,只是其他错误导致的结果,往前找其他错误信息

没有其他的错误日志呢..有个机器报错了,但是这个也是和句柄不够有关系

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007fd24bbe3a32, pid=877, tid=0x00007fd1f5bcb700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libzip.so+0x11a32]  newEntry+0x62
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# //hs_err_pid877.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

更新到最新版jdk8u162

好的,我先试试

@wendal ,昨天晚上崩溃了,我看了下日志,我本地的定时任务还早跑,说明java进程还有用,但是access日志没有请求进来了,包括阿里云探测心跳的head请求,如下是日志。我开启了debug模式,没有其他的异常信息,请问这种情况按照什么思路排查呢?

2018-04-18 23:20:00,001 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'jobInfoCheckJob'<class cn.wizzer.common.quartz.job.JobInfoCheckJob>
2018-04-18 23:20:00,001 org.quartz.core.JobRunShell.run(JobRunShell.java:201) DEBUG - Calling execute on job 85ce3908a58941fd8d75661af15836af.85ce3908a58941fd8d75661af15836af
2018-04-18 23:20:00,001 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_task
2018-04-18 23:20:00,004 cn.wizzer.common.quartz.job.JobInfoCheckJob.execute(JobInfoCheckJob.java:68) INFO  - 检查所有电影JOB执行传入参数({"pageno":"1"})更新成了了({"pageno":"2"})
2018-04-18 23:20:00,004 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - UPDATE sys_task SET exeAt=?,exeResult=?  WHERE id=?
2018-04-18 23:20:30,000 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'jobInfoCheckJob'<class cn.wizzer.common.quartz.job.JobInfoCheckJob>
2018-04-18 23:20:30,001 org.quartz.core.JobRunShell.run(JobRunShell.java:201) DEBUG - Calling execute on job 85ce3908a58941fd8d75661af15836af.85ce3908a58941fd8d75661af15836af
2018-04-18 23:20:30,002 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM sys_task
2018-04-18 23:20:30,004 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - UPDATE sys_task SET exeAt=?,exeResult=?  WHERE id=?
100.116.220.238 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.110 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.186 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.71 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.194 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.131 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.97.62.62 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.251 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.109.222.5 - - [18/Apr/2018:23:32:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.208 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.220 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.254 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.56 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.51 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.135 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.77 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.98 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.109.226.33 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.220.145 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.46 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.33 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.116.237.34 - - [18/Apr/2018:23:17:06 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -
100.97.62.49 - - [18/Apr/2018:23:17:05 +0800] "HEAD /nutzwk/open/common/heartBeat HTTP/1.0" 200 -

然后用jmap命令导出线程列表信息,谷歌欢迎你

上次崩溃的时候fd没有多少,上面有一次奔溃日志
我把文件打开大小多设置大了

[root@iZ2ze6ukmd4cl8b7m5ogx0Z logs]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15087
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 102400
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 65536
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

@wendal 开始挂了 jmap head信息

[root@iZ2ze6ukmd4cl8b7m5ogx0Z logs]# jmap -heap 22728
Attaching to process ID 22728, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.102-b14

using thread-local object allocation.
Parallel GC with 2 thread(s)

Heap Configuration:
   MinHeapFreeRatio         = 0
   MaxHeapFreeRatio         = 100
   MaxHeapSize              = 994050048 (948.0MB)
   NewSize                  = 20971520 (20.0MB)
   MaxNewSize               = 331350016 (316.0MB)
   OldSize                  = 41943040 (40.0MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 69730304 (66.5MB)
   used     = 51693624 (49.29888153076172MB)
   free     = 18036680 (17.20111846923828MB)
   74.13365643723567% used
From Space:
   capacity = 36175872 (34.5MB)
   used     = 36143168 (34.46881103515625MB)
   free     = 32704 (0.03118896484375MB)
   99.90959720335145% used
To Space:
   capacity = 42467328 (40.5MB)
   used     = 0 (0.0MB)
   free     = 42467328 (40.5MB)
   0.0% used
PS Old Generation
   capacity = 230162432 (219.5MB)
   used     = 112554256 (107.34010314941406MB)
   free     = 117608176 (112.15989685058594MB)
   48.902097106794564% used

27199 interned Strings occupying 3088864 bytes.

tcp链接看起来没啥问题,但是访问就502

[root@iZ2ze6ukmd4cl8b7m5ogx0Z logs]# netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
CLOSE_WAIT 207
ESTABLISHED 228
TIME_WAIT 3

jdk升级到最新版本试试?

我自己感觉不是jdk的问题,因为我们在这环境中跑了一年多了

那最近更新了什么呢?环境有什么变化?

我保留了jmap 和jstack的信息,先分析下看看

几年前遇到一个类似的情况,,某位同时写了一行查询某张表所有数据的代码(而且定义了之后后面并没有使用变量!!),,用了两年没事,,后面一打开某个页面,tomcat服务就挂,,我查了一堆时间,发现是那张表日积月累数据量太大了,一下就把内存爆掉了。。。

上次我只是把原来我们集群的shiro抄袭成nutzwk的单机模式集成,就开始莫名其妙问题,下面是很多线程blocked的日志
看上去是死锁了

Thread 22785: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Interpreted frame)
 - org.apache.commons.pool2.impl.LinkedBlockingDeque.takeFirst() @bci=20, line=583 (Interpreted frame)
 - org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(long) @bci=119, line=442 (Interpreted frame)
 - org.apache.commons.pool2.impl.GenericObjectPool.borrowObject() @bci=5, line=363 (Interpreted frame)
 - redis.clients.util.Pool.getResource() @bci=4, line=49 (Interpreted frame)
 - redis.clients.jedis.JedisPool.getResource() @bci=1, line=99 (Interpreted frame)
 - redis.clients.jedis.JedisPool.getResource() @bci=1, line=12 (Interpreted frame)
 - org.nutz.integration.jedis.JedisAgent.jedis() @bci=54, line=49 (Interpreted frame)
 - org.nutz.integration.jedis.JedisAgent.getResource() @bci=1, line=54 (Interpreted frame)
 - cn.wizzer.modules.back.wx.services.WxConfigService.getWxApi3(java.lang.String) @bci=66, line=42 (Interpreted frame)
 - cn.wizzer.common.services.wx.MvSearchHandler.searchHitOneProcess(org.nutz.weixin.bean.WxInMsg, cn.wizzer.modules.back.wx.models.Wx_user, cn.wizzer.modules.back.wx.models.Wx_msg, java.util.List, cn.wizzer.modules.back.wx.models.Wx_config) @bci=635, line=294 (Interpreted frame)
 - cn.wizzer.common.services.wx.MvSearchHandler.searchProcess(org.nutz.weixin.bean.WxInMsg, java.lang.String, cn.wizzer.modules.back.wx.models.Wx_user, cn.wizzer.modules.back.wx.models.Wx_msg, cn.wizzer.modules.back.wx.models.Wx_config) @bci=286, line=114 (Compiled frame)
 - cn.wizzer.common.services.wx.WxMoiveHandler.text(org.nutz.weixin.bean.WxInMsg) @bci=503, line=187 (Compiled frame)
 - org.nutz.weixin.util.Wxs.handle(org.nutz.weixin.bean.WxInMsg, org.nutz.weixin.spi.WxHandler) @bci=66, line=268 (Compiled frame)
 - org.nutz.weixin.impl.AbstractWxHandler.handle(org.nutz.weixin.bean.WxInMsg) @bci=2, line=93 (Compiled frame)
 - org.nutz.weixin.util.Wxs.handle(org.nutz.weixin.spi.WxHandler, javax.servlet.http.HttpServletRequest, java.lang.String) @bci=259, line=699 (Compiled frame)
 - cn.wizzer.modules.open.wx.WeixinController.msgIn(java.lang.String, javax.servlet.http.HttpServletRequest) @bci=26, line=98 (Compiled frame)
 - cn.wizzer.modules.open.wx.WeixinController$FM$msgIn$27c97e22e67171286f22b22ae0b702a1.invoke(java.lang.Object, java.lang.Object[]) @bci=17 (Compiled frame)
 - org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(org.nutz.mvc.ActionContext) @bci=50, line=31 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - org.nutz.mvc.impl.processor.AdaptorProcessor.process(org.nutz.mvc.ActionContext) @bci=53, line=33 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(org.nutz.mvc.ActionContext) @bci=69, line=58 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - cn.wizzer.common.processor.NutShiroProcessor.process(org.nutz.mvc.ActionContext) @bci=35, line=52 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - org.nutz.mvc.impl.processor.ModuleProcessor.process(org.nutz.mvc.ActionContext) @bci=169, line=123 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - org.nutz.mvc.impl.processor.EncodingProcessor.process(org.nutz.mvc.ActionContext) @bci=28, line=27 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(org.nutz.mvc.ActionContext) @bci=9, line=15 (Compiled frame)
 - org.nutz.mvc.impl.processor.AbstractProcessor.doNext(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - cn.wizzer.common.processor.GlobalsSettingProcessor.process(org.nutz.mvc.ActionContext) @bci=202, line=37 (Compiled frame)
 - org.nutz.mvc.impl.NutActionChain.doChain(org.nutz.mvc.ActionContext) @bci=13, line=44 (Compiled frame)
 - org.nutz.mvc.impl.ActionInvoker.invoke(org.nutz.mvc.ActionContext) @bci=58, line=67 (Compiled frame)
 - org.nutz.mvc.ActionHandler.handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=57, line=31 (Compiled frame)
 - org.nutz.mvc.NutFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=215, line=202 (Compiled frame)
 - org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=151, line=240 (Compiled frame)
 - org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=101, line=207 (Compiled frame)
 - cn.wizzer.common.filter.RouteFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=112, line=34 (Compiled frame)
 - org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=151, line=240 (Compiled frame)
 - org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=101, line=207 (Compiled frame)
 - org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=50, line=61 (Compiled frame)
 - org.apache.shiro.web.servlet.AdviceFilter.executeChain(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=3, line=108 (Compiled frame)
 - org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=64, line=137 (Compiled frame)
 - org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=113, line=125 (Compiled frame)
 - org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=130, line=66 (Compiled frame)
 - org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=13, line=449 (Compiled frame)
 - org.apache.shiro.web.servlet.AbstractShiroFilter$1.call() @bci=31, line=365 (Compiled frame)
 - org.apache.shiro.subject.support.SubjectCallable.doCall(java.util.concurrent.Callable) @bci=1, line=90 (Compiled frame)
 - org.apache.shiro.subject.support.SubjectCallable.call() @bci=14, line=83 (Compiled frame)
 - org.apache.shiro.subject.support.DelegatingSubject.execute(java.util.concurrent.Callable) @bci=7, line=383 (Compiled frame)
 - org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=47, line=362 (Compiled frame)
 - org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=113, line=125 (Compiled frame)
 - org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=151, line=240 (Compiled frame)
 - org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=101, line=207 (Compiled frame)
 - org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=756, line=212 (Compiled frame)
 - org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=166, line=106 (Compiled frame)
 - org.apache.catalina.authenticator.AuthenticatorBase.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=417, line=502 (Compiled frame)
 - org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=135, line=141 (Compiled frame)
 - org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=6, line=79 (Compiled frame)
 - org.apache.catalina.valves.AbstractAccessLogValve.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=6, line=616 (Compiled frame)
 - org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.connector.Request, org.apache.catalina.connector.Response) @bci=71, line=88 (Compiled frame)
 - org.apache.catalina.connector.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) @bci=202, line=528 (Compiled frame)
 - org.apache.coyote.http11.AbstractHttp11Processor.process(org.apache.tomcat.util.net.SocketWrapper) @bci=626, line=1099 (Compiled frame)
 - org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org.apache.tomcat.util.net.SocketWrapper, org.apache.tomcat.util.net.SocketStatus) @bci=330, line=670 (Compiled frame)
 - org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun() @bci=166, line=1520 (Compiled frame)
 - org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run() @bci=63, line=1476 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
 - org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run() @bci=4, line=61 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)

不像是内存泄漏,gc正常

如果是gc 导致的,那内部的定时任务是应该不能执行的,定时任务在服务挂的时候还在执行

好好查代码了……
getWxApi3 是什么,里面redis?

是的,我们wxapi2扩展,我们把微信的接口的token放进去了

这个是我们的实现

public class WxApi3 extends WxApi2Impl {
    private static final Log log = Logs.get().setTag("weixin");

    /**
     * WxApi2的图文接口地址的微信后台给的不一致所以增加一个方法
     *
     * @param news
     * @return
     */
    public WxResp add_news(List<WxMassArticle> news) {
        return postJson("/material/add_news", "articles", news);
    }

    @Override
    public String getAccessToken() {
        return wxAccessToken().getToken();
    }

    public WxAccessToken wxAccessToken() {
        WxAccessToken at = accessTokenStore.get();
        if (at == null) {
            synchronized (lock) {
                if (at == null) {
                    at = refresh();
                }
            }
        }
        return accessTokenStore.get();
    }

    @Override
    protected void reflushAccessToken() {
        refresh();
    }

    /**
     * 刷新token的接口注意频率!!
     * @return
     */
    public WxAccessToken refresh() {
        String url = String.format("%s/token?grant_type=client_credential&appid=%s&secret=%s",
                base,
                appid,
                appsecret);
        log.infof("ATS: reflush send: %s", url);

        Response resp = Http.get(url);
        if (!resp.isOK())
            throw new IllegalArgumentException("reflushAccessToken FAIL , openid=" + openid);
        String str = resp.getContent();

        log.infof("ATS: reflush done: %s", str);

        NutMap re = Json.fromJson(NutMap.class, str);
        String token = re.getString("access_token");
        int expires = re.getInt("expires_in") - 60;// 提前一分钟
        accessTokenStore.save(token, expires, System.currentTimeMillis());
        return new WxAccessToken(token, expires, System.currentTimeMillis());
    }

    @Override
    protected WxResp call(String URL, Request.METHOD method, String body) {
        String token = getAccessToken();
        if (!URL.startsWith("http"))
            URL = base + URL;
        if (URL.contains("?")) {
            URL += "&access_token=" + token;
        } else {
            URL += "?access_token=" + token;
        }
        if (log.isInfoEnabled()) {
            log.info("wxapi call: " + URL);
            if (log.isDebugEnabled()) {
                log.debug(body);
            }
        }

        Request req = Request.create(URL, method);
        if (body != null)
            req.setData(body);
        Response resp = Sender.create(req).send();
        if (!resp.isOK())
            throw new IllegalArgumentException("resp code=" + resp.getStatus());

        WxResp wxResp =  Json.fromJson(WxResp.class, resp.getReader("UTF-8"));

        //自动刷新token
        if (wxResp.errcode() == Constant.TOKEN_INVALID_CODE) {
            log.warnf("token=%s失效,已自动刷新!", token);
            refresh();
        }

        return wxResp;
    }


    public WxResp media_upload(String type, File f) {
        if(type == null) {
            throw new NullPointerException("media type is NULL");
        } else if(f == null) {
            throw new NullPointerException("meida file is NULL");
        } else {
            String url = String.format("http://api.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s", new Object[]{this.getAccessToken(), type});
            Request req = Request.create(url, Request.METHOD.POST);
            req.getParams().put("media", f);
            Response resp = (new FilePostSender(req)).send();
            if(!resp.isOK()) {
                throw new IllegalStateException("media upload file, resp code=" + resp.getStatus());
            } else {
                WxResp wxResp =  (WxResp)Json.fromJson(WxResp.class, resp.getReader("UTF-8"));
                log.infof("请求url:%s,返回码:%s,返回信息:%s",url, wxResp.errcode(),wxResp.errmsg());
                return wxResp;
            }
        }
    }

    /**
     * 这个地方官方有bug,要post body方式请求
     * @param media_id
     * @return
     */
    public NutResource get_material(String media_id) {
        String url = String.format("https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=%s", getAccessToken());
        Request req = Request.create(url, Request.METHOD.POST);
        NutMap body = new NutMap();
        body.put("media_id", media_id);
        req.setData(Json.toJson(body));
        final Response resp = Sender.create(req).send();
        if (!resp.isOK())
            throw new IllegalStateException("download media file, resp code=" + resp.getStatus());
        String disposition = resp.getHeader().get("Content-disposition");
        return new WxResource(disposition, resp.getStream());
    }

    /**
     * 这个地方官方有bug,要post body方式请求
     * @param media_id
     * @return
     */
    @SuppressWarnings("rawtypes")
    public List<WxArticle> get_material_news(String media_id) {
        try {
            NutMap re = Json.fromJson(NutMap.class, get_material(media_id).getReader());
            List<WxArticle> list = new ArrayList<WxArticle>();
            for (Object obj : re.getAs("news_item", List.class)) {
                list.add(Lang.map2Object((Map) obj, WxArticle.class));
            }
            return list;
        } catch (Exception e) {
            throw Lang.wrapThrow(e);
        }
    }

    static class WxResource extends NutResource {
        String disposition;
        InputStream ins;

        public WxResource(String disposition, InputStream ins) {
            this.disposition = disposition;
            this.ins = ins;
        }

        public String getName() {
            if(this.disposition == null) {
                return "file.data";
            } else {
                String[] var1 = this.disposition.split(";");
                int var2 = var1.length;

                for(int var3 = 0; var3 < var2; ++var3) {
                    String str = var1[var3];
                    str = str.trim();
                    if(str.startsWith("filename=")) {
                        str = str.substring("filename=".length());
                        if(str.startsWith("\"")) {
                            str = str.substring(1);
                        }

                        if(str.endsWith("\"")) {
                            str = str.substring(0, str.length() - 1);
                        }

                        return str.trim().intern();
                    }
                }

                return "file.data";
            }
        }

        public InputStream getInputStream() throws IOException {
            return this.ins;
        }
    }
}

jedisAgent.getResoure 需要回收吗?代理里面没回收

public class WxRedisAccessTokenStore implements WxAccessTokenStore {
    private final static Log log = Logs.get();

    Jedis jedis;
    String wxid;

    public WxRedisAccessTokenStore(String wxid, Jedis jedis) {
        this.wxid = wxid;
        this.jedis = jedis;
    }

    @Override
    public WxAccessToken get() {
        int expires = jedis.ttl(redisTokenKey()).intValue();
        String value = jedis.get(redisTokenKey());
        if (value == null)
            return null;

        WxAccessToken wxAccessToken = Json.fromJson(WxAccessToken.class, value);
        wxAccessToken.setExpires(expires);
        return wxAccessToken;
    }

    private String redisTokenKey() {
        return Constant.CACHE_TOKEN_PREFIX + wxid;
    }

    @Override
    public void save(String token, int expires, long lastCacheTimeMillis) {
        WxAccessToken wxAccessToken = new WxAccessToken();
        wxAccessToken.setLastCacheTimeMillis(lastCacheTimeMillis);
        wxAccessToken.setExpires(expires);
        wxAccessToken.setToken(token);
        String json = Json.toJson(wxAccessToken);
        log.debug("增加缓存key:" + redisTokenKey() + ",value:" + json);
        jedis.setex(redisTokenKey(), expires, json);
    }
}

IocBean(args = {"refer:dao"})
public class WxConfigService extends Service<Wx_config> {

    @Inject
    private JedisAgent jedisAgent;

    public WxConfigService(Dao dao) {
        super(dao);
    }


    /**
     * 自己实现 新增永久图文素材:https://api.weixin.qq.com/cgi-bin/material/add_news?access_token=ACCESS_TOKEN
     * token获取通过redis
     * @param wxid
     * @return
     */
    public WxApi3 getWxApi3(String wxid) {
        Wx_config appInfo = this.fetch(Cnd.where("id", "=", wxid));
        WxApi3 wxApi3 = new WxApi3();
        wxApi3.setAppid(appInfo.getAppid());
        wxApi3.setAppsecret(appInfo.getAppsecret());
        wxApi3.setEncodingAesKey(appInfo.getEncodingAESKey());
        wxApi3.setToken(appInfo.getToken());
        wxApi3.setAccessTokenStore(new WxRedisAccessTokenStore(wxid, jedisAgent.getResource()));
        return wxApi3;
    }

    public WxApi2 getWxApi2(String wxid) {
       Wx_config appInfo = this.fetch(Cnd.where("id", "=", wxid));
        WxApi2Impl wxApi2 = new WxApi2Impl();
        wxApi2.setAppid(appInfo.getAppid());
        wxApi2.setAppsecret(appInfo.getAppsecret());
        wxApi2.setEncodingAesKey(appInfo.getEncodingAESKey());
        wxApi2.setToken(appInfo.getToken());
        return wxApi2;
    }
}

@wendal @Wizzercn 已经证实是redis的问题了,下面已经达到了nutzwk的最大链接100了,我们一个正常机器现在48还能提供服务,是需要释放jedis 还是有bug呢?

[root@iZ2ze6ukmd4cl8b7m5ogx0Z ~]# netstat -anlpt|grep 127.0.0.1:6377|grep 22728/java|wc -l
100
try (Jedis jedis = jedisAgent.getResource()) {
//这样用过才会释放

}

你是说要个变量?

再请教下JedisAgent 怎么转化成JedisPool

好像不可以了获取了,我换个方法实现

感谢两位大佬,升级了,看现在连接没增长,感谢感谢耐心指导

~~~~贴一下NutzWk 4.x/5.x 完整代码:

package cn.wizzer.app.wx.modules.services.impl;

import cn.wizzer.app.web.commons.base.Globals;
import cn.wizzer.framework.base.service.BaseServiceImpl;
import cn.wizzer.app.wx.modules.models.Wx_config;
import cn.wizzer.app.wx.modules.services.WxConfigService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.integration.jedis.RedisService;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.Lang;
import org.nutz.weixin.at.impl.DaoAccessTokenStore;
import org.nutz.weixin.at.impl.RedisAccessTokenStore;
import org.nutz.weixin.impl.WxApi2Impl;
import org.nutz.weixin.spi.WxApi2;
import redis.clients.jedis.JedisPool;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import static org.nutz.integration.jedis.RedisInterceptor.jedis;

/**
 * 如果是集群部署请使用RedisAccessTokenStore
 */
@IocBean(args = {"refer:dao"})
public class WxConfigServiceImpl extends BaseServiceImpl<Wx_config> implements WxConfigService {
    @Inject
    private JedisPool jedisPool;

    public WxConfigServiceImpl(Dao dao) {
        super(dao);
    }

    public synchronized WxApi2 getWxApi2(String wxid) {
        WxApi2Impl wxApi2 = Globals.WxMap.get(wxid);//如果是集群部署请改成redis实现
        if (wxApi2 == null) {
            Wx_config appInfo = this.fetch(Cnd.where("id", "=", wxid));
            RedisAccessTokenStore redisAccessTokenStore = new RedisAccessTokenStore();//如果是集群部署请启用RedisAccessTokenStore
            redisAccessTokenStore.setTokenKey("data:wx_api_token_" + wxid);
            redisAccessTokenStore.setJedisPool(jedisPool);
            wxApi2 = new WxApi2Impl();
            wxApi2.setAppid(appInfo.getAppid());
            wxApi2.setAppsecret(appInfo.getAppsecret());
            wxApi2.setEncodingAesKey(appInfo.getEncodingAESKey());
            wxApi2.setToken(appInfo.getToken());
            wxApi2.setAccessTokenStore(redisAccessTokenStore);
            Globals.WxMap.put(wxid, wxApi2);
        }
        return wxApi2;
    }

}

大赞,4.x,5.x了,辛苦了。建议下,能不能自动切换模式?比如根据配置文件是否集群来决定逻辑,不用自己改

添加回复
请先登陆
回到顶部