codecentric / spring-boot-admin

Admin UI for administration of spring boot applications
Apache License 2.0
12.38k stars 3.08k forks source link

Endpoints won't load in Spring Admin Frontend 2.0 #701

Closed srep2512 closed 6 years ago

srep2512 commented 6 years ago

Hi,

I've tried to make use of the endpoints in spring boot 2.0 and changed my properties file according to your doc. management.endpoints.web.exposure.include=* management.endpoint.info.enabled=true management.endpoint.loggers.enabled=true

The problem is that it won't load the actual data into the frontend of the admin app. If I run the route directly it shows all the data.

Picture of the problem https://ibb.co/fh4pzx

joshiste commented 6 years ago

Any Error in the browser's console?

srep2512 commented 6 years ago

sadly no errors in console of the browser. In the network tab it shows the following link: http://localhost:50000/instances//actuator/loggers my client runs on http://ipaddress:3000.

For the client i used in gradle compile('de.codecentric:spring-boot-admin-starter-client:2.0.0-SNAPSHOT') and for the server compile('de.codecentric:spring-boot-admin-server:2.0.0-SNAPSHOT') compile('de.codecentric:spring-boot-admin-server-ui:2.0.0-SNAPSHOT')

It would be sad to write my own client to fetch these ressources, because i like the style of your frontend so far

n0mer commented 6 years ago

@joshiste after update to spring-boot 2.0.1 applications are not loaded any more (i'm using Eureka, not spring-boot-admin-client).

Here is the log:

2018-04-11 13:04:46.055 ERROR 1 --- [0.1-8088-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
        at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
        at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
        at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
        at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1267)
        at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670)
        at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:607)
        at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:597)
        at org.apache.coyote.http11.Http11OutputBuffer$SocketOutputBuffer.flush(Http11OutputBuffer.java:646)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.flush(ChunkedOutputFilter.java:169)
        at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:252)
        at org.apache.coyote.http11.Http11Processor.flush(Http11Processor.java:1560)
        at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:285)
        at org.apache.coyote.Response.action(Response.java:173)
        at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:317)
        at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:284)
        at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:118)
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
        at org.springframework.util.StreamUtils.copy(StreamUtils.java:121)
        at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:103)
        at org.springframework.http.converter.StringHttpMessageConverter.writeInternal(StringHttpMessageConverter.java:43)
        at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:230)
        at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitterReturnValueHandler$HttpMessageConvertingHandler.sendInternal(ResponseBodyEmitterReturnValueHandler.java:199)
        at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitterReturnValueHandler$HttpMessageConvertingHandler.send(ResponseBodyEmitterReturnValueHandler.java:189)
        at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.sendInternal(ResponseBodyEmitter.java:175)
        at org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter.send(ResponseBodyEmitter.java:169)
        at org.springframework.web.servlet.mvc.method.annotation.SseEmitter.send(SseEmitter.java:125)
        at org.springframework.web.servlet.mvc.method.annotation.ReactiveTypeHandler$SseEmitterSubscriber.send(ReactiveTypeHandler.java:341)
        at org.springframework.web.servlet.mvc.method.annotation.ReactiveTypeHandler$AbstractEmitterSubscriber.run(ReactiveTypeHandler.java:283)
        at java.lang.Thread.run(Thread.java:748)
n0mer commented 6 years ago

@srep2512 if you're using 2.0.0 snapshot of boot-admin-server, ensure you have 5.0.5 version of spring-framework dependencies. This helped me to solve registration problem (although "broken pipe" error still pollutes logs)

srep2512 commented 6 years ago

@n0mer thanks for the hint! To add the dependencies for spring with Version 5.0.5 really did the trick!

joshiste commented 6 years ago

@n0mer thanks for the hint! To add the dependencies for spring with Version 5.0.5 really did the trick!

sounds like this issue is solved.

hi-mamba commented 6 years ago

a simple way to use a different Spring version

https://stackoverflow.com/questions/24402073/is-there-a-simple-way-to-use-a-different-spring-version