tomcat与dubbo接口集群问题

tomcat1里面调用dubbo1接口,tomcat2里面调用dubbo2接口,tomcat1和2启动后,有时访问不了dubbo接口,停掉一个tomcat就好了,再启动停掉的就好了

1个回答

你们并发大吗?是不是并发量设置小了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
启动tomcat 报dubbo端口号冲突

启动tomcat ,同时会报下面的错误 14:56:08.607 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader - Context initialization failed com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://172.16.0.62:21889/com.winit.sms.spi.base.customeracct.CustomerAcctService?anyhost=true&application=sms&channel.readonly.sent=true&codec=dubbo&default.cluster=failover&default.executes=500&default.loadbalance=random&default.retries=0&default.service.filter=dubboProviderFilter&default.timeout=60000&default.validation=true&dispatcher=all&dubbo=2.8.3&dynamic=true&generic=false&heartbeat=60000&interface=com.winit.sms.spi.base.customeracct.CustomerAcctService&methods=queryCustomerAcctById,queryCustomerAcctByBpartnerCode,createCustomerAcct,pageCustomerAcct,modifyCustomerAcct&organization=winit&owner=liuyan.chen&pid=14588&revision=1.21.6.NewWorldPhase2.SNAPSHOT&side=provider&threadpool=limited&threads=300&timestamp=1453791368562&version=5.0.0) Failed to bind NettyServer on /172.16.0.62:21889, cause: Failed to bind to: /0.0.0.0:21889 at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:331) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:308) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:258) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:489) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109) ~[dubbo-2.8.3.jar:2.8.3] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) ~[spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003) [catalina.jar:7.0.65] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517) [catalina.jar:7.0.65] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.65] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.65] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.65] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) [catalina.jar:7.0.65] at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263) [catalina.jar:7.0.65] at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1978) [catalina.jar:7.0.65] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_80] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80] Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /172.16.0.62:21889, cause: Failed to bind to: /0.0.0.0:21889 at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:72) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.transport.netty.NettyServer.<init>(NettyServer.java:63) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:33) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.Transporter$Adpative.bind(Transporter$Adpative.java) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:48) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:41) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:63) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:329) ~[dubbo-2.8.3.jar:2.8.3] ... 35 common frames omitted Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:21889 at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303) ~[netty-3.2.5.Final.jar:na] at com.alibaba.dubbo.remoting.transport.netty.NettyServer.doOpen(NettyServer.java:94) ~[dubbo-2.8.3.jar:2.8.3] at com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:67) ~[dubbo-2.8.3.jar:2.8.3] ... 42 common frames omitted Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_80] at sun.nio.ch.Net.bind(Net.java:463) ~[na:1.7.0_80] at sun.nio.ch.Net.bind(Net.java:455) ~[na:1.7.0_80] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.7.0_80] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.7.0_80] at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:148) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:100) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:74) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.Channels.bind(Channels.java:468) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:192) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:348) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:176) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:85) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:142) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:90) ~[netty-3.2.5.Final.jar:na] at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:282) ~[netty-3.2.5.Final.jar:na] ... 44 common frames omitted

关于在tomcat中启动dubbo

https://www.cnblogs.com/qingdaofu/p/7214547.html 这是我看的教程网站,为什么我把war放到webapp下以后启动只能访问tomcat的主页 而不能访问dubbo的求解。弄了一晚上了 ![图片说明](https://img-ask.csdn.net/upload/201804/14/1523669831_197484.jpg) ![图片说明](https://img-ask.csdn.net/upload/201804/14/1523669863_686400.jpg) ![图片说明](https://img-ask.csdn.net/upload/201804/14/1523669918_803930.jpg) ![图片说明](https://img-ask.csdn.net/upload/201804/14/1523669878_438260.jpg)

用使用过Dubbo的大神吗?Dubbo接口的授权一般是怎么做的?

如题,用使用过Dubbo的大神吗?Dubbo接口的授权一般是怎么做的?比如发布了一个接口,这个接口必须是符合某种规则的用户才能调用,有没有这种统一的实现方式呢?还是说都是在消费者调用之前先做好判断再调用服务提供者,他们之间是完全可信的!所有的权限判断都交给调用方先处理掉?求大神解答。

swagger怎么生成dubbo接口的文档,求指教

