dubbo+zookeeper对8080端口的占用问题
作者:互联网
dubbo的注册中心和zookeeper里都有jetty的成分,jetty的默认端口又是8080,当二者与springboot进行整合时,springboot内置的tomcat的端口8080就会被jetty占用。
如果尝试使用命令来杀死8080所在进程,那杀死的八成是zookeeper的服务。
为了解决jetty的问题需要同时对dubbo注册中心和zookeeper的配置文件同时进行更改。
首先说dubbo的注册中心路径:
dubbo-admin\incubator-dubbo-ops-master\dubbo-monitor-simple
通过使用dubbo注册中心的常规操作,来看一下注册中心里的jetty是怎么占用端口号,从最开始使用注册中心说起:
需要来到dubbo-monitor-simple文件夹下,接着cmd进入命令模式:
这时会生成target文件夹
打开target
解压dubbo-monitor-simple-2.0.0的压缩包产生dubbo-monitor-simple-2.0.0,
之后复制dubbo-monitor-simple-2.0.0到incubator-dubbo-ops-master文件夹下
打开dubbo-monitor-simple-2.0.0,找到conf配置文件,修改jetty服务器的端口号为8081,如下:
这样做是为了避免当注册中心启动jetty服务器时与tomcat8080端口冲突。
接下来修改zookeeper,知道它占用了8080端口号,因为我提供服务的应用点击运行总是被提示这样的信息:
The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/YZ/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/YZ/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.logger.LoggerFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 2020-03-31 11:14:42.705 INFO 13756 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener : :: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project :: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo :: Google group : dev@dubbo.incubator.apache.org 2020-03-31 11:14:42.717 INFO 13756 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.name=user-service-provider, dubbo.monitor.protocol=registry, dubbo.protocol.name=dubbo, dubbo.protocol.port=-1, dubbo.registry.address=127.0.0.1:2181, dubbo.registry.protocol=zookeeper} . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.0.4.RELEASE) 2020-03-31 11:14:42.993 INFO 13756 --- [ main] SpringbootUserserviceProviderApplication : Starting SpringbootUserserviceProviderApplication on DESKTOP-NF046H7 with PID 13756 (D:\workspace\springboot\springboot-userservice-provider\target\classes started by YZ in D:\workspace\springboot\springboot-userservice-provider) 2020-03-31 11:14:42.995 INFO 13756 --- [ main] SpringbootUserserviceProviderApplication : No active profile set, falling back to default profiles: default 2020-03-31 11:14:43.128 INFO 13756 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6c80d78a: startup date [Tue Mar 31 11:14:43 CST 2020]; root of context hierarchy 2020-03-31 11:14:44.355 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ApplicationConfig#0, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered. 2020-03-31 11:14:44.360 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] has been registered. 2020-03-31 11:14:44.360 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.RegistryConfig#0, class : com.alibaba.dubbo.config.RegistryConfig] has been registered. 2020-03-31 11:14:44.360 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.RegistryConfig#0] has been registered. 2020-03-31 11:14:44.361 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ProtocolConfig#0, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered. 2020-03-31 11:14:44.361 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] has been registered. 2020-03-31 11:14:44.361 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.MonitorConfig#0, class : com.alibaba.dubbo.config.MonitorConfig] has been registered. 2020-03-31 11:14:44.362 INFO 13756 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.MonitorConfig#0] has been registered. 2020-03-31 11:14:45.488 INFO 13756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' of type [com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$e765c6a5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-03-31 11:14:45.521 INFO 13756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-03-31 11:14:45.524 INFO 13756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-03-31 11:14:45.528 INFO 13756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-03-31 11:14:45.530 INFO 13756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-03-31 11:14:46.672 INFO 13756 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2020-03-31 11:14:46.740 INFO 13756 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2020-03-31 11:14:46.740 INFO 13756 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.32 2020-03-31 11:14:46.762 INFO 13756 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_172\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/lib/amd64;C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.5_Tomcat8.5\bin;C:\Program Files (x86)\mysql-5.5.48-winx64\bin;C:\Program Files\Java\jdk1.8.0_172\bin;D:\oracle\product\10.2.0\db_1\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\maven\apache-maven-3.3.9\bin;D:\maven\apache-maven-3.3.9\bin;D:\Devinstall\Subversion\bin;C:\Program Files\nodejs\;D:\Program Files\nodejs\node_global;C:\Users\YZ\AppData\Local\Microsoft\WindowsApps;C:\Users\YZ\AppData\Roaming\npm;D:\YDYP\eclipse_new\eclipse_jee_oxygen_win_64;;.] 2020-03-31 11:14:47.093 INFO 13756 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2020-03-31 11:14:47.093 INFO 13756 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3971 ms 2020-03-31 11:14:47.257 INFO 13756 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/] 2020-03-31 11:14:47.278 INFO 13756 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*] 2020-03-31 11:14:47.278 INFO 13756 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 2020-03-31 11:14:47.279 INFO 13756 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*] 2020-03-31 11:14:47.280 INFO 13756 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*] 2020-03-31 11:14:47.412 INFO 13756 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] have been binding by prefix of configuration properties : dubbo.application 2020-03-31 11:14:47.432 INFO 13756 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.RegistryConfig#0] have been binding by prefix of configuration properties : dubbo.registry 2020-03-31 11:14:47.457 INFO 13756 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] have been binding by prefix of configuration properties : dubbo.protocol 2020-03-31 11:14:47.479 INFO 13756 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.MonitorConfig#0] have been binding by prefix of configuration properties : dubbo.monitor 2020-03-31 11:14:47.709 INFO 13756 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2020-03-31 11:14:48.066 INFO 13756 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6c80d78a: startup date [Tue Mar 31 11:14:43 CST 2020]; root of context hierarchy 2020-03-31 11:14:48.438 INFO 13756 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2020-03-31 11:14:48.441 INFO 13756 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2020-03-31 11:14:48.498 INFO 13756 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2020-03-31 11:14:48.499 INFO 13756 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2020-03-31 11:14:49.909 INFO 13756 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2020-03-31 11:14:50.494 INFO 13756 --- [ main] o.a.c.f.imps.CuratorFrameworkImpl : Starting 2020-03-31 11:14:59.583 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT 2020-03-31 11:14:59.584 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:host.name=DESKTOP-NF046H7 2020-03-31 11:14:59.584 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.version=1.8.0_172 2020-03-31 11:14:59.584 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.vendor=Oracle Corporation 2020-03-31 11:14:59.584 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.home=C:\Program Files\Java\jdk1.8.0_172\jre 2020-03-31 11:14:59.585 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.class.path=C:\Program Files\Java\jdk1.8.0_172\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_172\jre\lib\ext\zipfs.jar;D:\workspace\springboot\springboot-userservice-provider\target\classes;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot-starter\2.0.4.RELEASE\spring-boot-starter-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot\2.0.4.RELEASE\spring-boot-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.4.RELEASE\spring-boot-autoconfigure-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.0.4.RELEASE\spring-boot-starter-logging-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\YZ\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\YZ\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;C:\Users\YZ\.m2\repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;C:\Users\YZ\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\YZ\.m2\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-core\5.0.8.RELEASE\spring-core-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-jcl\5.0.8.RELEASE\spring-jcl-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\workspace\springboot\mall_interface\target\classes;C:\Users\YZ\.m2\repository\com\alibaba\dubbo\2.6.2\dubbo-2.6.2.jar;C:\Users\YZ\.m2\repository\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;C:\Users\YZ\.m2\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;C:\Users\YZ\.m2\repository\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;C:\Users\YZ\.m2\repository\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;C:\Users\YZ\.m2\repository\com\google\guava\guava\16.0.1\guava-16.0.1.jar;C:\Users\YZ\.m2\repository\com\alibaba\boot\dubbo-spring-boot-starter\0.2.0\dubbo-spring-boot-starter-0.2.0.jar;C:\Users\YZ\.m2\repository\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;C:\Users\YZ\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;C:\Users\YZ\.m2\repository\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;C:\Users\YZ\.m2\repository\com\alibaba\boot\dubbo-spring-boot-autoconfigure\0.2.0\dubbo-spring-boot-autoconfigure-0.2.0.jar;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.0.4.RELEASE\spring-boot-starter-web-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.0.4.RELEASE\spring-boot-starter-json-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;C:\Users\YZ\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;C:\Users\YZ\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;C:\Users\YZ\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.6\jackson-datatype-jdk8-2.9.6.jar;C:\Users\YZ\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.6\jackson-datatype-jsr310-2.9.6.jar;C:\Users\YZ\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.6\jackson-module-parameter-names-2.9.6.jar;C:\Users\YZ\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.4.RELEASE\spring-boot-starter-tomcat-2.0.4.RELEASE.jar;C:\Users\YZ\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.32\tomcat-embed-core-8.5.32.jar;C:\Users\YZ\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.32\tomcat-embed-el-8.5.32.jar;C:\Users\YZ\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.32\tomcat-embed-websocket-8.5.32.jar;C:\Users\YZ\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.11.Final\hibernate-validator-6.0.11.Final.jar;C:\Users\YZ\.m2\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;C:\Users\YZ\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;C:\Users\YZ\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;C:\Users\YZ\.m2\repository\redis\clients\jedis\2.9.0\jedis-2.9.0.jar;C:\Users\YZ\.m2\repository\org\apache\commons\commons-pool2\2.5.0\commons-pool2-2.5.0.jar;C:\Users\YZ\.m2\repository\org\apache\solr\solr-solrj\6.6.5\solr-solrj-6.6.5.jar;C:\Users\YZ\.m2\repository\commons-io\commons-io\2.5\commons-io-2.5.jar;C:\Users\YZ\.m2\repository\org\apache\commons\commons-math3\3.4.1\commons-math3-3.4.1.jar;C:\Users\YZ\.m2\repository\org\apache\httpcomponents\httpclient\4.5.6\httpclient-4.5.6.jar;C:\Users\YZ\.m2\repository\org\apache\httpcomponents\httpcore\4.4.10\httpcore-4.4.10.jar;C:\Users\YZ\.m2\repository\org\apache\httpcomponents\httpmime\4.5.6\httpmime-4.5.6.jar;C:\Users\YZ\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;C:\Users\YZ\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;C:\Users\YZ\.m2\repository\org\noggit\noggit\0.6\noggit-0.6.jar;C:\Users\YZ\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\YZ\.m2\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar;C:\Users\YZ\.m2\repository\com\mchange\c3p0\0.9.2\c3p0-0.9.2.jar;C:\Users\YZ\.m2\repository\com\mchange\mchange-commons-java\0.2.3.3\mchange-commons-java-0.2.3.3.jar;C:\Users\YZ\.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;C:\Users\YZ\.m2\repository\commons-pool\commons-pool\1.6\commons-pool-1.6.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-context\5.0.8.RELEASE\spring-context-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-aop\5.0.8.RELEASE\spring-aop-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-beans\5.0.8.RELEASE\spring-beans-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-expression\5.0.8.RELEASE\spring-expression-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-jdbc\5.0.8.RELEASE\spring-jdbc-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-orm\5.0.8.RELEASE\spring-orm-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\mybatis\mybatis\3.2.8\mybatis-3.2.8.jar;C:\Users\YZ\.m2\repository\org\mybatis\mybatis-spring\1.2.2\mybatis-spring-1.2.2.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-web\5.0.8.RELEASE\spring-web-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-webmvc\5.0.8.RELEASE\spring-webmvc-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\jstl\jstl\1.2\jstl-1.2.jar;C:\Users\YZ\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\YZ\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\YZ\.m2\repository\org\slf4j\slf4j-log4j12\1.7.25\slf4j-log4j12-1.7.25.jar;C:\Users\YZ\.m2\repository\cglib\cglib\2.2\cglib-2.2.jar;C:\Users\YZ\.m2\repository\asm\asm\3.1\asm-3.1.jar;C:\Users\YZ\.m2\repository\commons-fileupload\commons-fileupload\1.3.1\commons-fileupload-1.3.1.jar;C:\Users\YZ\.m2\repository\com\google\code\gson\gson\2.8.5\gson-2.8.5.jar;C:\Users\YZ\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.11\jackson-mapper-asl-1.9.11.jar;C:\Users\YZ\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.11\jackson-core-asl-1.9.11.jar;C:\Users\YZ\.m2\repository\commons-collections\commons-collections\3.1\commons-collections-3.1.jar;C:\Users\YZ\.m2\repository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;C:\Users\YZ\.m2\repository\javax\mail\mail\1.4.7\mail-1.4.7.jar;C:\Users\YZ\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\YZ\.m2\repository\net\sf\json-lib\json-lib\2.4\json-lib-2.4-jdk15.jar;C:\Users\YZ\.m2\repository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;C:\Users\YZ\.m2\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;C:\Users\YZ\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\YZ\.m2\repository\net\sf\ezmorph\ezmorph\1.0.6\ezmorph-1.0.6.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-frontend-jaxws\3.0.5\cxf-rt-frontend-jaxws-3.0.5.jar;C:\Users\YZ\.m2\repository\xml-resolver\xml-resolver\1.2\xml-resolver-1.2.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-core\3.0.5\cxf-core-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\ws\xmlschema\xmlschema-core\2.2.1\xmlschema-core-2.2.1.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-bindings-soap\3.0.5\cxf-rt-bindings-soap-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-wsdl\3.0.5\cxf-rt-wsdl-3.0.5.jar;C:\Users\YZ\.m2\repository\wsdl4j\wsdl4j\1.6.3\wsdl4j-1.6.3.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-databinding-jaxb\3.0.5\cxf-rt-databinding-jaxb-3.0.5.jar;C:\Users\YZ\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.11\jaxb-impl-2.2.11.jar;C:\Users\YZ\.m2\repository\com\sun\xml\bind\jaxb-core\2.2.11\jaxb-core-2.2.11.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-bindings-xml\3.0.5\cxf-rt-bindings-xml-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-frontend-simple\3.0.5\cxf-rt-frontend-simple-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-ws-addr\3.0.5\cxf-rt-ws-addr-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-ws-policy\3.0.5\cxf-rt-ws-policy-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-transports-http\3.0.5\cxf-rt-transports-http-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-ws-security\3.0.5\cxf-rt-ws-security-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\cxf\cxf-rt-security\3.0.5\cxf-rt-security-3.0.5.jar;C:\Users\YZ\.m2\repository\org\apache\wss4j\wss4j-ws-security-common\2.0.4\wss4j-ws-security-common-2.0.4.jar;C:\Users\YZ\.m2\repository\org\apache\santuario\xmlsec\2.0.4\xmlsec-2.0.4.jar;C:\Users\YZ\.m2\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;C:\Users\YZ\.m2\repository\org\opensaml\opensaml\2.6.1\opensaml-2.6.1.jar;C:\Users\YZ\.m2\repository\org\opensaml\openws\1.5.1\openws-1.5.1.jar;C:\Users\YZ\.m2\repository\org\opensaml\xmltooling\1.4.1\xmltooling-1.4.1.jar;C:\Users\YZ\.m2\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;C:\Users\YZ\.m2\repository\org\jasypt\jasypt\1.9.2\jasypt-1.9.2.jar;C:\Users\YZ\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\YZ\.m2\repository\net\sf\ehcache\ehcache\2.10.5\ehcache-2.10.5.jar;C:\Users\YZ\.m2\repository\org\apache\wss4j\wss4j-ws-security-dom\2.0.4\wss4j-ws-security-dom-2.0.4.jar;C:\Users\YZ\.m2\repository\org\apache\wss4j\wss4j-policy\2.0.4\wss4j-policy-2.0.4.jar;C:\Users\YZ\.m2\repository\org\apache\neethi\neethi\3.0.3\neethi-3.0.3.jar;C:\Users\YZ\.m2\repository\org\apache\wss4j\wss4j-ws-security-stax\2.0.4\wss4j-ws-security-stax-2.0.4.jar;C:\Users\YZ\.m2\repository\org\apache\wss4j\wss4j-bindings\2.0.4\wss4j-bindings-2.0.4.jar;C:\Users\YZ\.m2\repository\org\apache\wss4j\wss4j-ws-security-policy-stax\2.0.4\wss4j-ws-security-policy-stax-2.0.4.jar;C:\Users\YZ\.m2\repository\org\apache\ws\security\wss4j\1.5.2\wss4j-1.5.2.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-tx\5.0.8.RELEASE\spring-tx-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\springframework\spring-aspects\5.0.8.RELEASE\spring-aspects-5.0.8.RELEASE.jar;C:\Users\YZ\.m2\repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;C:\Users\YZ\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar 2020-03-31 11:14:59.586 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.library.path=C:\Program Files\Java\jdk1.8.0_172\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/lib/amd64;C:\Program Files (x86)\Apache Software Foundation\Tomcat 8.5_Tomcat8.5\bin;C:\Program Files (x86)\mysql-5.5.48-winx64\bin;C:\Program Files\Java\jdk1.8.0_172\bin;D:\oracle\product\10.2.0\db_1\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\maven\apache-maven-3.3.9\bin;D:\maven\apache-maven-3.3.9\bin;D:\Devinstall\Subversion\bin;C:\Program Files\nodejs\;D:\Program Files\nodejs\node_global;C:\Users\YZ\AppData\Local\Microsoft\WindowsApps;C:\Users\YZ\AppData\Roaming\npm;D:\YDYP\eclipse_new\eclipse_jee_oxygen_win_64;;. 2020-03-31 11:14:59.587 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.io.tmpdir=C:\Users\YZ\AppData\Local\Temp\ 2020-03-31 11:14:59.587 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:java.compiler=<NA> 2020-03-31 11:14:59.587 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.name=Windows 10 2020-03-31 11:14:59.587 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.arch=amd64 2020-03-31 11:14:59.587 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:os.version=10.0 2020-03-31 11:14:59.587 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.name=YZ 2020-03-31 11:14:59.588 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.home=C:\Users\YZ 2020-03-31 11:14:59.588 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Client environment:user.dir=D:\workspace\springboot\springboot-userservice-provider 2020-03-31 11:14:59.592 INFO 13756 --- [ main] org.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@3fe46690 2020-03-31 11:14:59.613 INFO 13756 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-31 11:14:59.615 INFO 13756 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session 2020-03-31 11:14:59.655 INFO 13756 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x1001a4123af0003, negotiated timeout = 40000 2020-03-31 11:14:59.664 INFO 13756 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager : State change: CONNECTED 2020-03-31 11:14:59.830 ERROR 13756 --- [ main] o.apache.catalina.core.StandardService : Failed to start connector [Connector[HTTP/1.1-8080]] org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.32.jar:8.5.32] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.32.jar:8.5.32] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:256) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:198) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:300) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at com.changping.mall.SpringbootUserserviceProviderApplication.main(SpringbootUserserviceProviderApplication.java:9) [classes/:na] Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1020) ~[tomcat-embed-core-8.5.32.jar:8.5.32] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.32.jar:8.5.32] ... 13 common frames omitted Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_172] at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_172] at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_172] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_172] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_172] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-embed-core-8.5.32.jar:8.5.32] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150) ~[tomcat-embed-core-8.5.32.jar:8.5.32] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591) ~[tomcat-embed-core-8.5.32.jar:8.5.32] at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018) ~[tomcat-embed-core-8.5.32.jar:8.5.32] ... 14 common frames omitted 2020-03-31 11:14:59.847 INFO 13756 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2020-03-31 11:14:59.904 INFO 13756 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-03-31 11:14:59.908 ERROR 13756 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured. Action: Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port. 2020-03-31 11:14:59.918 INFO 13756 --- [ main] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6c80d78a: startup date [Tue Mar 31 11:14:43 CST 2020]; root of context hierarchy 2020-03-31 11:14:59.930 INFO 13756 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown 2020-03-31 11:14:59.935 INFO 13756 --- [ main] f.a.ReferenceAnnotationBeanPostProcessor : class com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying! 2020-03-31 11:14:59.985 INFO 13756 --- [tor-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl : backgroundOperationsLoop exiting 2020-03-31 11:15:00.014 INFO 13756 --- [bboShutdownHook] org.apache.zookeeper.ZooKeeper : Session: 0x1001a4123af0003 closed 2020-03-31 11:15:00.019 INFO 13756 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn : EventThread shut down for session: 0x1001a4123af0003
而我每次用命令先查看8080的进程
接着杀死进程
可是每次关闭进程,zookeeper的服务也被关闭了,不知道为什么会这样,一开始我想zookeeper没有道理占用8080端口。
一想到8080端口,我又想起一件怪事,就是之前dubbo里监控台所用的jetty端口号被改成8081,可以访问。这就是奇怪的地方,分明端口号已经不再是8080,却显示jetty在占用8080。
如图jetty可以在8081访问:
可是同时这里又显示8080被jetty所占用,那这个jetty是怎么回事儿?
于是查了百度,有人给出了答案,就是zookeeper里从新版本开始内置了jetty,所以是zookeeper里还有jetty在占用8080端口。
解决方法,修改zookeeper的配置文件zoo.cfg:
添加一条配置信息:admin.serverPort=8080
修改之后看看效果:
首先关闭之前的zookeeper服务,就是关闭终端,之后通过命令重新启动zkServer.cmd
再次访问8080端口:
很好,无法访问说明zookeeper里的jetty不再占用8080端口号了,暗自佩服zookeer里jettty隐藏的好深、毫无征兆,看来一切都因为自己安装最新版的zookeeper惹的祸。
那我的提供者是否恢复、可以通过tomcat的8080端口启动了呢?
如图,启动提供者应用后,访问监控中心显示已经有提供者了,恢复了正常。
就这样吧,虽然花了点时间,但是还是有所收获>>>
标签:dubbo,8080,Users,repository,zookeeper,jar,YZ,m2,org 来源: https://www.cnblogs.com/timingstarts/p/12604211.html