如何解决无法调用具有在eureka命名服务中注册的应用程序名称的服务
在将定价服务转换为微服务并通过在eureka服务器上注册的应用程序名称进行调用时,我能够启动eureka服务并在eureka ui上注册“定价服务”。
但是,我无法连接到定价服务网址-http:// pricing-server / services / price?vehicleId = 2
这是eureka客户端(定价服务)的pom.xml和应用程序属性- pom- application.properties-
尤里卡服务-
IntelliJ登录正在运行的eureka客户端(定价服务)-
2020-09-06 17:37:28.013 INFO 55759 --- [主要] c.c.c.ConfigServicePropertySourceLocator:从服务器获取配置 在:http:// localhost:8888 2020-09-06 17:37:28.118 INFO 55759 --- [
主要] c.c.c.ConfigServicePropertySourceLocator:连接超时 网址异常-http:// localhost:8888。将尝试下一个网址 如果有的话2020-09-06 17:37:28.118 WARN 55759 --- [main] c.c.c.ConfigServicePropertySourceLocator:找不到 PropertySource:GET请求的I / O错误 “ http:// localhost:8888 / pricing-server / default”:连接被拒绝; 嵌套的异常是java.net.ConnectException:连接被拒绝 2020-09-06 17:37:28.119 INFO 55759 --- [主要] c.u.pricing.PricingServiceApplication:未设置有效的配置文件, 还原为默认配置文件:默认2020-09-06 17:37:28.735 INFO 55759 --- [main] o.s.cloud.context.scope.GenericScope :beanfactory id = df03594c-afa8-36e9-8850-3ed7cac962f5 2020-09-06 17:37:29.037 INFO 55759 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer:Tomcat初始化为 端口:8082(http)2020-09-06 17:37:29.045 INFO 55759 --- [
main] o.apache.catalina.core.StandardService:启动服务 [Tomcat] 2020-09-06 17:37:29.045 INFO 55759 --- [主要] org.apache.catalina.core.StandardEngine:启动Servlet引擎: [Apache Tomcat / 9.0.37] 2020-09-06 17:37:29.160 INFO 55759 --- [
main] o.a.c.c.C. [Tomcat]。[localhost]。[/]:初始化Spring 嵌入式WebApplicationContext 2020-09-06 17:37:29.160 INFO 55759- [main] w.s.c.ServletWebServerApplicationContext:根 WebApplicationContext:初始化在2020-09-06 1028毫秒中完成 17:37:29.476 WARN 55759 --- [main] c.n.c.sources.URLconfigurationSource:不会将任何URL轮询为 动态配置源。 2020-09-06 17:37:29.476信息55759- [main] c.n.c.sources.URLconfigurationSource:要启用 URL作为动态配置源,定义系统属性 archaius.configurationSource.additionalUrls或进行config.properties 在classpath上可用。 2020-09-06 17:37:29.480 WARN 55759 --- [
main] c.n.c.sources.URLconfigurationSource:没有URL 被轮询为动态配置源。 2020-09-06 17:37:29.480信息 55759 --- [main] c.n.c.sources.URLconfigurationSource: 要将URL启用为动态配置源,请定义系统 属性archaius.configurationSource.additionalUrls或make config.properties在类路径上可用。 2020-09-06 17:37:29.712 INFO 55759 --- [主要] o.s.s.current.ThreadPoolTaskExecutor:初始化 ExecutorService'applicationTaskExecutor'2020-09-06 17:37:30.096 警告55759 --- [主] ockingLoadBalancerClientRibbonWarnLogger:您已经拥有 您的类路径上的RibbonLoadBalancerClient。它将由 默认。由于Spring Cloud Ribbon处于维护模式。我们推荐 改为改为BlockingLoadBalancerClient。为了使用它, 将spring.cloud.loadbalancer.ribbon.enabled
的值设置为false
或从您的项目中删除spring-cloud-starter-netflix-ribbon。 2020-09-06 17:37:30.163 INFO 55759 --- [主要] o.s.c.n.eureka.InstanceInfoFactory:设置初始实例 状态为:STARTING 2020-09-06 17:37:30.222 INFO 55759 --- [
main] com.netflix.discovery.discoveryClient:初始化Eureka 在地区us-east-1 2020-09-06 17:37:30.384 INFO 55759 --- [
main] c.n.d.provider.discoveryJerseyProvider:使用JSON编码 编解码器LegacyJacksonjson 2020-09-06 17:37:30.384 INFO 55759 --- [
main] c.n.d.provider.discoveryJerseyProvider:使用JSON解码 编解码器LegacyJacksonjson警告:非法的反射访问 操作已发生警告:非法反射访问 com.thoughtworks.xstream.core.util.Fields (文件:/Users/abhiya/.m2/repository/com/thoughtworks/xstream/xstream/1.4.11.1/xstream-1.4.11.1.jar) 字段java.util.TreeMap.comparator警告:请考虑 向维护者报告 com.thoughtworks.xstream.core.util.Fields警告:使用 --illegal-access =警告以对进一步的非法反射访问操作启用警告警告:所有非法访问操作都将 在将来的版本中被拒绝2020-09-06 17:37:30.468 INFO 55759 --- [
main] c.n.d.provider.discoveryJerseyProvider:使用XML编码 编解码器XStreamXml 2020-09-06 17:37:30.468 INFO 55759 --- [
main] c.n.d.provider.discoveryJerseyProvider:使用XML解码 编解码器XStreamXml 2020-09-06 17:37:30.584 INFO 55759 --- [
主要] c.n.d.s.r.aws.ConfigClusterResolver:解决尤里卡 端点通过配置2020-09-06 17:37:30.599 INFO 55759 --- [ 主要] com.netflix.discovery.discoveryClient:禁用增量 属性:false 2020-09-06 17:37:30.599 INFO 55759 --- [
[主要] com.netflix.discovery.discoveryClient:单个vip注册表 refresh属性:null 2020-09-06 17:37:30.599 INFO 55759 --- [
主要] com.netflix.discovery.discoveryClient:强制完整注册表 fetch:false 2020-09-06 17:37:30.599 INFO 55759 --- [
主要] com.netflix.discovery.discoveryClient:应用程序为null: 错误2020-09-06 17:37:30.599 INFO 55759 --- [main] com.netflix.discovery.discoveryClient:注册的应用程序 size为零:true 2020-09-06 17:37:30.599 INFO 55759 --- [
[主要] com.netflix.discovery.discoveryClient:应用程序版本 是-1:正确2020-09-06 17:37:30.599 INFO 55759 --- [main] com.netflix.discovery.discoveryClient:获取所有实例 来自eureka服务器的注册表信息2020-09-06 17:37:30.672 INFO 55759-[[main] com.netflix.discovery.discoveryClient: 响应状态为200 2020-09-06 17:37:30.674 INFO 55759 --- [
[主要] com.netflix.discovery.discoveryClient:启动心跳 执行者:更新间隔为:30 2020-09-06 17:37:30.675 INFO 55759 --- [main] c.n.discovery.InstanceInfoReplicator:InstanceInfoReplicator ondemand每分钟的更新允许率为4 2020-09-06 17:37:30.678 INFO 55759 --- [主要] com.netflix.discovery.discoveryClient:发现客户端 在时间戳1599428250677处初始化,初始实例计数:0 2020-09-06 17:37:30.680 INFO 55759 --- [主要] o.s.c.n.e.s.EurekaServiceRegistry:注册应用程序 具有eureka且状态为UP 2020-09-06 17:37:30.680的PRICING-SERVER INFO 55759 --- [main] com.netflix.discovery.discoveryClient :看到本地状态更改事件StatusChangeEvent [timestamp = 1599428250680,current = UP,prevIoUs = STARTING] 2020-09-06 17:37:30.681 INFO 55759 --- [nfoReplicator-0] com.netflix.discovery.discoveryClient: discoveryClient_PRICING-SERVER / f8ffc24c8149.fios-router.home:定价服务器:8082: 正在注册服务... 2020-09-06 17:37:30.707 INFO 55759 --- [nfoReplicator-0] com.netflix.discovery.discoveryClient: discoveryClient_PRICING-SERVER / f8ffc24c8149.fios-router.home:定价服务器:8082
- 注册状态:204 2020-09-06 17:37:30.708 INFO 55759 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer:Tomcat已启动 端口:8082(http),上下文路径为''2020-09-06 17:37:30.709 INFO 55759 --- [主要] .s.c.n.e.s.EurekaAutoServiceRegistration:将端口更新为8082 2020-09-06 17:37:30.720 INFO 55759 --- [主要] c.u.pricing.PricingServiceApplication:已启动 PricingServiceApplication在3.521秒内运行(JVM运行3.872) 2020-09-06 17:37:47.998信息55759 --- [nio-8082-exec-1] o.a.c.c.C. [Tomcat]。[localhost]。[/]:初始化Spring dispatcherServlet'dispatcherServlet'2020-09-06 17:37:47.998信息 55759-[nio-8082-exec-1] o.s.web.servlet.dispatcherServlet: 初始化Servlet'dispatcherServlet'2020-09-06 17:37:48.009信息 55759-[nio-8082-exec-1] o.s.web.servlet.dispatcherServlet: 在10毫秒内完成初始化2020-09-06 17:38:00.677 INFO 55759 --- [freshExecutor-0] com.netflix.discovery.discoveryClient:禁用增量属性:false 2020-09-06 17:38:00.677 INFO 55759- [freshExecutor-0] com.netflix.discovery.discoveryClient:单个 vip注册表刷新属性:null 2020-09-06 17:38:00.677信息 55759-[freshExecutor-0] com.netflix.discovery.discoveryClient: 强制完全获取注册表:false 2020-09-06 17:38:00.677 INFO 55759 --- [freshExecutor-0] com.netflix.discovery.discoveryClient:应用程序为空:false 2020-09-06 17:38:00.677 INFO 55759- [freshExecutor-0] com.netflix.discovery.discoveryClient: 注册的应用程序大小为零:true 2020-09-06 17:38:00.677 INFO 55759 --- [freshExecutor-0] com.netflix.discovery.discoveryClient :应用程序版本为-1:否2020-09-06 17:38:00.677 INFO 55759 -[freshExecutor-0] com.netflix.discovery.discoveryClient:从eureka服务器获取所有实例注册表信息2020-09-06 17:38:00.694 INFO 55759 --- [freshExecutor-0] com.netflix.discovery.discoveryClient:响应状态为200
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。