rundeck / rundeck

Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts
http://rundeck.org
Apache License 2.0
5.55k stars 920 forks source link

Unable to schedule jobs in rundeck #3156

Closed devinnasar closed 4 years ago

devinnasar commented 6 years ago

Issue type: Bug report/Enhancement Request

My Rundeck detail

Expected Behavior I would expect to see some kind of interface confirming that I've scheduled a job. this doesn't happen. Instead, I get the following error. It's unclear what kind of configuration might be missing in the meanwhile.

An Error Occurred Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:form>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session

Error Details Request: /project/cd_ops/job/update/7f5f0d44-0c48-4de0-a02b-f8f296bdcf2b?notifyAvgDurationSubject=&nodeRankAttribute=&crontabString=0+00+18+%3F+*+Mon+*&retryDelay=&crontab.dayOfWeek._SUN=&crontab=%5BdayOfWeek._SUN%3A%2C+dayOfWeek%3A%5B_SUN%3A%2C+_WED%3A%2C+_TUE%3A%2C+_MON%3A%2C+_FRI%3A%2C+_SAT%3A%2C+_THU%3A%5D%2C+dayOfWeek._WED%3A%2C+month._MAR%3A%2C+month%3A%5B_MAR%3A%2C+_SEP%3A%2C+_MAY%3A%2C+_JUL%3A%2C+_FEB%3A%2C+_JUN%3A%2C+_AUG%3A%2C+_NOV%3A%2C+_DEC%3A%2C+_JAN%3A%2C+_OCT%3A%2C+_APR%3A%5D%2C+month._SEP%3A%2C+month._MAY%3A%2C+month._JUL%3A%2C+dayOfWeek._TUE%3A%2C+dayOfWeek._MON%3A%2C+month._FEB%3A%2C+month._JUN%3A%2C+dayOfWeek._FRI%3A%2C+month._AUG%3A%2C+month._NOV%3A%2C+dayOfWeek._SAT%3A%2C+dayOfWeek._THU%3A%2C+month._DEC%3A%2C+month._JAN%3A%2C+month._OCT%3A%2C+month._APR%3A%5D&_sessionwf=true&notifySuccessRecipients=&SYNCHRONIZER_TOKEN=f13e3ecafe42bf13f4502fb5c2dc58c2eac2927a25d089cd81a8b1357a24fc1e&scheduleEnabled=true&crontab.dayOfWeek._WED=&notifyFailureUrl=&timeZone=&notifyFailureRecipients=&workflow.strategy=node-first&workflow=%5Bstrategy%3Anode-first%2C+keepgoing%3Afalse%5D&executionEnabled=true&crontab.month._MAR=&crontab.month._SEP=&dayOfMonth=%3F&nodesSelectedByDefault=true&nodeFilterEditable=false&everyDayOfWeek=true&crontab.month._MAY=&notifyStartRecipients=&_notifyOnsuccessUrl=&orig.workflow.strategyPlugin.sequential.config.info=&orig=%5Bworkflow.strategyPlugin.sequential.config.info%3A%2C+workflow%3A%5BstrategyPlugin.sequential.config.info%3A%2C+strategyPlugin%3A%5Bsequential.config.info%3A%2C+sequential%3A%5Bconfig.info%3A%2C+config%3A%5Binfo%3A%5D%5D%2C+node-first.config.info%3A%2C+node-first%3A%5Bconfig.info%3A%2C+config%3A%5Binfo%3A%5D%5D%5D%2C+strategyPlugin.node-first.config.info%3A%5D%2C+orchestratorPlugin.subset.config.count%3A%2C+orchestratorPlugin%3A%5Bsubset.config.count%3A%2C+subset%3A%5Bconfig.count%3A%2C+config%3A%5Bcount%3A%5D%5D%2C+maxPercentage.config.percent%3A%2C+maxPercentage%3A%5Bconfig.percent%3A%2C+config%3A%5Bpercent%3A%5D%5D%5D%2C+orchestratorPlugin.maxPercentage.config.percent%3A%2C+workflow.strategyPlugin.node-first.config.info%3A%5D&notifyStartUrl=&crontab.month._JUL=&crontab.dayOfWeek._TUE=&_sessionopts=true&crontab.dayOfWeek._MON=&crontab.month._FEB=&crontab.month._JUN=&orig.orchestratorPlugin.subset.config.count=&crontab.dayOfWeek._FRI=&SYNCHRONIZER_URI=%2Fproject%2Fcd_ops%2Fjob%2Fedit%2F7f5f0d44-0c48-4de0-a02b-f8f296bdcf2b&_everyMonth=&filter=files&_notifyAvgDurationUrl=&logOutputThresholdAction=halt&_notifyOnsuccessEmail=&loglevel=INFO&notifyAvgDurationRecipients=&useCrontabString=true&notifyStartSubject=&notifyFailureSubject=&_notifyFailureAttach=&nodeThreadcount=1&_notifySuccessAttach=&crontab.month._AUG=&notifySuccessUrl=&_notifyOnstartUrl=&orig.orchestratorPlugin.maxPercentage.config.percent=&jobName=Ship+Data+delivery+to+GoodData&_notifyOnfailureEmail=&successOnEmptyNodeFilter=false&logOutputThreshold=&orchestratorPlugin.subset.config.count=1&orchestratorPlugin=%5Bsubset.config.count%3A1%2C+subset%3A%5Bconfig.count%3A1%2C+config%3A%5Bcount%3A1%5D%5D%2C+maxPercentage.config.percent%3A33%2C+maxPercentage%3A%5Bconfig.percent%3A33%2C+config%3A%5Bpercent%3A33%5D%5D%5D&notifyAvgDurationUrl=&orchestratorPlugin.maxPercentage.config.percent=33&crontab.month._NOV=&multipleExecutions=false&workflow.keepgoing=false&crontab.dayOfWeek._SAT=&orig.workflow.strategyPlugin.node-first.config.info=&_everyDayOfWeek=&_action_Update=Save&doNodedispatch=true&formInput=true&orchestratorId=&scheduled=true&description=&timeout=&nodeExcludePrecedence=true&crontab.dayOfWeek._THU=&logOutputThresholdStatus=&_notifyOnstartEmail=&hour=18&groupPath=&crontab.month._DEC=&retry=&notified=false&notifySuccessSubject=&everyMonth=true&nodeKeepgoing=false&crontab.month._JAN=&nodeRankOrderAscending=true&minute=00&crontab.month._OCT=&_notifyAvgDurationEmail=&_notifyOnfailureUrl=&crontab.month._APR=&notifyOnfailureUrl=false&notifyOnfailureEmail=false&notifyOnsuccessEmail=false&notifyOnsuccessUrl=false&notifyOnstartEmail=false&notifyOnstartUrl=false&notifyAvgDurationEmail=false&notifyOnAvgDurationUrl=false Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:form>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session Caused by: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:form>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session Class: gsp_rundeck_scheduledExecution_optView_gsp At Line: [528]

