开发者社区 > 云原生 > 正文

帮忙看看这个Nacos的报错,哪里出问题了?

帮忙看看这个Nacos的报错
(nacos:9848)] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host nacos, cause=java.lang.RuntimeException: java.net.UnknownHostException: nacos
d93a5a77a7959c25175ddd529b0c8f52.png

spring

server.servlet.contextPath=${SERVER_SERVLET_CONTEXTPATH:/nacos}
server.contextPath=/nacos
server.port=${NACOS_APPLICATION_PORT:8848}
spring.datasource.platform=${SPRING_DATASOURCE_PLATFORM:""}
nacos.cmdb.dumpTaskInterval=3600
nacos.cmdb.eventTaskInterval=10
nacos.cmdb.labelTaskInterval=300
nacos.cmdb.loadDataAtStart=false
db.num=${MYSQL_DATABASE_NUM:1}
db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false}
db.url.1=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false}
db.user=${MYSQL_SERVICE_USER}
db.password=${MYSQL_SERVICE_PASSWORD}

The auth system to use, currently only 'nacos' is supported:

nacos.core.auth.system.type=${NACOS_AUTH_SYSTEM_TYPE:nacos}

The token expiration in seconds:

nacos.core.auth.default.token.expire.seconds=${NACOS_AUTH_TOKEN_EXPIRE_SECONDS:18000}

The default token:

nacos.core.auth.default.token.secret.key=emhhb2JlbnNodWFpdGVzdG5ld2tleWluZm9sb25nZW5vdWdoCg==

Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.

nacos.core.auth.caching.enabled=${NACOS_AUTH_CACHE_ENABLE:false}
nacos.core.auth.enable.userAgentAuthWhite=${NACOS_AUTH_USER_AGENT_AUTH_WHITE_ENABLE:false}
nacos.core.auth.server.identity.key=llsydn
nacos.core.auth.server.identity.value=Llsydn123!@
server.tomcat.accesslog.enabled=${TOMCAT_ACCESSLOG_ENABLED:false}
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D

default current work dir

server.tomcat.basedir=

spring security config

turn off security

nacos.security.ignore.urls=${NACOS_SECURITY_IGNORE_URLS:/,/error,//*.css,//.js,/**/.html,//*.map,//.svg,/**/.png,//*.ico,/console-fe/public/,/v1/auth/,/v1/console/health/,/actuator/,/v1/console/server/}

metrics for elastic search

management.metrics.export.elastic.enabled=false
management.metrics.export.influx.enabled=false

nacos.naming.distro.taskDispatchThreadCount=10
nacos.naming.distro.taskDispatchPeriod=200
nacos.naming.distro.batchSyncKeyCount=1000
nacos.naming.distro.initDataRatio=0.9
nacos.naming.distro.syncRetryDelay=5000
nacos.naming.data.warmup=true
只修改权限那块了, 其他的没动啊,哪里出问题了?

展开
收起
嘟嘟嘟嘟嘟嘟 2023-11-06 16:35:37 231 0
1 条回答
写回答
取消 提交回答
  • 这个报错是部署的容器请求nacos这个域名请求不通。此回答整理自钉群“Nacos社区群4”

    2023-11-06 21:43:33
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
Nacos架构&原理 立即下载
workshop专场-微服务专场-开发者动手实践营-微服务-使用Nacos进行服务的动态发现和流量调度 立即下载
Nacos 启航,发布第一个版本, 云原生时代助力用户微服务平台建设 立即下载