springboot应用打包为docker镜像,启动eureka client容器报错 Fetching config from server at : http://localhost:8888
2020-03-01 11:09
1341 查看
springboot应用打包为docker镜像,启动eureka client容器报错:
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
或者com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
无法把服务注册到注册中心
并且无法连接配置中心(肯定啦,得先注册,才能从注册中心拿到配置中心的路由):Fetching config from server at : http://localhost:8888,这个配置中心路由明显是错的
无论怎么改代码都不起效,折腾了一天,最后发现,原来是我把代码复制到阿里云,然后用maven打包为docker镜像,而maven在打包镜像时会优先使用build后的文件,而我的idea没有设置自动编译,所以无论怎么改代码,target里的编译文件都不会变,所以打出的镜像始终是错的,build一下就好了
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Fetching config from server at : http://localhost:8888
- 将springboot jar应用打包成镜像并在docker运行成容器
- SpringBoot+Docker实现项目的Maven打包&镜像构建&容器中运行==简单自动化部署
- 第一个SpringBoot web 应用使用maven构建Docker镜像并容器化运行
- Spring Boot应用Docker打包成镜像
- spring boot应用打包成docker镜像和服务的编排
- jenkins 打包部署springboot应用,后台启动
- Docker 容器整合 Spring Boot 应用
- docker 部署springboot项目,解决容器启动成功但是浏览器访问不成功的问题
- Spring Boot 的项目打包成的 JAR 包,制作成 docker 镜像并运行
- swagger: fetching resource list: http://localhost:8080/template/v2/api-docs?group=springboot-templat
- Spring Boot项目打包成docker镜像
- springboot打包docker镜像部署
- Spring boot源码分析-AnnotationConfigApplicationContext非web环境下的启动容器(2)
- Docker 私有仓库,上传镜像报错:server gave HTTP response to HTTPS client
- Docker决战到底(七) 使用多阶段构建Spring Boot应用镜像
- 将Spring-boot应用部署到Docker容器
- Docker 容器整合 Spring Boot 应用
- 解决eclipse启动tomcat报错:Could not load the Tomcat server configuration at \Servers\Tomcat v6.0 Server at localhost-config. The Servers project is closed.
- spring cloud 的启动Eureka client报错--Cannot execute request on any known server