3

I'm probably missing some configuration, but I cannot find out which one.

I have working client app and running monitoring app, everyting works when both executed as a "standalone" apps, meaning, that they do not run in any application server.

But I'm trying to run them also under weblogic. Both app are deployed, registration is ok, regular updates of app status shows that monitored app is UP. However in UI no registered app are shown. When checking network in chrome development console, I can see, that:

GET http://localhost:7001/cchAdmin/applications 500 (Internal Server Error)

failed. Checking monitoring app logs, one can find

Looking up handler method for path /cchAdmin/applications

2019-01-07 16:59:18.022 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Did not find handler method for [/cchAdmin/applications]
2019-01-07 16:59:18.023 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Looking up handler method for path /cchAdmin/applications
2019-01-07 16:59:18.023 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Did not find handler method for [/cchAdmin/applications]
2019-01-07 16:59:19.178 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Looking up handler method for path /instances
2019-01-07 16:59:19.178 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Returning handler method [public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, de.codecentric.boot.admin.server.domain.values.InstanceId>>> de.codecentric.boot.admin.server.web.InstancesController.register(de.codecentric.boot.admin.server.domain.values.Registration,org.springframework.web.util.UriComponentsBuilder)]
2019-01-07 16:59:19.179 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Looking up handler method for path /instances
2019-01-07 16:59:19.180 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Returning handler method [public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, de.codecentric.boot.admin.server.domain.values.InstanceId>>> de.codecentric.boot.admin.server.web.InstancesController.register(de.codecentric.boot.admin.server.domain.values.Registration,org.springframework.web.util.UriComponentsBuilder)]
2019-01-07 16:59:19.181 DEBUG 13460 --- [ (self-tuning)'] d.c.b.a.server.web.InstancesController   : Register instance Registration(name=XXX, managementUrl=http://localhost:7001/XXX/actuator, healthUrl=http://localhost:7001/XXX/actuator/health, serviceUrl=http://localhost:7001/XXX, source=http-api)
2019-01-07 16:59:19.183 ERROR 13460 --- [ (self-tuning)'] org.thymeleaf.TemplateEngine             : [THYMELEAF][[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] Exception processing template "instances": Error resolving template "instances", template might not exist or might not be accessible by any of the configured Template Resolvers

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "instances", template might not exist or might not be accessible by any of the configured Template Resolvers
    at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:870)
    at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072)
    at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:354)

...

from which I'd thought, that application context path got somewhat lost, and maybe the app should query cchAdmin/instances instead of /instances.

"Disappearing" context path, if that's the case, is set via <context-root>/cchAdmin</context-root> in weblogic.xml, while there insn't any configuration for spring-boot-admin. Only spring-boot-client got some configuration, but that one seems to be working.

any ideas what could be wrong here? I don't see any way to specify context-path for admin project, spring.boot.admin.context-path does something else, and spring.boot.admin.ui.public-url does not help. Spring boot admin version is: 2.0.4

Khoa Phung
  • 491
  • 3
  • 9
  • 20
Martin Mucha
  • 2,385
  • 1
  • 29
  • 49
  • Or maybe question — is it even possible to deploy spring-boot-admin into application server? – Martin Mucha Jan 07 '19 at 19:04
  • Same. I tried to make it work but nothing. – Wilder Valera Apr 01 '19 at 20:46
  • is it even possible to deploy spring-boot-admin into application server? --> Yes. I can deploy spring-boot-admin in JBoss. But I got the same issue as yours when deploying in weblogic server: "TemplateInputException: Error resolving template "ui/applications", template might not exist or might not be accessible by any of the configured Template Resolvers". Actually, the server "ui/application" is not a template, that is a websocket service (the request type is eventsource) to update the status of all client services. I have not found the solution yet – Khoa Phung Jun 05 '19 at 08:19
  • @KhoaPhung IIUC weblogic future is hazy at best. According to our research fixing this issue won't be especially easy, so maybe it's better to invest time to move app to another AS. – Martin Mucha Jun 06 '19 at 06:12
  • @MartinMucha, agree that it's not easy. But do you have any idea or recommendation how to fix it? – Khoa Phung Jun 06 '19 at 06:40
  • @KhoaPhung I'd like to help, but I can't. We evaluated it as too costly and moved away. Due to time constraints we had to reprioritise, so currently we do not use spring-boot-admin at all. We will probably get back to it once we entirelly get rid of weblogic. But IIRC, the problem is only admin part being deployed to weblogic. Monitored apps can be deployed to weblogic IIRC. So the easiest "solution" is not deploying to weblogic, and just run admin part as a standalone springboot app. Fixing the issues doesn't justify the costs. – Martin Mucha Jun 06 '19 at 08:47

0 Answers0