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

Cannot add job reference as workflow step #3200

Closed mcassaniti closed 4 years ago

mcassaniti commented 6 years ago

Issue type: Bug report

My Rundeck detail

Expected Behavior When adding a referenced job and saving the project there is no error. I'm seeing an error in particular when adding a referenced job as an error handler.

How to Reproduce

Error 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

Traceback

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
jasonschwab commented 6 years ago

I'm also seeing this error if I try to add a Flow Control step as an error handler to another step.

macgyver603 commented 6 years ago

I ran into this issue as well, but it looks like error handlers only work with steps of the same type. I think this makes sense since it is possible to run Node Steps on any number of machines, but Workflow Steps can only be run once per execution. Having a Workflow Step as an error handler for a Node Step would require it to be run more than once in an execution under certain circumstances.

Granted, I think it would be great for the editor to catch this instead of having to fish around in documentation and tickets to find what is wrong, so this seems to be more of a bug with the job editor than with the job functionality.

mergeable[bot] commented 5 years ago

There haven't been much activity here. This is stale. Is it still relevant? This is a friendly reminder to please resolve it. :-)

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