请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

provider启动成功,但启动时consumer遇到问题。已解决

serviceAPI路径相同,在provider正常启动后,consumer端启动报错如下:

路径相同的serviceAPI

图片描述

↑↑提示:java.lang.AbstractMethodError: null

图片描述

另外,附上文件列表

图片描述

我在网上搜了一下,也没有解决了😥

谢谢老师

完整报错如下:

2021-05-14 18:00:03.714  INFO 12824 --- [           main] c.a.dubbo.common.logger.LoggerFactory    : using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter

  ████████▄  ███    █▄  ▀█████████▄  ▀█████████▄   ▄██████▄  
  ███   ▀███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ███    ███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ███    ███ ███    ███  ▄███▄▄▄██▀   ▄███▄▄▄██▀  ███    ███ 
  ███    ███ ███    ███ ▀▀███▀▀▀██▄  ▀▀███▀▀▀██▄  ███    ███ 
  ███    ███ ███    ███   ███    ██▄   ███    ██▄ ███    ███ 
  ███   ▄███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ████████▀  ████████▀  ▄█████████▀  ▄█████████▀   ▀██████▀  
                                                             

 :: Dubbo ::        (v2.6.0)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.4.5)

2021-05-14 18:00:03.792  INFO 12824 --- [           main] c.g.s.d.d.consumer.ConsumerApplication   : Starting ConsumerApplication using Java 1.8.0_111 on DESKTOP-EKND9R1 with PID 12824 (D:\workspace7\20210514微服务学习\springboot-dubbo\consumer\target\classes started by 10030 in D:\workspace7\20210514微服务学习\springboot-dubbo)
2021-05-14 18:00:03.792  INFO 12824 --- [           main] c.g.s.d.d.consumer.ConsumerApplication   : No active profile set, falling back to default profiles: default
2021-05-14 18:00:04.643  INFO 12824 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.dubbo-com.alibaba.dubbo.spring.boot.DubboProperties' of type [com.alibaba.dubbo.spring.boot.DubboProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-05-14 18:00:04.643  INFO 12824 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration' of type [com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$$EnhancerBySpringCGLIB$$caace05c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-05-14 18:00:04.832  INFO 12824 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-05-14 18:00:04.848  INFO 12824 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-05-14 18:00:04.848  INFO 12824 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.45]
2021-05-14 18:00:04.944  INFO 12824 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-05-14 18:00:04.944  INFO 12824 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1100 ms
2021-05-14 18:00:05.229  INFO 12824 --- [           main] c.a.d.remoting.transport.AbstractClient  :  [DUBBO] Successed connect to server /192.168.200.1:20880 from NettyClient 192.168.200.1 using dubbo version 2.6.0, channel is NettyChannel [channel=[id: 0x76c52298, /192.168.200.1:8282 => /192.168.200.1:20880]], dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.229  INFO 12824 --- [           main] c.a.d.remoting.transport.AbstractClient  :  [DUBBO] Start NettyClient DESKTOP-EKND9R1/192.168.200.1 connect to the server /192.168.200.1:20880, dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.245  INFO 12824 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Refer dubbo service com.gyp.springboot.dubbo.demo.ServiceAPI from url dubbo://localhost:20880/com.gyp.springboot.dubbo.demo.ServiceAPI?application=dubbo-spring-boot-starter-consumer&dubbo=2.6.0&interface=com.gyp.springboot.dubbo.demo.ServiceAPI&methods=sendMsg&pid=12824&register.ip=192.168.200.1&side=consumer&timestamp=1620986405134, dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.326  INFO 12824 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-05-14 18:00:05.521  INFO 12824 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2021-05-14 18:00:05.536  WARN 12824 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use
2021-05-14 18:00:05.536  INFO 12824 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2021-05-14 18:00:05.536  INFO 12824 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-05-14 18:00:05.552 ERROR 12824 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Failed to destroy the filter named [Tomcat WebSocket (JSR356) Filter] of type [org.apache.tomcat.websocket.server.WsFilter]

java.lang.AbstractMethodError: null
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:301) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4598) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5410) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_111]
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_111]
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:497) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:982) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:496) [tomcat-embed-core-9.0.45.jar:9.0.45]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stopTomcat(TomcatWebServer.java:273) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stop(TomcatWebServer.java:331) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:149) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:782) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:774) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:339) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340) [spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) [spring-boot-2.4.5.jar:2.4.5]
	at com.gyp.springboot.dubbo.demo.consumer.ConsumerApplication.main(ConsumerApplication.java:14) [classes/:na]

2021-05-14 18:00:05.568  INFO 12824 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-05-14 18:00:05.583 ERROR 12824 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.

