NutzCN Logo
问答 dubbo的问题请教一下
发布于 2841天前 作者 chafferer 4245 次浏览 复制 上一个帖子 下一个帖子
标签:

用了nutzmore里面的dubbo插件在本地测试环境已经完全可以运行了,但是用了远程的服务器之后就报出了下面的问题,远程服务器的端口和zookeeper都正常运行着,端口也开了可以telnet得通

三月 13, 2017 4:51:22 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: [dubboManager, me.cdroid.dubbo.service.DubboTestService] # FAIL to create Ioc Bean name=[me.cdroid.dubbo.service.DubboTestService]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:17)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:990)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:197)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
	at me.cdroid.nutz.mvc.CdroidNutFilter.init(CdroidNutFilter.java:25)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4797)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5473)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.ioc.IocException: [dubboManager, me.cdroid.dubbo.service.DubboTestService] # FAIL to create Ioc Bean name=[me.cdroid.dubbo.service.DubboTestService]
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.integration.dubbo.DubboManager.init(DubboManager.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
	at me.cdroid.nutz.MainSetup.init(MainSetup.java:32)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	... 16 more
Caused by: org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000
	at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:876)
	at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:98)
	at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:92)
	at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:80)
	at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.<init>(ZkclientZookeeperClient.java:29)
	at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperTransporter.connect(ZkclientZookeeperTransporter.java:10)
	at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adpative.connect(ZookeeperTransporter$Adpative.java)
	at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.<init>(ZookeeperRegistry.java:69)
	at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:37)
	at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:94)
	at com.alibaba.dubbo.registry.RegistryFactory$Adpative.getRegistry(RegistryFactory$Adpative.java)
	at com.alibaba.dubbo.registry.integration.RegistryProtocol.getRegistry(RegistryProtocol.java:190)
	at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:109)
	at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53)
	at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java)
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:489)
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285)
	at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246)
	at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145)
	at org.nutz.integration.dubbo.ServiceBean._init(ServiceBean.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 32 more

三月 13, 2017 4:51:22 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
三月 13, 2017 4:51:22 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/hello-provider] startup failed due to previous errors
三月 13, 2017 4:51:22 下午 org.apache.catalina.core.ApplicationContext log
信息: Cleaning up Shiro Environment
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/hello-provider] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/hello-provider] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [New I/O worker #1] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [New I/O worker #2] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [New I/O worker #3] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [New I/O worker #4] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [New I/O worker #5] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [New I/O server boss #6] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [dubbo-remoting-server-heartbeat-thread-1] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] 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.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hello-provider] appears to have started a thread named [localhost-startStop-1-SendThread(10.1.16.63:8089)] but has failed to stop it. This is very likely to create a memory leak.
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/hello-provider] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@384266b5]) and a value of type [java.lang.Class] (value [class me.cdroid.dubbo.service.DubboTestServiceImpl]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
三月 13, 2017 4:51:23 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
三月 13, 2017 4:51:23 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
三月 13, 2017 4:51:23 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 15099 ms
三月 13, 2017 4:51:23 下午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already.  Could not load org.apache.zookeeper.server.ZooTrace.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1588)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1196)

[ERROR] 16:51:23.058 org.apache.zookeeper.ClientCnxn$1.uncaughtException(ClientCnxn.java:422) - from localhost-startStop-1-SendThread(10.1.16.63:8089)
java.lang.NoClassDefFoundError: org/apache/zookeeper/server/ZooTrace
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1196)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.ZooTrace
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
	... 1 more

7 回复
Unable to connect to zookeeper server within timeout: 5000
	at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:876)

zookeeper在哪个服务器上?看上去是连不上zookeeper所在的服务器哦

@wendal 但是我本地另外一个dubbox工程直接就连上了。。。

@chafferer 你本地能连,跟该服务器是否能连,有什么关联性呢?他们处于同一个内网?在该服务器上能telnet通zookeeper服务器?

@wendal 我本地有两个工程,一个是dubbox的工程,一个是nutz-dubbo的,然后dubbox那个可以连得上服务器,nutz-dubbo连不上,所以我很困惑啊。telnet没问题。我在想是不是timeout时间太短

都是写ip吗?有时候dns也会卡壳

@wendal 恩,都是ip。 看来是网络不咋地,timeout写了20000,成功连上了~ 不好意思兽总

... 网络那么差

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