现在有一个模块是dubbo的provider,想生成provider的接口文档,不知道swagger能不能实现,求各位大佬指点

使用dubbo时,zookeeper做集群有意义吗?

最近项目中使用dubbo+zookeeper,zookeeper做了集群配置,有3个节点nodeA,nodeB,nodeC,三个节点配置完毕启动成功,但是项目项启动时,只向其中一个节点注册服务,如果把注册服务的节点停掉,消费者启动时会找不到服务。 问题: 1、zookeeper做了集群以后,数据是否会自动同步,比如注册到一个节以后,另外两个节到是否也会有同样的注册信息存在? 2、如果项目启动时,dubbo只向主节点中注册服务,那么主节点宕掉,其它节点没法有数据,那么zookeeper做集群有什么意义? 谢谢!

java tomcat dubbo服务关闭失败

25-Dec-2019 13:10:35.326 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance. 25-Dec-2019 13:10:35.328 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8050"] 25-Dec-2019 13:10:35.332 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8059"] 25-Dec-2019 13:10:35.333 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina] 25-Dec-2019 13:10:35.384 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 25-Dec-2019 13:10:45.373 INFO [localhost-startStop-1-SendThread(172.30.1.172:2181)] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1175) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) at ch.qos.logback.classic.LoggerContext.noAppenderDefinedWarning(LoggerContext.java:186) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:264) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) at ch.qos.logback.classic.Logger.debug(Logger.java:482) at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:742) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:94) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) 25-Dec-2019 13:10:45.377 INFO [localhost-startStop-1-SendThread(172.30.1.172:2181)] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1175) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) at ch.qos.logback.classic.Logger.warn(Logger.java:692) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162)

tomcat启动时Dubbo注册zookeeper的信息刷的很慢

最近tomcat启动时Dubbo注册zookeeper的信息刷的很慢,而且tomcat启动时间越来越长,查看zookeeper.out,几乎1秒钟刷新一条信息。将zookeeper的地址换成其他可以正常启动项目的机器,一样很慢。而且同一台电脑上的其他项目在注册zookeeper时速度很快。 跪求大神解答

zookeeper+dubbo+tomcat启动tomcat失败