2021-05-14 18:00:05.583  INFO 12824 --- [bboShutdownHook] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Run shutdown hook now., dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.583  INFO 12824 --- [bboShutdownHook] c.a.d.r.support.AbstractRegistryFactory  :  [DUBBO] Close all registries [], dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.583  INFO 12824 --- [bboShutdownHook] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] Close dubbo connect: /192.168.200.1:8282-->/192.168.200.1:20880, dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.583  INFO 12824 --- [bboShutdownHook] c.a.d.r.transport.netty.NettyChannel     :  [DUBBO] Close netty channel [id: 0x76c52298, /192.168.200.1:8282 => /192.168.200.1:20880], dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.583  INFO 12824 --- [andler-thread-1] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] disconected from /192.168.200.1:20880,url:dubbo://localhost:20880/com.gyp.springboot.dubbo.demo.ServiceAPI?application=dubbo-spring-boot-starter-consumer&codec=dubbo&dubbo=2.6.0&heartbeat=60000&interface=com.gyp.springboot.dubbo.demo.ServiceAPI&methods=sendMsg&pid=12824&register.ip=192.168.200.1&side=consumer&timestamp=1620986405134, dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.583  INFO 12824 --- [bboShutdownHook] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] Close dubbo connect: 192.168.200.1:0-->localhost:20880, dubbo version: 2.6.0, current host: 192.168.200.1
2021-05-14 18:00:05.583  INFO 12824 --- [bboShutdownHook] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] Destroy reference: dubbo://localhost:20880/com.gyp.springboot.dubbo.demo.ServiceAPI?application=dubbo-spring-boot-starter-consumer&dubbo=2.6.0&interface=com.gyp.springboot.dubbo.demo.ServiceAPI&methods=sendMsg&pid=12824&register.ip=192.168.200.1&side=consumer&timestamp=1620986405134, dubbo version: 2.6.0, current host: 192.168.200.1

另外,在consumer启动并报错后,provider端也有提示,如下(重点是最后两行)

2021-05-14 18:05:04.895  INFO 13136 --- [           main] c.g.s.d.d.provider.ProviderApplication   : Starting ProviderApplication using Java 1.8.0_111 on DESKTOP-EKND9R1 with PID 13136 (D:\workspace7\20210514微服务学习\springboot-dubbo\provider\target\classes started by 10030 in D:\workspace7\20210514微服务学习\springboot-dubbo)
2021-05-14 18:05:04.895  INFO 13136 --- [           main] c.g.s.d.d.provider.ProviderApplication   : No active profile set, falling back to default profiles: default
2021-05-14 18:05:05.675  INFO 13136 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.dubbo-com.alibaba.dubbo.spring.boot.DubboProperties' of type [com.alibaba.dubbo.spring.boot.DubboProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-05-14 18:05:05.675  INFO 13136 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration' of type [com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$$EnhancerBySpringCGLIB$$ce418ff7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-05-14 18:05:05.844  INFO 13136 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-05-14 18:05:05.860  INFO 13136 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-05-14 18:05:05.860  INFO 13136 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.45]
2021-05-14 18:05:05.938  INFO 13136 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-05-14 18:05:05.938  INFO 13136 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 980 ms
2021-05-14 18:05:06.128  INFO 13136 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-05-14 18:05:06.339  INFO 13136 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Export dubbo service com.gyp.springboot.dubbo.demo.ServiceAPI to local registry, dubbo version: 2.6.0, current host: 127.0.0.1
2021-05-14 18:05:06.339  INFO 13136 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Export dubbo service com.gyp.springboot.dubbo.demo.ServiceAPI to url dubbo://192.168.200.1:20880/com.gyp.springboot.dubbo.demo.ServiceAPI?anyhost=true&application=dubbo-spring-boot-starter&bind.ip=192.168.200.1&bind.port=20880&dubbo=2.6.0&generic=false&interface=com.gyp.springboot.dubbo.demo.ServiceAPI&methods=sendMsg&pid=13136&side=provider&timestamp=1620986706301, dubbo version: 2.6.0, current host: 127.0.0.1
2021-05-14 18:05:06.419  INFO 13136 --- [           main] c.a.d.remoting.transport.AbstractServer  :  [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /192.168.200.1:20880, dubbo version: 2.6.0, current host: 127.0.0.1
2021-05-14 18:05:06.482  INFO 13136 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2021-05-14 18:05:06.498  INFO 13136 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-05-14 18:05:06.513  INFO 13136 --- [           main] c.g.s.d.d.provider.ProviderApplication   : Started ProviderApplication in 2.089 seconds (JVM running for 3.074)
2021-05-14 18:05:22.060  WARN 13136 --- [ver worker #1-1] c.a.d.remoting.transport.AbstractServer  :  [DUBBO] All clients has discontected from /192.168.200.1:20880. You can graceful shutdown now., dubbo version: 2.6.0, current host: 127.0.0.1
2021-05-14 18:05:22.060  INFO 13136 --- [:20880-thread-2] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] disconected from /192.168.200.1:8571,url:dubbo://192.168.200.1:20880/com.gyp.springboot.dubbo.demo.ServiceAPI?anyhost=true&application=dubbo-spring-boot-starter&bind.ip=192.168.200.1&bind.port=20880&channel.readonly.sent=true&codec=dubbo&dubbo=2.6.0&generic=false&heartbeat=60000&interface=com.gyp.springboot.dubbo.demo.ServiceAPI&methods=sendMsg&pid=13136&side=provider&timestamp=1620986706301, dubbo version: 2.6.0, current host: 127.0.0.1

正在回答 回答被采纳积分+3

2回答

Allen 2021-05-15 14:16:14

看你群里的消息是解决了是么

0 回复 有任何疑惑可以回复我~
  • 提问者 慕UI0546731 #1
    嗯嗯解决了
    回复 有任何疑惑可以回复我~ 2021-05-15 14:31:28
提问者 慕UI0546731 2021-05-14 20:17:35

解决了。

佛了。。。。。

竟然只需要在consumer端加一个配置,server.port=8081就行。

因为provider端是8080,启动consumer默认也是8080,俩冲突,导致consumer启不起来

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信