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

GET /system/gettingstarted is broken #1700

Closed
pdepaepe opened this Issue Jan 18, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@pdepaepe

pdepaepe commented Jan 18, 2016

Hello,

GET /system/gettingstarted returns 500 with following log entry

2016-01-18T15:16:34.164Z ERROR [WriterInterceptorExecutor] MessageBodyWriter not found for media type=text/xml, type=class org.graylog2.rest.models.system.AutoValue_DisplayGettingStarted, genericType=class org.graylog2.rest.models.system.DisplayGettingStarted.

@joschi

This comment has been minimized.

Contributor

joschi commented Jan 18, 2016

Please post the complete HTTP request you're sending to this resource.

@pdepaepe

This comment has been minimized.

pdepaepe commented Jan 18, 2016

As graylog administrator, GET on http://graylog-master:12900/system/gettingstarted

Status 500 Internal Server Error
Time 119 ms

Body response:

{
  "type": "ApiError",
  "message": "HTTP 500 Internal Server Error"
}
@joschi

This comment has been minimized.

Contributor

joschi commented Jan 18, 2016

Try setting an Accept header in your HTTP request.

# curl -u admin:admin -i -H 'Accept: application/json' 'http://graylog-master:12900/system/gettingstarted'
HTTP/1.1 200 OK
X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd
Content-Type: application/json
Date: Mon, 18 Jan 2016 16:10:17 GMT
Content-Length: 14

{"show":false}

@joschi joschi closed this in 95d8a01 Jan 18, 2016

joschi added a commit that referenced this issue Jan 18, 2016

Add default content-type to GettingStartedResource
If the default content-type for responses was missing, Jersey tried to use "text/xml"
as default, which resulted in an error message:

MessageBodyWriter not found for media type=text/xml

Adding an explicit default ("application/json") fixes this issue.

Fixes #1700

@joschi joschi added this to the 2.0.0 milestone Jan 18, 2016

@joschi joschi added the bug label Jan 18, 2016

@joschi joschi self-assigned this Jan 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment