Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not extract response due to missing HttpMessageConverter #476

Closed
urswiss opened this issue Jun 21, 2017 · 1 comment
Closed

Could not extract response due to missing HttpMessageConverter #476

urswiss opened this issue Jun 21, 2017 · 1 comment

Comments

@urswiss
Copy link

urswiss commented Jun 21, 2017

I have a Spring Boot 1.5.4 application which exposes various actuator endpoints:
endpoints:
hypermedia:
enabled: true
apidocs:
enabled: true
sensitive: false
auditevents:
enabled: false
autoconfig:
enabled: true
sensitive: false
beans:
enabled: true
sensitive: false
configprops:
enabled: true
sensitive: false
docs:
enabled: true
sensitive: false
dump:
enabled: true
sensitive: false
env:
enabled: true
sensitive: false
flyway:
enabled: true
sensitive: false
heapdump:
enabled: true
sensitive: false
health:
enabled: true
sensitive: false
h2-console:
enabled: false
sensitive: false
internal-mail:
enabled: true
sensitive: false
liquibase:
enabled: false
logfile:
enabled: true
sensitive: false
loggers:
enabled: true
sensitive: false
mappings:
enabled: true
sensitive: false
metrics:
enabled: true
sensitive: false
monitoring:
application: ${info.build.name}
server-name: override this
group-for-alerts: java
enabled: true
sensitive: false
pause:
enabled: false
refresh:
enabled: true
sensitive: false
restart:
enabled: true
sensitive: false
resume:
enabled: false
shutdown:
enabled: true
sensitive: false
trace:
enabled: true
sensitive: false

In the application-local.yml I configured Spring Boot Admin as follows
boot:
admin:
url: http://localhost:8081/spring-boot-admin
username: web
password: bla
client:
name: clearview
service-url: http://127.0.0.1:8080/offer-ug/api
management-url: http://127.0.0.1:8080/offer-ug/manage
health-url: http://127.0.0.1:8080/offer-ug/manage/health
prefer-ip: true

The pom.xml has the below additional dependency:
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>1.5.1</version>
</dependency>

The application comes up without any errors.

When I now start the Spring Boot Admin Server I get the following exception:
2017-06-21 10:07:59.020 INFO 5068 --- [0.1-8081-exec-1] d.c.b.a.registry.ApplicationRegistry : New Application Application [id=701cde23, name=clearview, managementUrl=http://127.0.0.1:8080/offer-ug/manage, healthUrl=http://127.0.0.1:8080/offer-ug/manage/health, serviceUrl=http://127.0.0.1:8080/offer-ug/api] registered
2017-06-21 10:07:59.084 INFO 5068 --- [ updateTask1] d.c.boot.admin.registry.StatusUpdater : Couldn't retrieve status for Application [id=701cde23, name=clearview, managementUrl=http://127.0.0.1:8080/offer-ug/manage, healthUrl=http://127.0.0.1:8080/offer-ug/manage/health, serviceUrl=http://127.0.0.1:8080/offer-ug/api]

org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [interface java.util.Map] and content type [application/octet-stream]
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:110) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:917) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:901) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:655) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:549) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at de.codecentric.boot.admin.web.client.ApplicationOperations.doGet(ApplicationOperations.java:74) ~[spring-boot-admin-server-1.5.0.jar:1.5.0]
at de.codecentric.boot.admin.web.client.ApplicationOperations.getHealth(ApplicationOperations.java:64) ~[spring-boot-admin-server-1.5.0.jar:1.5.0]
at de.codecentric.boot.admin.registry.StatusUpdater.queryStatus(StatusUpdater.java:111) [spring-boot-admin-server-1.5.0.jar:1.5.0]
at de.codecentric.boot.admin.registry.StatusUpdater.updateStatus(StatusUpdater.java:65) [spring-boot-admin-server-1.5.0.jar:1.5.0]
at de.codecentric.boot.admin.registry.StatusUpdateApplicationListener$1.run(StatusUpdateApplicationListener.java:47) [spring-boot-admin-server-1.5.0.jar:1.5.0]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]

I'm aware that the Response MIME type changed from Spring Boot 1.4 to 1.5 (details).

On the other hand I can see in the code of Spring Boot Admin Server that the accept header is set to APPLICATION_JSON (details, line 65).

Any idea why this exception occurs? Thanks for your help.

@joshiste
Copy link
Collaborator

Looks like your client application is responding with the wrong content-type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants