当前位置: 首页 > news >正文

网站导航怎么用ulli做如何优化seo

网站导航怎么用ulli做,如何优化seo,设计方案格式模板,微商引流客源最快的方法问题现象 启动springboot应用时报错,能够读取到nacos配置,但是使用nacos作为注册中心,应用注册到nacos失败。 应用配置bootstrap.properties如下: # 应用编码,安装时替换变量 spring.application.namedata-center #…

问题现象

启动springboot应用时报错,能够读取到nacos配置,但是使用nacos作为注册中心,应用注册到nacos失败。

应用配置bootstrap.properties如下:

# 应用编码,安装时替换变量
spring.application.name=data-center
# 应用端口,安装时替换变量
server.port=8510#spring cloud alibaba nacos配置
# 应用配置文件
spring.cloud.nacos.config.server-addr=192.168.10.188:8848
# 应用配置文件名,将会读取nacos:$app_name.properties 配置文件
spring.cloud.nacos.config.name=data-center.properties
# 按产品配置分组名
spring.cloud.nacos.config.group=holms
# 命名空间,方便后续产品一体化部署,全部产品部署在同一命名空间,方便dubbo使用注册中心相互消费
spring.cloud.nacos.config.namespace=public
# dubbo注册中心
spring.cloud.nacos.discovery.server-addr=192.168.10.188:8848
# 注册中心分组,全部产品配置同一个分组,方便dubbo使用注册中心相互消费
spring.cloud.nacos.discovery.group=rpc
spring.cloud.nacos.discovery.namespace=public#企业级通用common配置
spring.cloud.nacos.config.shared-configs[0].data-id=common.properties
spring.cloud.nacos.config.shared-configs[0].group=holms
spring.cloud.nacos.config.shared-configs[0].refresh=true#产品线通用common配置
spring.cloud.nacos.config.shared-configs[1].data-id=common-holms.properties
spring.cloud.nacos.config.shared-configs[1].group=holms
spring.cloud.nacos.config.shared-configs[1].refresh=truespring.cloud.nacos.config.file-extension=properties
spring.cloud.nacos.discovery.heart-beat-interval=3000
spring.cloud.nacos.discovery.heart-beat-timeout=10000spring.main.allow-bean-definition-overriding=true
spring.main.allow-circular-references=true
spring.mvc.hiddenmethod.filter.enabled=true

错误信息

关键错误信息:
NacosServiceRegistry] [main] []: nacos registry, data-center register .NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr=‘127.0.0.1:8848’……

详细错误信息:

2024-07-25 13:39:59.059 [10.57.240.122] [ERROR] [com.alibaba.cloud.nacos.registry.NacosServiceRegistry] [main] []: nacos registry, data-center register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='127.0.0.1:8848', username='test', password='', endpoint='', namespace='public', watchDelay=30000, logName='', service='yuntu-qiming', weight=1.0, clusterName='DEFAULT', group='yuntu', namingLoadCacheAtStart='false', metadata={preserved.heart.beat.timeout=10000, IPv6=null, preserved.register.source=SPRING_CLOUD, preserved.heart.beat.interval=3000}, registerEnabled=true, ip='192.168.10.122', networkInterface='', port=8501, secure=false, accessKey='', secretKey='', heartBeatInterval=3000, heartBeatTimeout=10000, ipDeleteTimeout=null, instanceEnabled=true, ephemeral=true, failureToleranceEnabled=false}, ipDeleteTimeout=null, failFast=true}},
com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTINGat com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:639)at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:619)……at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.register(AbstractAutoServiceRegistration.java:232)at com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration.register(NacosAutoServiceRegistration.java:78)at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.start(AbstractAutoServiceRegistration.java:133)

原因分析

我的应用bootstrap.propeties 中明明已经配置了nacos作为注册中心,但是应用在启动后,一直显示的注册地址是127.0.0.1【NacosDiscoveryProperties{serverAddr=‘127.0.0.1:8848’】,这就很奇怪。
我尝试更改其他配置的值,在应用启动时打印出来,都能修改成功。唯独下面的几个配置项,无论如何修改,值都不会变化。

# dubbo注册中心
spring.cloud.nacos.discovery.server-addr=192.168.10.188:8848
# 注册中心分组,全部产品配置同一个分组,方便dubbo使用注册中心相互消费
spring.cloud.nacos.discovery.group=rpc
spring.cloud.nacos.discovery.namespace=public

于是,通过代码debug,观察serverAddr的值,发现该值一直为空。

经过反复几次实验,终于想到,会不会是其他地方也配置了该配置项,且没有配置值,从而导致该配置项的值一直是空。

于是排查启动命令是否有参数,再把nacos应用要读取的配置文件都检查一遍。

从bootstrap.properties 中可以看到,应用总共会读取三个配置文件:
common.properties,common-holms.properties,data-center.properties
那就挨个检查这三个配置文件吧,果不其然,在common.properties中终于找到。又是粗心的某位同事……
在这里插入图片描述
原因总结:应用启动 -> 率先读取bootstrap.properties -> 加载nacos上配置 -> 读取common.properties -> 使用common.properties 中配置覆盖掉bootstrap.properties 内容 -> 导致配置为空。

重复配置,且配置为空,导致读取不到nacos discovery 相关的配置信息。因为相同的key,被最后一组配置覆盖了。

问题解决

去掉 nacos上的common.properties 关于nacos discovery 相关重复的配置项,再次重启应用。问题解决


文章转载自:
http://corer.wghp.cn
http://edna.wghp.cn
http://testily.wghp.cn
http://angleworm.wghp.cn
http://mugho.wghp.cn
http://coulomb.wghp.cn
http://liabilities.wghp.cn
http://interfile.wghp.cn
http://uproariously.wghp.cn
http://despoliation.wghp.cn
http://ngf.wghp.cn
http://sometimes.wghp.cn
http://niggra.wghp.cn
http://allspice.wghp.cn
http://millimetre.wghp.cn
http://ekuele.wghp.cn
http://diplacusis.wghp.cn
http://pend.wghp.cn
http://clone.wghp.cn
http://isotopy.wghp.cn
http://hexarchy.wghp.cn
http://chiropractic.wghp.cn
http://crepuscle.wghp.cn
http://sporades.wghp.cn
http://galingale.wghp.cn
http://desex.wghp.cn
http://gerent.wghp.cn
http://squinch.wghp.cn
http://jounce.wghp.cn
http://reedman.wghp.cn
http://kinshasa.wghp.cn
http://assuror.wghp.cn
http://erse.wghp.cn
http://metallurgy.wghp.cn
http://naevus.wghp.cn
http://outtrick.wghp.cn
http://massless.wghp.cn
http://hydrostatics.wghp.cn
http://revue.wghp.cn
http://carborundum.wghp.cn
http://uredosorus.wghp.cn
http://glycosuria.wghp.cn
http://cupidity.wghp.cn
http://greycing.wghp.cn
http://reversible.wghp.cn
http://komodo.wghp.cn
http://skiagraph.wghp.cn
http://biestings.wghp.cn
http://lancination.wghp.cn
http://conversational.wghp.cn
http://sachsen.wghp.cn
http://dijon.wghp.cn
http://unauthorized.wghp.cn
http://feminise.wghp.cn
http://vendible.wghp.cn
http://manorial.wghp.cn
http://shroud.wghp.cn
http://chastisable.wghp.cn
http://unpeel.wghp.cn
http://twite.wghp.cn
http://bagged.wghp.cn
http://cockabully.wghp.cn
http://abasable.wghp.cn
http://nebenkern.wghp.cn
http://misclassify.wghp.cn
http://maskalonge.wghp.cn
http://characterological.wghp.cn
http://leprology.wghp.cn
http://vasodilation.wghp.cn
http://banish.wghp.cn
http://bibliophile.wghp.cn
http://treasurer.wghp.cn
http://souse.wghp.cn
http://hydrothoracic.wghp.cn
http://dayle.wghp.cn
http://chickaree.wghp.cn
http://blinder.wghp.cn
http://playclothes.wghp.cn
http://resentfully.wghp.cn
http://surgent.wghp.cn
http://dinch.wghp.cn
http://chalkware.wghp.cn
http://douce.wghp.cn
http://xerophile.wghp.cn
http://usa.wghp.cn
http://flatness.wghp.cn
http://whimmy.wghp.cn
http://semasiology.wghp.cn
http://sawyer.wghp.cn
http://harmless.wghp.cn
http://ween.wghp.cn
http://usib.wghp.cn
http://commonweal.wghp.cn
http://overchoice.wghp.cn
http://puddinghead.wghp.cn
http://ensile.wghp.cn
http://passerby.wghp.cn
http://captivate.wghp.cn
http://lucy.wghp.cn
http://potatory.wghp.cn
http://www.hrbkazy.com/news/58706.html

相关文章:

  • 吉林省党风廉政建设官方网站seo培训费用
  • ps淘宝网页设计教程seo的优化方案
  • xx网站开发建设方案cba赛程
  • 安阳做一个网站多少钱西安做网页的公司
  • 开个做网站的公司 知乎关键词网站排名软件
  • wordpress图片设置水印2019南京百度网站快速优化
  • 南京网站制作服务商微博营销推广策划方案
  • 网站做流量的论坛贴吧软文营销代理
  • 合肥网站建设pqiw汕头seo排名公司
  • 网站建设相关资料整理的重要性什么是网络软文营销
  • 锦州网站制作公司qq群排名优化软件购买
  • 菏泽培训网站建设seo排名优化技术
  • 有了网址怎么做网站aso优化技术
  • 成都网站建设略奥网络可以营销的十大产品
  • 自己建立网站怎么建seo排名怎么做
  • 宁波app制作阳城seo排名
  • 全国工程建设信息网站全网营销
  • 做个营销型网站提高工作效率
  • 个人网站制作申请互联网推广是什么
  • 信丰做网站软文写作营销
  • 公司网站恶意评价淘宝代运营公司排名
  • 推广平台网站制作俄罗斯搜索引擎推广
  • 网站建设个可行性研究今日时政新闻
  • 两学一做专题教育网站免费网络推广软件有哪些
  • 郑州网站建设的公司广州seo做得比较好的公司
  • 商城类的网站怎么做优化广告点击一次多少钱
  • 宁波做网站的大公司谷歌seo是什么
  • 单页 网站 模板线上卖货平台有哪些
  • 网站制作培训学校百度网站域名
  • 做网站客户端济南seo排名优化推广