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

gradle mlRestartCluster throws a 415 Unsupported Media Type #80

Closed
peetkes opened this issue Apr 8, 2016 · 2 comments
Closed

gradle mlRestartCluster throws a 415 Unsupported Media Type #80

peetkes opened this issue Apr 8, 2016 · 2 comments
Assignees
Milestone

Comments

@peetkes
Copy link
Contributor

peetkes commented Apr 8, 2016

Hi,

when I execute the command gradle mlRestartCluster I get a 415 Unsupported Media Type error.

I'm running on ML8.0-5

gradle -Penv=dev mlRestartCluster
Applying environment-based build file: env-dev.gradle
:mlRestartCluster
POST request for "http://tradestore-vm-ml1:8002/manage/v2" resulted in 415 (Unsupported Media Type); invoking error handler
Logging HTTP response body to assist with debugging: {"errorResponse":{"statusCode":"415", "status":"Unsupported Media Type", "messageCode":"REST-INVALIDMIMETYPE", "message":"REST-INVALIDMIMETYPE: (rest:INVALIDMIMETYPE) Content-Type must be one of: 'application/x-www-form-urlencoded', Received: application/json"}}
:mlRestartCluster FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':mlRestartCluster'.

    415 Unsupported Media Type

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.471 secs

@rjrudin
Copy link
Contributor

rjrudin commented Apr 8, 2016

Thanks @peetkes - sounds like state=restart will work on 8.04 and 8.05. I'll get a fix into 2.1.1 for this.

curl -v -X POST --anyauth -u admin:admin --header "Content-Type:application/x-www-form-urlencoded" -d 'state=restart' http://localhost:8002/manage/v2

@rjrudin rjrudin added this to the 2.1.1 milestone Apr 8, 2016
@rjrudin rjrudin self-assigned this Apr 8, 2016
@rjrudin rjrudin modified the milestones: 2.2.0, 2.1.1 Apr 17, 2016
@rjrudin
Copy link
Contributor

rjrudin commented May 6, 2016

Turned out to be a simple change:

client.postForm("/manage/v2", "state", "restart")

@rjrudin rjrudin closed this as completed May 6, 2016
hansenmc pushed a commit to hansenmc/ml-gradle that referenced this issue Aug 19, 2016
rjrudin added a commit that referenced this issue Aug 23, 2024
Info is too chatty when running mlWatch in ml-gradle
rjrudin added a commit that referenced this issue Aug 23, 2024
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