0
votes

I'm trying to reproduce http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_serving_plain_text serving a logback.xml file.

When I tried curl -v http://localhost:8888/gateway/default/master/logback.xml I got a:

Hostname was NOT found in DNS cache

Trying 127.0.0.1...

Connected to localhost (127.0.0.1) port 8888 (#0)

GET /gateway/default/master/logback.xml HTTP/1.1

User-Agent: curl/7.35.0

Host: localhost:8888

Accept: /

HTTP/1.1 406 Not Acceptable

Server Apache-Coyote/1.1 is not blacklisted

Server: Apache-Coyote/1.1

X-Application-Context: configserver:8888

Content-Type: application/json;charset=UTF-8

Transfer-Encoding: chunked

Date: Thu, 17 Mar 2016 17:26:02 GMT

Connection #0 to host localhost left intact

{"timestamp":1458235562683,"status":406,"error":"Not Acceptable","exception":"org.springframework.web.HttpMediaTypeNotAcceptableException","message":"Could not find acceptable representation","path":"/gateway/default/master/logback.xml"}%

I'm using Brixton.M5 and here is the repository structure:

 - application.yml
 - gateway.yml
 - auth.yml
 - eureka.yml
 - logback.xml
 - test.json

The curl -v http://localhost:8888/gateway/default/master/test.json works normally.

1
maybe try with '-H "Accept: application/xml"' - freakman
@freakman same error, but thanks - Richard Santana
@spencergibb with the build.snapshot version of brixton it worked, please post it as an answer and I`ll accept it. Thanks. - Richard Santana

1 Answers

0
votes