Eureka 集群启动报错

Eureka集群启动时,页面出现如下错误提示

FreeMarker template error (DEBUG mode; use RETHROW in production!): 
The following has evaluated to null or missing: ==> replica.key [in template "eureka/navbar.ftl" at line 68, column 62] 
---- Tip: It's the step after the last dot that caused this error, not those before it. 
---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- 
---- FTL stack trace ("~" means nesting-related): - Failed at: ${replica.key} [in template "eureka/navbar.ftl" at line 68, column 60] - Reached through: #include "navbar.ftl" [in template "eureka/status.ftl" at line 22, column 7] ---- Java stack trace (for programmers): 
---- freemarker.core.InvalidReferenceException: [... Exception message was already printed; 
see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) 
at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:467) 
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:389) 
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:358) 
at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100) 
at freemarker.core.DollarVariable.accept(DollarVariable.java:63) 
at freemarker.core.Environment.visit(Environment.java:366) 
at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317) 
at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271) 
at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
at freemarker.core.Environment.visitIteratorBlock(Environment.java:642) 
at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107) 
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93) 
at freemarker.core.Environment.visit(Environment.java:330) 
at freemarker.core.Environment.visit(Environment.java:336) 
at freemarker.core.Environment.include(Environment.java:2582) 
at freemarker.core.Include.accept(Include.java:171) 
at freemarker.core.Environment.visit(Environment.java:330) 
at freemarker.core.Environment.visit(Environment.java:336) at freemarker.core.Environment.process(Environment.java:309) at freemarker.template.Template.process(Template.java:384) 
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:389) 
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:302) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:253) 
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:178) 
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316) 
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1371) 
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1117) 
......
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) 
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) 
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853) 
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587) 
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
at java.lang.Thread.run(Thread.java:748)

Eureka配置

server:
  port: 7002

eureka:
  instance:
    hostname: eureka7002.com # Eureka服务端的实例名称
  client:
    register-with-eureka: false # 是否向Eureka服务注册中心注册自己
    fetch-registry: false # false,表示自己就是注册中心
    service-url:
      defaultZone: http://eureka7001.com:7001/eureka,http://eureka7003.com:7003/eureka,

经过搜索,在 Eureka启动,报Failed at: ${replica.key} [in template "eureka/navbar.ftl"提示下,发现 service-url配置后面多了一个逗号,导致出现了问题。
Eureka 集群启动报错_第1张图片

你可能感兴趣的:(Java,java,Eureka)