NutzCN Logo
问答 linux下dubbo 启动报错
发布于 524天前 作者 tiankongkm 515 次浏览 复制 上一个帖子 下一个帖子
标签:

本地正常启动,但是linux上无法启动

2018-01-17 11:19:33,860 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:157) DEBUG - Get 'dubbo_iobjs'<>
2018-01-17 11:19:33,861 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:183) DEBUG -    >> Load definition name=dubbo_iobjs
2018-01-17 11:19:33,861 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:163) DEBUG - Found IocObject(dubbo_iobjs) in DubboIocLoa
der@1884122755
2018-01-17 11:19:33,861 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:215) DEBUG -    >> Make...'dubbo_iobjs'<>
2018-01-17 11:19:33,861 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dubbo_iobjs' to [app] 
2018-01-17 11:19:33,861 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class java.lang.Object wit
hout AOP
2018-01-17 11:19:33,862 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:157) DEBUG - Get 'dubbo_application'<class com.alibaba.dubbo.config.ApplicationCo
nfig>
2018-01-17 11:19:33,862 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:183) DEBUG -    >> Load definition name=dubbo_application
2018-01-17 11:19:33,862 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:163) DEBUG - Found IocObject(dubbo_application) in Dubbo
IocLoader@1884122755
2018-01-17 11:19:33,862 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:215) DEBUG -    >> Make...'dubbo_application'<class com.alibaba.dubbo.config.Appl
icationConfig>
2018-01-17 11:19:33,862 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dubbo_application' to [app] 
2018-01-17 11:19:33,864 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class com.alibaba.dubbo.co
nfig.ApplicationConfig without AOP
2018-01-17 11:19:33,873 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:157) DEBUG - Get 'dubbo_registry'<class com.alibaba.dubbo.config.RegistryConfig>
2018-01-17 11:19:33,873 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:183) DEBUG -    >> Load definition name=dubbo_registry
2018-01-17 11:19:33,873 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:163) DEBUG - Found IocObject(dubbo_registry) in DubboIoc
Loader@1884122755
2018-01-17 11:19:33,873 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:215) DEBUG -    >> Make...'dubbo_registry'<class com.alibaba.dubbo.config.Registr
yConfig>
2018-01-17 11:19:33,873 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dubbo_registry' to [app] 
2018-01-17 11:19:33,875 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class com.alibaba.dubbo.co
nfig.RegistryConfig without AOP
2018-01-17 11:19:33,893 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:157) DEBUG - Get 'dubbo'<class com.alibaba.dubbo.config.ProtocolConfig>
2018-01-17 11:19:33,893 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:183) DEBUG -    >> Load definition name=dubbo
2018-01-17 11:19:33,893 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:163) DEBUG - Found IocObject(dubbo) in DubboIocLoader@18
84122755
2018-01-17 11:19:33,893 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:215) DEBUG -    >> Make...'dubbo'<class com.alibaba.dubbo.config.ProtocolConfig>
2018-01-17 11:19:33,894 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dubbo' to [app] 
2018-01-17 11:19:33,894 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class com.alibaba.dubbo.co
nfig.ProtocolConfig without AOP
2018-01-17 11:19:33,936 com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:319) WARN  -  [DUBBO] Connection refuse
d (Connection refused), dubbo version: core, current host: 127.0.0.1
java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        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.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:310)
        at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281)
        at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242)
        at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143)
        at org.nutz.integration.dubbo.ServiceBean._init(ServiceBean.java:163)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        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:139)
        at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
        at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
        at org.nutz.integration.dubbo.DubboManager.init(DubboManager.java:21)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        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:139)
        at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
        at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
        at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:152)
        at com.tiankong.core.Server.dubboInit(Server.java:91)
        at com.tiankong.core.Server.init(Server.java:72)
        at com.tiankong.core.DubboStart.main(DubboStart.java:20)
2018-01-17 11:19:34,038 com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtensionClassCode(ExtensionLoader.java:943) DEBUG -  [DU
BBO] package com.alibaba.dubbo.cache;
import com.alibaba.dubbo.common.extension.ExtensionLoader;
public class CacheFactory$Adpative implements com.alibaba.dubbo.cache.CacheFactory {
public com.alibaba.dubbo.cache.Cache getCache(com.alibaba.dubbo.common.URL arg0) {
if (arg0 == null) throw new IllegalArgumentException("url == null");
com.alibaba.dubbo.common.URL url = arg0;
5 回复

注册服务得先启动

@wendal 这个问题我很费解 本地项目连接zookeeper没问题,但是我发到测试环境(和zookeeper在同一台机器),项目起来以后zookeeper进程直接没了,然后我再启动zookeeper,项目能正常运行,这是什么原因,为啥zookeeper会掉?本地启动,zookeeper不会掉。。
下面是zookeeper启动日志。。

2018-01-17 14:15:23,442 [myid:] - INFO  [main:QuorumPeerConfig@134] - Reading configuration from: /workspace/software/zookeeper/bin/../conf/zoo.cf
g
2018-01-17 14:15:23,445 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2018-01-17 14:15:23,445 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2018-01-17 14:15:23,445 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2018-01-17 14:15:23,446 [myid:] - WARN  [main:QuorumPeerMain@113] - Either no config or no quorum defined in config, running  in standalone mode
2018-01-17 14:15:23,455 [myid:] - INFO  [main:QuorumPeerConfig@134] - Reading configuration from: /workspace/software/zookeeper/bin/../conf/zoo.cf
g
2018-01-17 14:15:23,455 [myid:] - INFO  [main:ZooKeeperServerMain@96] - Starting server
2018-01-17 14:15:23,461 [myid:] - INFO  [main:Environment@100] - Server environment:zookeeper.version=3.4.10-39d3a4f269333c922ed3db283be479f9deaca
a0f, built on 03/23/2017 10:13 GMT
2018-01-17 14:15:23,461 [myid:] - INFO  [main:Environment@100] - Server environment:host.name=localhost
2018-01-17 14:15:23,461 [myid:] - INFO  [main:Environment@100] - Server environment:java.version=1.8.0_151
2018-01-17 14:15:23,461 [myid:] - INFO  [main:Environment@100] - Server environment:java.vendor=Oracle Corporation
2018-01-17 14:15:23,461 [myid:] - INFO  [main:Environment@100] - Server environment:java.home=/workspace/software/java/jre
2018-01-17 14:15:23,462 [myid:] - INFO  [main:Environment@100] - Server environment:java.class.path=/workspace/software/zookeeper/bin/../build/cla
sses:/workspace/software/zookeeper/bin/../build/lib/*.jar:/workspace/software/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/workspace/software/zoo
keeper/bin/../lib/slf4j-api-1.6.1.jar:/workspace/software/zookeeper/bin/../lib/netty-3.10.5.Final.jar:/workspace/software/zookeeper/bin/../lib/log
4j-1.2.16.jar:/workspace/software/zookeeper/bin/../lib/jline-0.9.94.jar:/workspace/software/zookeeper/bin/../zookeeper-3.4.10.jar:/workspace/softw
are/zookeeper/bin/../src/java/lib/*.jar:/workspace/software/zookeeper/bin/../conf:.:/workspace/software/java/lib/dt.jar:/workspace/software/java/l
ib/tools.jar
2018-01-17 14:15:23,462 [myid:] - INFO  [main:Environment@100] - Server environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib
64:/lib:/usr/lib
2018-01-17 14:15:23,462 [myid:] - INFO  [main:Environment@100] - Server environment:java.io.tmpdir=/tmp
2018-01-17 14:15:23,462 [myid:] - INFO  [main:Environment@100] - Server environment:java.compiler=<NA>
2018-01-17 14:15:23,463 [myid:] - INFO  [main:Environment@100] - Server environment:os.name=Linux
2018-01-17 14:15:23,463 [myid:] - INFO  [main:Environment@100] - Server environment:os.arch=amd64
2018-01-17 14:15:23,463 [myid:] - INFO  [main:Environment@100] - Server environment:os.version=4.4.0-109-generic
2018-01-17 14:15:23,463 [myid:] - INFO  [main:Environment@100] - Server environment:user.name=root
2018-01-17 14:15:23,463 [myid:] - INFO  [main:Environment@100] - Server environment:user.home=/root
2018-01-17 14:15:23,463 [myid:] - INFO  [main:Environment@100] - Server environment:user.dir=/workspace/software/zookeeper/bin
2018-01-17 14:15:23,468 [myid:] - INFO  [main:ZooKeeperServer@829] - tickTime set to 2000
2018-01-17 14:15:23,469 [myid:] - INFO  [main:ZooKeeperServer@838] - minSessionTimeout set to -1
2018-01-17 14:15:23,469 [myid:] - INFO  [main:ZooKeeperServer@847] - maxSessionTimeout set to -1
2018-01-17 14:15:23,476 [myid:] - INFO  [main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:2181

如何启动的? nohup ?

@wendal 直接 ./zkServer.sh start 和 nohup ./zkServer.sh start &都试过了。。

@wendal 好像是启动脚本的问题, 控制台直接 nohup java -jar core.jar >> start.log &没问题

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