-
Notifications
You must be signed in to change notification settings - Fork 27
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
net.sf.json.JSONException: JSONObject["return"] is not a JSONArray. #58
Comments
Are you saying that when you run the job, you get the error in #55 and sometimes you get this error? If you were to kick off the same calls from curl, would you get back different results? This error seems to indicate that salt did not return with a properly formatted result or came back with a result that did not include a "return" object in the array. Do you have any way of sending over the debug logs where we could see what the salt-api came back with? |
The error in #55 have occurred a few times, this has only happened once but both are from the same job. I'll have to look into doing calls with For this run there are no debug logs even though I followed the instructions as described on the plugin page. |
Sounds like a situation where the same job may be producing different output. This would indicate an error in salt. Once we get back the debug output with the actual results from the salt-api, I can adjust the parsing to correctly interpret it. Here's an example using curl to help troubleshoot: https://gist.github.com/mchugh19/61cd93440660ccbfc709 |
Can you send over examples of saltapi json output that is being marked by Jenkins as a failure? |
@mchugh19 This error has not returned and I've been unable to reproduce it. I'll close this issue until the problem resurfaces. |
This issue is back with a vengeance. Currently all our salt-jobs are failing with the output from the initial message. Started happening seemingly without reason during our nightly jobs using version 2.0.1. Upgrading to 2.1.0 did not help unfortunately. Could possibly be related to an automatic upgrade of Jenkins to 2.52 or 2.53. EDIT: A colleague upgraded salt from 2016.11.1 to 2016.11.3. Sounds like a likely culprit. EDIT2: The jobs still work when submitted from command line. |
Here's the http log:
and here's the saltstack logs:
|
The test master I'm working with is also 2016.11.3, and I've not seen this yet. In the http logs, it looks like all is fine, up until the master replies with 400. Do some local_batch jobs succeed, or are all failing every time? Is the application.host-scrapper a long running state? With the json sent from the saltstack logs, I am able to see this behavior. |
Since this started happening all I just tried running with |
Ah ha! Looks like batch was removed from the salt-api, until the batch api can be manged by eauth. Adding the two lines to |
Nice find @mchugh19! We ended up wrapping the state previously run as |
Glad you got a workaround. Head's up, local_batch was removed in 2016.11.2 |
@rbjorklin We are having the same issue, how would you convert a local_batch job into a runner ? Thanks |
@kedare Our use case was pretty simple so we just looped over a provided list of minions like this:
|
Hmm ok, I need to check how that work, I'm quite new to Salt, in my case I suppose as I'm just applying a state, I would just have to run |
|
@kedare Looks like |
Does the Jenkins plugin need reworking or it should work as it with the "new" local_batch ? |
Just a fair warning that the salt-api seems completely broken in 2016.11.4 for us. We rolled back. |
Any update about this ? |
This seems to be similar but not the same as in #36. This occurred when running the same job that caused #55. This job of ours unfortunately seem really fickle since upgrading to the 2.x branch of the plugin.
The text was updated successfully, but these errors were encountered: