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

API Attempting to enable/disable schedule on a job without a schedule throws 500 #3164

Closed
guice opened this issue Mar 1, 2018 · 1 comment

Comments

Projects
None yet
4 participants
@guice
Copy link

commented Mar 1, 2018

Issue type: Bug report

POST to job/[id]/schedule/enable or disable for a job without a schedule results in an ugly 500 error. On page:

(formatted for prettiness)

No signature of 
   method: rundeck.services.ApiService.renderErrorFormat() is applicable for argument 
   types: (java.lang.Integer, com.codahale.metrics.servlet.AbstractInstrumentedFilter$StatusExposingServletResponse) 
   values: 
[500, com.codahale.metrics.servlet.AbstractInstrumentedFilter$StatusExposingServletResponse@4247e7d5] 

Possible solutions: renderErrorFormat(javax.servlet.http.HttpServletResponse, java.util.Map)

Headers

X-Rundeck-Auth-Token: dUgkT2ujA8xkzi4IANzSxQPQJytiQlaF
Content-Type: application/json
Accept: application/json

Service.log

==> service.log <==
ERROR GrailsExceptionResolver: MissingMethodException occurred when processing request: [POST] /api/21/job/e640ba7d-6939-46ec-80d9-28e72bff4d30/schedule/disable
No signature of method: rundeck.services.ApiService.renderErrorFormat() is applicable for argument types: (java.lang.Integer, com.codahale.metrics.servlet.AbstractInstrumentedFilter$StatusExposingServletResponse) values: [500, com.codahale.metrics.servlet.AbstractInstrumentedFilter$StatusExposingServletResponse@638ba7d4]
Possible solutions: renderErrorFormat(javax.servlet.http.HttpServletResponse, java.util.Map). Stacktrace follows:
groovy.lang.MissingMethodException: No signature of method: rundeck.services.ApiService.renderErrorFormat() is applicable for argument types: (java.lang.Integer, com.codahale.metrics.servlet.AbstractInstrumentedFilter$StatusExposingServletResponse) values: [500, com.codahale.metrics.servlet.AbstractInstrumentedFilter$StatusExposingServletResponse@638ba7d4]
Possible solutions: renderErrorFormat(javax.servlet.http.HttpServletResponse, java.util.Map)
	at rundeck.controllers.ScheduledExecutionController.apiFlipScheduleEnabled(ScheduledExecutionController.groovy:1302)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1515)
	at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
	at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:519)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:582)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:448)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:261)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:101)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at com.dtolabs.rundeck.server.filters.AuthFilter.doFilter(AuthFilter.java:74)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:519)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:540)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:448)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:446)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:271)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:246)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
	at java.lang.Thread.run(Thread.java:748)

My Rundeck detail

  • Rundeck version: 2.10.6

Expected Behavior

POST to job/[id]/schedule/[enable|disable] on a job without a Schedule should result in the same error provided by jobs/schedule/enable

  • api.error.job.toggleSchedule.notScheduled : Cannot toggle schedule for Job {{Job e640ba7d-6939-46ec-80d9-28e72bff4d30}}: not a scheduled Job

How to Reproduce

  • Create a new job, don't give it a schedule
  • Attempt to enable/disable the schedule directly via the job/[id]/ API

@gschueler gschueler added the bug label Mar 5, 2018

@fgutierrezz

This comment has been minimized.

Copy link

commented Apr 18, 2019

The issue also happens in 3.0.20

@carlosrfranco carlosrfranco self-assigned this Apr 23, 2019

carlosrfranco added a commit to carlosrfranco/rundeck that referenced this issue Apr 24, 2019

@gschueler gschueler added this to the 3.0.22 milestone Apr 25, 2019

gschueler added a commit that referenced this issue Apr 25, 2019

Merge pull request #4748 from carlosrfranco/issue/3164
Improvements on message error when call API to enable or disable for a job without a schedule #3164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.