Stacktrace

org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:form>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session 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:529) 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) Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag <g:form>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecutionedit_gsp$_run_closure2.doCall(gsp_rundeck_scheduledExecutionedit_gsp.groovy:58) at gsp_rundeck_scheduledExecutionedit_gsp.run(gsp_rundeck_scheduledExecutionedit_gsp.groovy:61) ... 44 more Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:form>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_editForm_gsp.run(gsp_rundeck_scheduledExecution_editForm_gsp.groovy:44) ... 46 more Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_editForm_gsp$_run_closure1.doCall(gsp_rundeck_scheduledExecution_editForm_gsp.groovy:37) at rundeck.UtilityTagLib$_closure51.doCall(UtilityTagLib.groovy:1100) ... 47 more Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_edit_gsp.run(gsp_rundeck_scheduledExecution_edit_gsp.groovy:163) ... 49 more Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_detailsOptions_gsp.run(gsp_rundeck_scheduledExecution_detailsOptions_gsp.groovy:25) ... 50 more Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_optlistContent_gsp.run(gsp_rundeck_scheduledExecution_optlistContent_gsp.groovy:29) ... 51 more Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_optlistitemContent_gsp.run(gsp_rundeck_scheduledExecution_optlistitemContent_gsp.groovy:21) ... 52 more Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: rundeck.Option.values, could not initialize proxy - no Session at gsp_rundeck_scheduledExecution_optView_gsp.run(gsp_rundeck_scheduledExecution_optView_gsp.groovy:62) ... 53 more

How to Reproduce

Edit the job > Select 'Yes' for Schedule to Run Repeatedly > Enter cron expression: (I used 0 0 0 18 ? *) > Save the Job.

ShedPlant commented 6 years ago

I've also seen this but get a bit better error when trying to upload the same thing in YAML. The problem is that I have mandatory options which are dynamically generated from a web url. But when using Rundeck web UI I don't see below useful error

Invalid Option definition: SOFTWARE-CODELINE: Specify a Default Value for Required options when the Job is scheduled.

stale[bot] commented 4 years ago

In an effort to focus on bugs and issues that impact currently supported versions of Rundeck, we have elected to notify GitHub issue creators if their issue is classified as stale and close the issue. An issue is identified as stale when there have been no new comments, responses or other activity within the last 12 months. If a closed issue is still present please feel free to open a new Issue against the current version and we will review it. If you are an enterprise customer, please contact your Rundeck Support to assist in your request. Thank you, The Rundeck Team