springboot adminServer2.0+部署踩坑记

1,441 阅读3分钟

本次部署springboot adminServer的版本是2.3.0

一、 前情提要

整个项目的搭建,很简单,不必多说,主要说一下这次部署踩到的一个坑,记录一下,也为可能遇到的提供参考,具体报错信息如下:

2020-10-26 17:50:44.732 INFO 10 --- [nio-8080-exec-2] o.apache.tomcat.util.http.parser.Cookie : A cookie header was received [1591853885,1591853965] that contained an invalid cookie. That cookie will be ignored.
Note: further occurrences of this error will be logged at DEBUG level.
2020-10-26 17:52:10.194 WARN 10 --- [or-http-epoll-2] r.netty.http.client.HttpClientConnect : [id: 0x395cbceb, L:/localhost:50462 ! R:localhost/localhost:8080] The connection observed an error

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

2020-10-26 17:52:10.199 INFO 10 --- [or-http-epoll-2] d.c.b.a.server.services.StatusUpdater : Couldn't retrieve status for Instance(id=b8ab0fba8c14, version=2, registration=Registration(name=ump-sms-customer, managementUrl=http://localhost:8080/actuator, healthUrl=http://localhost:8080/actuator/health, serviceUrl=http://localhost:8080/, source=http-api), registered=true, statusInfo=StatusInfo(status=UP, details={nacosConfig={status=UP}, binders={status=UP, details={rabbit={status=UP, details={binderHealthIndicator={status=UP, details={version=3.7.9}}}}}}, diskSpace={status=UP, details={total=10718543872, free=10124865536, threshold=10485760}}, rabbit={status=UP, details={version=3.7.9}}, refreshScope={status=UP}, db={status=UP, details={dataSourceFirst={status=UP, details={database=MySQL, hello=1}}, dataSourceSecond={status=UP, details={database=Oracle, hello=Hello}}}}, redis={status=UP, details={version=2.8.23}}}), statusTimestamp=2020-10-26T09:50:53.695Z, info=Info(values={}), endpoints=Endpoints(endpoints={integrationgraph=Endpoint(id=integrationgraph, url=http://localhost:8080/actuator/integrationgraph), httptrace=Endpoint(id=httptrace, url=http://localhost:8080/actuator/httptrace), caches=Endpoint(id=caches, url=http://localhost:8080/actuator/caches), loggers=Endpoint(id=loggers, url=http://localhost:8080/actuator/loggers), bindings=Endpoint(id=bindings, url=http://localhost:8080/actuator/bindings), health=Endpoint(id=health, url=http://localhost:8080/actuator/health), refresh=Endpoint(id=refresh, url=http://localhost:8080/actuator/refresh), env=Endpoint(id=env, url=http://localhost:8080/actuator/env), heapdump=Endpoint(id=heapdump, url=http://localhost:8080/actuator/heapdump), features=Endpoint(id=features, url=http://localhost:8080/actuator/features), scheduledtasks=Endpoint(id=scheduledtasks, url=http://localhost:8080/actuator/scheduledtasks), mappings=Endpoint(id=mappings, url=http://localhost:8080/actuator/mappings), bus-env=Endpoint(id=bus-env, url=http://localhost:8080/actuator/bus-env), channels=Endpoint(id=channels, url=http://localhost:8080/actuator/channels), nacos-config=Endpoint(id=nacos-config, url=http://localhost:8080/actuator/nacos-config), beans=Endpoint(id=beans, url=http://localhost:8080/actuator/beans), configprops=Endpoint(id=configprops, url=http://localhost:8080/actuator/configprops), threaddump=Endpoint(id=threaddump, url=http://localhost:8080/actuator/threaddump), metrics=Endpoint(id=metrics, url=http://localhost:8080/actuator/metrics), conditions=Endpoint(id=conditions, url=http://localhost:8080/actuator/conditions), auditevents=Endpoint(id=auditevents, url=http://localhost:8080/actuator/auditevents), info=Endpoint(id=info, url=http://localhost:8080/actuator/info)}), buildVersion=null, tags=Tags(values={}))

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
 Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
 |_ checkpoint ⇢ Request to GET health [DefaultWebClient]

主要看到报错信息是:reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

二、解决方案

reactor-netty的版本有问题,直接把reactor-netty的升到0.9.10.RELEASE即可解决。

<dependency>
   <groupId>de.codecentric</groupId>
   <artifactId>spring-boot-admin-starter-server</artifactId>
   <exclusions>
      <exclusion>
         <groupId>io.projectreactor.netty</groupId>
         <artifactId>reactor-netty</artifactId>
      </exclusion>
   </exclusions>
</dependency>
<dependency>
   <groupId>io.projectreactor.netty</groupId>
   <artifactId>reactor-netty</artifactId>
   <version>0.9.10.RELEASE</version>
</dependency>

*** 如果对你有帮助,请微信搜索关注:蜗牛开发笔记 你的关注,是我的动力! 谢谢 ***

本文由博客群发一文多发等运营工具平台 OpenWrite 发布