在学习SpringCloud时Feign远程调用时出现的问题

问题:

nacos没开

2022-12-20 09:55:17.554 ERROR 24224 — [ main] c.a.c.n.registry.NacosServiceRegistry : nacos registry, feign register failed…NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr=‘mse-6d50f4f0-p.nacos-ans.mse.aliyuncs.com:8848’, endpoint=‘’, namespace=‘public’, watchDelay=30000, logName=‘’, service=‘feign’, weight=1.0, clusterName=‘DEFAULT’, group=‘DEFAULT_GROUP’, namingLoadCacheAtStart=‘false’, metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip=‘192.168.162.1’, networkInterface=‘’, port=8080, secure=false, accessKey=‘’, secretKey=‘’, heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null}},

开了nacos没开生产者

2022-12-20 10:05:48.554 ERROR 7300 — [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.context.ApplicationContextException: Failed to start bean ‘webServerStartStop’; nested exception is java.lang.reflect.UndeclaredThrowableException

开了生成者和nacos

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2022-12-20 10:09:35.973 ERROR 14220 — [ 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.

Process finished with exit code 1

解决:

feign发现target里端口还是8080,但yml里改了,所以要清除一下maven clean 然后maven install

结果:运行@test
},Server stats: [[Server:192.168.162.1:8080; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0]
]}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@27976390
你好

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kevin丶小凯

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值