NutzCN Logo
精华 部署nutzbook问题
发布于 3095天前 作者 qq_0f18c1df 2768 次浏览 复制 上一个帖子 下一个帖子
标签:

部署nutzbook没有安装redis能运行吗? 去掉了yvr模块的一些代码,登录后报错


请求的路径: /nutzbook/admin/login 异常堆栈如下: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at redis.clients.util.Pool.getResource(Pool.java:53) at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99) at net.wendal.nutzbook.mvc.DailyUniqueUsersProcessor.process(DailyUniqueUsersProcessor.java:27) at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) at net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:19) at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) 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:198) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) 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.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:672) 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) Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect at redis.clients.jedis.Connection.connect(Connection.java:164) at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:80) at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1677) at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87) at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at redis.clients.util.Pool.getResource(Pool.java:49) ... 38 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at redis.clients.jedis.Connection.connect(Connection.java:158) ... 45 more
7 回复

禁用 DailyUniqueUsersProcessor 应该是可以的, 还有redis相关的aop

谢谢,我现在安装了reids,启动报错

严重: Error during ServletContainerInitializer processing
javax.servlet.ServletException: javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/yvr/topic/socket] : existing endpoint was class net.wendal.nutzbook.module.yvr.YvrTopicWebSocket and new endpoint is class net.wendal.nutzbook.module.WebsocketTopic
	at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:123)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5261)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/yvr/topic/socket] : existing endpoint was class net.wendal.nutzbook.module.yvr.YvrTopicWebSocket and new endpoint is class net.wendal.nutzbook.module.WebsocketTopic
	at org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:225)
	at org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:279)
	at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:120)
	... 8 more

@ServerEndpoint(value = "/yvr/topic/socket")
public class WebsocketTopic extends Endpoint {

@ServerEndpoint("/yvr/topic/socket")
public class YvrTopicWebSocket {

是不是这边有什么问题

@qq_0f18c1df 前面那个是@rekoe 加的,貌似tomcat需要继承才认

@wendal tomcat8或以上,不需要这个功能就删掉咯

@wendal
@qq_0f18c1df
修复了一下 pull 下试试

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