mesosphere / marathon

Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
https://mesosphere.github.io/marathon/
Apache License 2.0
4.07k stars 845 forks source link

Incorrect Constraint lead to an application exception, but should give an error response #2951

Closed akunaatrium closed 8 years ago

akunaatrium commented 8 years ago

Trying to apply a configuration change for a task results in Marathon showing the following error message at the bottom of the dialog box:

"Unknown server error, could not create or apply app."

Syslog shows a stack trace that begins with this: Jan 11 21:31:03 vagrant marathon[1055]: java.lang.IndexOutOfBoundsException: 1 Jan 11 21:31:03 vagrant marathon[1055]: #011at scala.collection.LinearSeqOptimized$class.apply(LinearSeqOptimized.scala:65) ~[marathon:0.13.0] Jan 11 21:31:03 vagrant marathon[1055]: #011at scala.collection.immutable.List.apply(List.scala:84) ~[marathon:0.13.0] Jan 11 21:31:03 vagrant marathon[1055]: #011at mesosphere.marathon.api.v2.json.V2Formats$$anonfun$ConstraintFormat$1.apply(Formats.scala:383) ~[marathon:0.13.0] Jan 11 21:31:03 vagrant marathon[1055]: #011at mesosphere.marathon.api.v2.json.V2Formats$$anonfun$ConstraintFormat$1.apply(Formats.scala:379) ~[marathon:0.13.0] Jan 11 21:31:03 vagrant marathon[1055]: #011at play.api.libs.json.JsResult$class.map(JsResult.scala:77) ~[marathon:0.13.0] Jan 11 21:31:03 vagrant marathon[1055]: #011at play.api.libs.json.JsSuccess.map(JsResult.scala:9) ~[marathon:0.13.0]

Unfortunately I am unable to reproduce the error at this time.

aquamatthias commented 8 years ago

The code reference indicate, that your app definition holds an invalid constraint. The json reader tries to read the operation and fails. 1) you will not run into this problem with correct constraint definition 2) the json reader has to be improved to not throw an exception, but give you an error response

akunaatrium commented 8 years ago

Interesting, because what I was actually doing was removing a constraint.

dalekurt commented 8 years ago

I get this error message when attempting to deploy a docker container from the marathon web interface, screenshot 2016-01-19 11 46 23

How can I troubleshoot this issue?

meichstedt commented 8 years ago

@dalekurt is your problem in any way related to the original (closed) issue? btw: you either specify a cmd, or a docker image to be used.

dalekurt commented 8 years ago

The closest relation to that issue is the message. Do you think I should just create a new issue?

meichstedt commented 8 years ago

Yes please. The original issue was about an error triggered by a config change of constraints – afaict that's pretty unrelated.

dalekurt commented 8 years ago

Will do