@
xuxueli #5
xxl-job-admin 有 2 个地方会初始化 rpc,一个地方传入了端口 0,rpc 就会使用默认的 7080,报错信息如下
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxlJobScheduler' defined in URL [jar:file:/usr/local/hosjoy/xxl-job-admin/xxl-job-admin.jar!/BOOT-INF/classes!/com/xxl/job/admin/core/conf/XxlJobScheduler.class]: Invocation of init method failed; nested exception is com.xxl.rpc.util.XxlRpcException: xxl-rpc provider port[7080] is used.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:124)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at com.xxl.job.admin.XxlJobAdminApplication.main(XxlJobAdminApplication.java:13)
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.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: com.xxl.rpc.util.XxlRpcException: xxl-rpc provider port[7080] is used.
at com.xxl.rpc.remoting.provider.XxlRpcProviderFactory.initConfig(XxlRpcProviderFactory.java:75)
at com.xxl.job.admin.core.conf.XxlJobScheduler.initRpcProvider(XxlJobScheduler.java:92)
at com.xxl.job.admin.core.conf.XxlJobScheduler.afterPropertiesSet(XxlJobScheduler.java:52)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1688)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626)
... 24 common frames omitted