You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UnknownContentTypeException when client authentication to server fails #1723
When the server has Spring Security, like a basic auth username and password, and the client is misconfigured you get this error:
Caused by: org.springframework.web.client.UnknownContentTypeException: Could not extract response: no suitable HttpMessageConverter found for response type [class org.springframework.cloud.config.environment.Environment] and content type [text/html;charset=UTF-8]
This problem usually appears when form login is enabled in the config server, which is often the case as the auto-configured SecurityFilterChain has form login enabled. When the config client sends the wrong credentials, the server will then respond with the HTML for the login page, which the client does not know how to handle.
If you don't need form login in the config server, you can disable it to solve the issue.
I opened #3346 for this. When the config server answers with an HTML page, such as its login page, the client now reports the server URI, the status and the content type, and points at the credentials instead of the HttpMessageConverter error.
Activity
hpoettker commentedon Oct 12, 2023
This problem usually appears when form login is enabled in the config server, which is often the case as the auto-configured
SecurityFilterChainhas form login enabled. When the config client sends the wrong credentials, the server will then respond with the HTML for the login page, which the client does not know how to handle.If you don't need form login in the config server, you can disable it to solve the issue.
sharanggupta commentedon Oct 15, 2026
I opened #3346 for this. When the config server answers with an HTML page, such as its login page, the client now reports the server URI, the status and the content type, and points at the credentials instead of the HttpMessageConverter error.
Try the next config server URI after an unreadable response (#3346)