1、启动时显示的日志 INFO logger.LoggerFactory - using logger: com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter ERROR common.Version - [DUBBO] Duplicate class com/alibaba/dubbo/common/Version.class in 2 jar [file:/data/rdc/rdc/tools/normal-app/apache-tomcat-7.0.32/webapps/dubbo-admin-2.8.3/WEB-INF/lib/dubbo-2.8.3.jar!/com/alibaba/dubbo/common/Version.class, file:/data/rdc/rdc/tools/normal-app/apache-tomcat-7.0.32/webapps/dubbo-admin-2.8.3/WEB-INF/lib/dubbo-common-2.8.3.jar!/com/alibaba/dubbo/common/Version.class], dubbo version: 2.8.3, current host: 127.0.0.1 ERROR common.Version - [DUBBO] Duplicate class com/alibaba/dubbo/config/spring/schema/DubboNamespaceHandler.class in 2 jar [file:/data/rdc/rdc/tools/normal-app/apache-tomcat-7.0.32/webapps/dubbo-admin-2.8.3/WEB-INF/lib/dubbo-2.8.3.jar!/com/alibaba/dubbo/config/spring/schema/DubboNamespaceHandler.class, file:/data/rdc/rdc/tools/normal-app/apache-tomcat-7.0.32/webapps/dubbo-admin-2.8.3/WEB-INF/lib/dubbo-config-spring-2.8.3.jar!/com/alibaba/dubbo/config/spring/schema/DubboNamespaceHandler.class], dubbo version: 2.8.3, current host: 127.0.0.1 INFO config.PropertyPlaceholderConfigurer - Loading properties file from Resource[/WEB-INF/dubbo.properties, loaded by ResourceLoadingService] INFO config.PropertyPlaceholderConfigurer - Loading properties file from URL [file:/home/rdc/dubbo.properties] WARN config.PropertyPlaceholderConfigurer - Could not load properties from URL [file:/home/rdc/dubbo.properties]: /home/rdc/dubbo.properties (No such file or directory) INFO config.WebxConfiguration - Application is running in Production Mode. INFO upload.UploadService - Upload Parameters: { Repository Path = /data/rdc/rdc/tools/normal-app/apache-tomcat-7.0.32/temp Maximum Request Size = 5M Maximum File Size = n/a Threshold before Writing to File = 10K Keep Form Field in Memory = false File Name Key = [ [1/1] filename ] } INFO context.WebxComponentsContext - Bean '(inner bean)#28fca922' of type [class com.alibaba.citrus.springext.util.SpringExtUtil$ConstructorArg] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFO context.WebxComponentsContext - Bean 'dubbo-admin' of type [class com.alibaba.dubbo.config.ApplicationConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFO context.WebxComponentsContext - Bean 'com.alibaba.dubbo.config.RegistryConfig' of type [class com.alibaba.dubbo.config.RegistryConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFO context.WebxComponentsContext - Bean 'registryService' of type [class com.alibaba.dubbo.config.spring.ReferenceBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFO context.WebxComponentsContext - Bean '(inner bean)#28fca922' of type [class com.alibaba.citrus.webx.config.impl.WebxConfigurationImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) INFO context.InheritableListableBeanFactory - Pre-instantiating singletons in com.alibaba.citrus.springext.support.context.InheritableListableBeanFactory@7eb88bc8: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,com.alibaba.citrus.service.configuration.support.PropertyPlaceholderConfigurer#0,templateService,mappingRuleService,dataResolverService,exceptionPipeline,resourceLoadingService,messageSource,uriBrokerService,restfulRewrite,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dubbo-admin,com.alibaba.dubbo.config.RegistryConfig,registryService,configService,consumerService,overrideService,ownerService,providerService,routeService,userService,governanceCache,productionModeSensiblePostProcessor,webxConfiguration,requestContexts,com.alibaba.citrus.service.requestcontext.impl.RequestContextBeanFactoryPostProcessor#0,uploadService,pullService,formService,module.screen.Error404,module.screen.ErrorOther,moduleLoaderService,messageResourceService,com.alibaba.citrus.webx.context.WebxComponentsLoader$WebxComponentsCreator,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy INFO velocity.VelocityEngine - SpringResourceLoaderAdapter : initialization starting. INFO velocity.VelocityEngine - SpringResourceLoaderAdapter : set path '/templates/common/' INFO velocity.VelocityEngine - SpringResourceLoaderAdapter : initialization complete. INFO rule.ExtensionMappingRule - Initialized extension.input:ExtensionMappingRule with cache disabled INFO rule.ExtensionMappingRule - Initialized extension.output:ExtensionMappingRule with cache disabled INFO rule.DirectModuleMappingRule - Initialized action:DirectModuleMappingRule with cache disabled INFO rule.DirectModuleMappingRule - Initialized screen.notemplate:DirectModuleMappingRule with cache disabled INFO rule.FallbackModuleMappingRule - Initialized screen:FallbackModuleMappingRule with cache enabled INFO rule.DirectTemplateMappingRule - Initialized screen.template:DirectTemplateMappingRule with cache disabled INFO rule.FallbackTemplateMappingRule - Initialized layout.template:FallbackTemplateMappingRule with cache enabled INFO rule.DirectModuleMappingRule - Initialized control.notemplate:DirectModuleMappingRule with cache disabled INFO rule.FallbackModuleMappingRule - Initialized control:FallbackModuleMappingRule with cache enabled INFO rule.DirectTemplateMappingRule - Initialized control.template:DirectTemplateMappingRule with cache disabled INFO zkclient.ZkEventThread - Starting ZkClient event thread. 请问这是什么情况?大神。。。。。

同一个tomcat下部署的多个war包下的dubbo服务无法访问

同一个tomcat下,部署多个war,每个war有自己的dubbo服务提供者,端口是20880,20881,20882,启动后只有20880可以访问到,其他的访问不到。如果tomcat下单独部署任何一个war,这个war的dubbo端口就可以访问到,这是什么原因?

dubbo发布到tomcat7之后无法访问,提示404,日志显示启动报错

发布在webapps目录下 ![图片说明](https://img-ask.csdn.net/upload/201705/26/1495762983_598664.png) 但访问报错 ![图片说明](https://img-ask.csdn.net/upload/201705/26/1495763091_616601.png) 8080可以正常访问,而且manager app下显示/dubbo的running状态为false ![图片说明](https://img-ask.csdn.net/upload/201705/26/1495763585_835885.png) 启动日志如下: May 26, 2017 1:10:34 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() May 26, 2017 1:10:34 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() May 26, 2017 1:10:34 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCa che', 'org.apache.jasper.compiler.TldLocationsCache@5fdddbf6') May 26, 2017 1:10:38 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing log4j system May 26, 2017 1:10:38 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext May 26, 2017 1:10:47 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.alibaba.citrus.webx.context.WebxContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean wit h name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type [com. alibaba.citrus.service.uribroker.impl.URIBrokerServiceImpl$URIBrokerInfo] while setting bean property 'brokers' with key [0]; nested exception is org.springfram ework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#25': Cannot create inner bean 'server' of type [com.alibaba.citrus.servic e.uribroker.uri.GenericURIBroker] while setting constructor argument; nested exc eption is org.springframework.beans.factory.BeanCreationException: Error creatin g bean with name 'server': Error setting property values; nested exception is or g.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or has an invalid setter method. Does the pa rameter type of the setter match the return type of the getter? at org.springframework.beans.factory.support.BeanDefinitionValueResolver .resolveInnerBean(BeanDefinitionValueResolver.java:230) at org.springframework.beans.factory.support.BeanDefinitionValueResolver .resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) at org.springframework.beans.factory.support.BeanDefinitionValueResolver .resolveManagedList(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver .resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) "localhost.2017-05-26.log" 362L, 43836C 1,1 Top May 26, 2017 1:10:34 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() May 26, 2017 1:10:34 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() May 26, 2017 1:10:34 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@5fdddbf6') May 26, 2017 1:10:38 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing log4j system May 26, 2017 1:10:38 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext May 26, 2017 1:10:47 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.alibaba.citrus.webx.context.WebxContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type [com.alibaba.citrus.service.uribroker.impl.URIBrokerServiceImpl$URIBrokerInfo] while setting bean property 'brokers' with key [0]; nested exception is or g.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#25': Cannot create inner bean 'server' of type [com.ali baba.citrus.service.uribroker.uri.GenericURIBroker] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreation Exception: Error creating bean with name 'server': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcepti on: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or has a n invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) 求大神们帮忙看看什么情况 (zookeeper已经启动了)

新手使用dubbo,启动tomcat后无报错,访问页面为什么是这样的

页面如图:![图片说明](https://img-ask.csdn.net/upload/201809/18/1537271766_672802.png) 页面源码是正常的 ![图片说明](https://img-ask.csdn.net/upload/201809/18/1537271775_662924.png) tomcat只有一个警告: Setting property 'source' to 'org.eclipse.jst.jee.server:ycslypt_web' did not find a matching property.

python3.x 实现dubbo接口RPC协议自动化测试运行报错:argument should be integer or bytes-like object, not 'str'

``` #!/usr/bin/env python # -*- coding: utf-8 -*- import json import socket import telnetlib class dubbo: # 定义私有属性 __init = False __encoding = "utf8" __finish = 'dubbo>' __connect_timeout = 10 __read_timeout = 10 # 定义构造方法 def __init__(self, host, port): self.host = host self.port = port if host is not None and port is not None: self.__init = True def set_finish(self, finish): ''' defualt is ``dubbo>`` ''' self.__finish = finish def set_encoding(self, encoding): ''' If ``result retured by dubbo`` is a ``str`` instance and is encoded with an ASCII based encoding other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name must be specified. Encodings that are not ASCII based (such as UCS-2) are not allowed and should be decoded to ``unicode`` first. ''' self.__encoding = encoding def set_connect_timeout(self, timeout): ''' Defines a timeout for establishing a connection with a dubbo server. It should be noted that this timeout cannot usually exceed 75 seconds. defualt is ``10`` ''' self.__connect_timeout = timeout def set_read_timeout(self, timeout): ''' Defines a timeout for reading a response expected from the dubbo server. defualt is ``10`` ''' self.__read_timeout = timeout def do(self, command): # 连接Telnet服务器 try: tn = telnetlib.Telnet(host=self.host, port=self.port, timeout=self.__connect_timeout) except socket.error as err: print("[host:%s port:%s] %s" % (self.host, self.port, err)) return # 触发doubble提示符 tn.write(b'\n') # 执行命令 tn.read_until(self.__finish.encode(), timeout=self.__read_timeout) # tn.write('%s\n' % command) tn.write(command.encode() + b"\n") # 获取结果 data = '' while data.find(self.__finish) == -1: data = tn.read_very_eager() data = data.split("\n") data = json.loads(data[0], encoding=self.__encoding) tn.close() # tn.write('exit\n') return data def invoke(self, interface, method, param): cmd = "%s %s.%s(%s)" % ('invoke', interface, method, param) return self.do(cmd) def connect(host, port): return dubbo(host, port) if __name__ == '__main__': Host = '192.168.0.56' # Doubble服务器IP Port = 20884 # Doubble服务端口 # 初始化dubbo对象 conn = dubbo(Host, Port) # 设置telnet连接超时时间 conn.set_connect_timeout(10) # 设置dubbo服务返回响应的编码 conn.set_encoding('utf-8') interface = 'com.tz.course.stub.service.ICoursePackageFacadeAPI' method = 'checkCourseStatusByCourseIds' param = '{"courseIds": "9765", "userId": "56645"}' print(conn.invoke(interface, method, param)) command = 'invoke com.tz.course.stub.service.ICoursePackageFacadeAPI.checkCourseStatusByCourseIds({"courseIds": "9765", "userId": "56645"})' print(conn.do(command)) ``` ``` #coding=utf8 import sys from kazoo.client import KazooClient import urllib import urllib3 import json import telnetlib import socket import dubbo_telnet Host = '192.168.0.54:2181' # zookeeper的地址 def coondoubble_data(servhost, servport,interface,method,param): try: # 初始化dubbo对象 conn = dubbo_telnet.connect(servhost, servport) # 设置telnet连接超时时间 conn.set_connect_timeout(10) # 设置dubbo服务返回响应的编码 conn.set_encoding('utf-8') # print("interface:" + interface, "method:" + method, "param:" + param) data = conn.invoke(interface, method, param) return data except Exception as e: raise e def get_dubbo_full(): global Host zk = KazooClient(hosts="{}".format(Host)) zk.start() urls = [] list = zk.get_children("dubbo") for i in list: if 'serv' in i: #关键字过滤 # print i try: gg = zk.get_children("/dubbo/{}/providers".format(i)) if gg: for j in gg: url = urllib.parse.unquote(j) if url.startswith('dubbo:'): urls.append(url.split('?')[0].split('dubbo://')[1]) except Exception as e: print(e) print(i) services = {} for i in urls: try: path, service = i.split('/') if not services.get(path): services.update({path: []}) services[path].append(service) except Exception as e: pass print(json.dumps(services, indent=4)) def get_dubbo(servername): global Host zk = KazooClient(hosts="{}".format(Host)) zk.start() urls = [] lists = zk.get_children("dubbo") for i in lists: if servername in i: try: # 获取服务发布方 gg = zk.get_children("/dubbo/{}/providers".format(i)) if gg: for j in gg: url = urllib.parse.unquote(j) if url.startswith('dubbo:'): urls.append(url.split('dubbo://')[1]) except Exception as e: print(e) paths=[] for i in urls: try: path, temp = i.split('/') service_name = temp.split('?')[0] method_name = temp.split('methods=')[1].split('&')[0].split(',') paths.append(path) except Exception as e: print(e) services = {"service_name": service_name, "paths": paths, "method_name": method_name} print(services) return services print(json.dumps(services, indent=4)) if __name__ == '__main__': #使用方法get_dubbo('<服务名>') result = get_dubbo("com.tz.course.stub.service.IAccessFacadeAPI") rs = result["paths"][0] print(rs) servhost, servport = rs.split(':') servport = int(servport) interface = "com.tz.edu.power.stub.ListenAccessCacheFacadeAPI" method = "getListenCourseAccess" param = '{"382","2157306"}' #get_dubbo('com.tz.edu.power.stub.AccessTuneLogAPI') #param='''{"batSubmitId":null, "logonId":"8ybbmd01.c.0200", "len":"20", "groupId":"020090006110982", "start":"0", "logonLevel":"3", "limitSum1":"40000", "limitSum":"90000000000000000", "endTime":"20200101", "beginTime":"20190101", "batFileName":null, "channelFlag":"1"}''' # #使用方法coondoubble_data('服务提供者ip','服务提供者port','服务名','调用方法','发送数据') # #'服务提供者ip','服务提供者port','服务名','调用方法'从get_dubbo()返回结果中获取 resp = coondoubble_data(servhost, servport, interface, method, param) print(resp) ```

dubbo 消费方,如何将接口dubbo,注入到service或者dao层

由于项目需要,想在controller层以外的地方使用dubbo远程接口,发现只能在controller注入成功,在其他地方注入为null,希望各位大神指点一二. 不胜感激****

tomcat9启动项目报错,与dubbo有关

16-May-2019 21:58:47.411 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/sns-server-producer] startup failed due to previous errors 16-May-2019 21:58:47.424 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [sns-server-producer] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) 16-May-2019 21:58:47.425 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [sns-server-producer] appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) 16-May-2019 21:58:47.425 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [sns-server-producer] appears to have started a thread named [Redis-PSubscribe-__keyspace@0__:*-4f3b015b-dab7-4b61-a80c-c78b021b4401] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.socketRead(SocketInputStream.java:116) java.net.SocketInputStream.read(SocketInputStream.java:171) java.net.SocketInputStream.read(SocketInputStream.java:141) java.net.SocketInputStream.read(SocketInputStream.java:127) redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:195) redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) redis.clients.jedis.Protocol.process(Protocol.java:132) redis.clients.jedis.Protocol.read(Protocol.java:196) redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:288) redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:233) redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:108) redis.clients.jedis.JedisPubSub.proceedWithPatterns(JedisPubSub.java:95) redis.clients.jedis.Jedis.psubscribe(Jedis.java:2608) cn.com.yusys.redis.client.template.JedisPoolSubTemplate$SubListener.run(JedisPoolSubTemplate.java:254) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) 16-May-2019 21:58:47.426 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [sns-server-producer] appears to have started a thread named [DubboSaveRegistryCache-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) 16-May-2019 21:58:47.434 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/sns-server-producer.war] has finished in [5,604] ms 16-May-2019 21:58:47.435 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/docs] 16-May-2019 21:58:47.458 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/docs] has finished in [23] ms 16-May-2019 21:58:47.458 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/examples] 16-May-2019 21:58:47.562 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/examples] has finished in [104] ms 16-May-2019 21:58:47.562 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/ROOT] 16-May-2019 21:58:47.574 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/ROOT] has finished in [11] ms 16-May-2019 21:58:47.574 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/manager] 16-May-2019 21:58:47.591 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/manager] has finished in [17] ms 16-May-2019 21:58:47.592 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/host-manager] 16-May-2019 21:58:47.605 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/sns/tomcat/apache-tomcat-9.0.12-8180/webapps/host-manager] has finished in [12] ms 16-May-2019 21:58:47.607 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8180"] 16-May-2019 21:58:47.614 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8109"] 16-May-2019 21:58:47.622 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 5832 ms 16-May-2019 21:59:17.154 INFO [pool-1-thread-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [cn.com.yusys.redis.registry.dubbo.RedisZkClient$1$1]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [cn.com.yusys.redis.registry.dubbo.RedisZkClient$1$1]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1329) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1317) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1176) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138) at cn.com.yusys.redis.registry.dubbo.RedisZkClient$1.run(RedisZkClient.java:169) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 16-May-2019 21:59:47.367 INFO [Redis-PSubscribe-__keyspace@0__:*-4f3b015b-dab7-4b61-a80c-c78b021b4401] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [cn.com.yusys.redis.client.template.JedisPoolSubTemplate$SubListener$1]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

dubbo服务接口公共模块需要定义实体类吗

如果需要定义的话 那使用hibernate的项目怎么定义,实现接口的那个模块还需要定义实体类吗

dubbo服务端有返回,客户端接收到null的问题【紧急】

### 现象 服务端日志已经显示返回结果,结果为自定义对象 格式如下: ``` AcctQueryFacadeImpl.acctBalanceQuery00, resp=AcctBalanceQuery00Resp[uid=1355739,acctStatus=N,createTime=Fri Mar 04 21:36:31 CST 2016,updateTime=Wed Apr 20 19:52:24 CST 2016,acctId=4985191,balance=0,frozenBalance=0,withdrawBalance=0,respDesc=成功,respCode=000000], time=2ms ``` 客户端接收到的对象为null 该现象并不是必现, - 现象1:调用acctBalanceQuery00方法一天有几十万次,目前出现问题的仅3例 - 现象2:有2条失败数据,重试之后,1条成功,1条仍然失败 - 现象3:很多业务调用acctBalanceQuery00方法,但目前只有1个业务出问题,这些业务入参基本一样,(此现象也许是巧合) - 现象4:用dubbo telnet invoke acctBalanceQuery00方法,有结果返回,用出问题的数据invoke,也有结果返回,所有机器都试过 ### 环境 jdk1.8 dubbo版本 2.5.3 服务端4台,客户端10台左右 dubbo服务端配置如下: ``` <dubbo:application name="xxx" owner="yy"/> <dubbo:registry protocol="zookeeper" client="zkclient" address="${dubbo.zk.servers}" group="${dubbo.zk.group}"></dubbo:registry> <dubbo:protocol name="dubbo" port="20909"></dubbo:protocol> <dubbo:provider retries="0" timeout="6000"></dubbo:provider> <dubbo:service interface="xxxx" ref="xxx"></dubbo:service> ``` dubbo消费端配置: ``` <dubbo:application name="${application.name}" owner="${dubbo.application.owner}"/> <dubbo:registry protocol="zookeeper" client="zkclient" address="${dubbo.zk.servers}" group="${dubbo.zk.group}"></dubbo:registry> <dubbo:protocol name="dubbo" port="${dubbo.protocol.port}"></dubbo:protocol> <dubbo:monitor address="${dubbo.monitor.address}"></dubbo:monitor> <dubbo:consumer retries="0" timeout="6000" check="false"></dubbo:consumer> ```

启动zookeeper和tomcat9,但是dubbo-admin-2.5.4.war无法启动?

1.zookeeper版本是zookeeper-3.4.6.tar.gz tomcat9 linux版本 jdk12版本 dubbo-admin-2.5.4.war 2.查看tomcat日志如下: ![图片说明](https://img-ask.csdn.net/upload/201910/01/1569861568_432238.png) ![图片说明](https://img-ask.csdn.net/upload/201910/01/1569861579_579114.png) ![图片说明](https://img-ask.csdn.net/upload/201910/01/1569861598_466721.png) ![图片说明](https://img-ask.csdn.net/upload/201910/01/1569861607_33485.png) 谢谢大家!

关于dubbo跟zk中a服务访问b集群的问题

如题,现在有一个a服务访问b,但是b是集群的,那么a访问哪个b是在哪里决定的呢, 是在zk里面计算的还是在a处还是在b。

Nginx、redis集群、zookeeper、dubbo、solr集群五者有什么关联?

这几天在研究Nginx、redis集群、zookeeper、dubbo、solr集群网上的写的有点乱, 请哪位大神给小弟详细的说一下他们五者之间的关系尽可能详细一点!小弟万分感谢!

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

ArrayList源码分析(入门篇)

ArrayList源码分析 前言: 写这篇博客的主要原因是,在我上一次参加千牵科技Java实习生面试时,有被面试官问到ArrayList为什么查找的速度较快,插入和删除的速度较慢?当时我回答得不好,很大的一部分原因是因为我没有阅读过ArrayList源码,虽然最后收到Offer了,但我拒绝了,打算寒假学得再深入些再广泛些,下学期开学后再去投递其他更好的公司。为了更加深入理解ArrayList,也为

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

玩转springboot启动banner定义所得

最近接手了一个springboot项目,不是不熟悉这个框架,启动时打印的信息吸引了我。 这不是我熟悉的常用springboot的打印信息啊,我打开自己的项目: 还真是的,不用默认的感觉也挺高大上的。一时兴起,就去研究了一下源代码,还正是有些收获,稍后我会总结一下。正常情况下做为一个老程序员,是不会对这种小儿科感兴趣的,不就是一个控制台打印嘛。哈哈! 于是出于最初的好奇,研究了项目的源代码。看到

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

你打算用Java 8一辈子都不打算升级到Java 14,真香

我们程序员应该抱着尝鲜、猎奇的心态,否则就容易固步自封,技术停滞不前。

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

立即提问
相关内容推荐