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 922 forks source link

Error 500: Internal Server Error - Exporting Project #7236

Open stuartdrennano opened 3 years ago

stuartdrennano commented 3 years ago

Possibly something wrong with my config, but I can't work it out. Any thoughts would be greatly appreciated.

Describe the bug When attempting to export a project (welcome-project-community or howegrown) the UI moves to welcome-project-community/exportPrepare and displays

Error 500: Internal Server Error
URI
/rundeck/project/welcome-project-community/exportPrepare
Class
java.lang.NullPointerException
Message
null

My Rundeck detail

To Reproduce Steps to reproduce the behavior:

  1. Go to Project Settings
  2. Click Export Archive
  3. Click Export Archive

Options selected on export screen seem to make no difference

Expected behavior Project archive file is downloaded

Screenshots

image

Desktop (please complete the following information):

Additional context

Stacktrace:

[2021-08-29T11:45:14,352] ERROR errors.GrailsExceptionResolver - NullPointerException occurred when processing request: [POST] /rundeck/project/welcome-project-community/exportPrepare
Stacktrace follows:
java.lang.NullPointerException: null
        at rundeck.services.ProjectService.$tt__validateAllProjectComponentExportOptions(ProjectService.groovy:1363) ~[classes/:?]
        at grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94) ~[grails-datastore-gorm-7.0.4.RELEASE.jar:?]
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.1.18.RELEASE.jar:5.1.18.RELEASE]
        at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91) ~[grails-datastore-gorm-7.0.4.RELEASE.jar:?]
        at rundeck.controllers.ProjectController.exportPrepare(ProjectController.groovy:159) ~[classes/:?]
        at org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223) ~[grails-core-4.0.3.jar:4.0.3]
        at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188) ~[grails-core-4.0.3.jar:4.0.3]
        at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90) ~[grails-web-url-mappings-4.0.3.jar:4.0.3]
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.1.18.RELEASE.jar:5.1.18.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.1.18.RELEASE.jar:5.1.18.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.1.18.RELEASE.jar:5.1.18.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.1.18.RELEASE.jar:5.1.18.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.1.18.RELEASE.jar:5.1.18.RELEASE]
        at org.rundeck.grails.plugins.securityheaders.RundeckSecurityHeadersFilter.doFilterInternal(RundeckSecurityHeadersFilter.groovy:67) ~[grails-securityheaders-3.4.3-20210823.jar:?]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at grails.plugin.springsecurity.web.UpdateRequestContextHolderExceptionTranslationFilter.doFilter(UpdateRequestContextHolderExceptionTranslationFilter.groovy:64) ~[spring-security-core-4.0.2.jar:?]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.groovy:54) ~[spring-security-core-4.0.2.jar:?]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.groovy:64) ~[spring-security-core-4.0.2.jar:?]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.groovy:58) ~[spring-security-core-4.0.2.jar:?]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]
        at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77) ~[grails-web-mvc-4.0.3.jar:4.0.3]
        at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-4.0.3.jar:4.0.3]
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128) ~[spring-boot-2.1.13.RELEASE.jar:2.1.13.RELEASE]
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66) ~[spring-boot-2.1.13.RELEASE.jar:2.1.13.RELEASE]
        at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103) ~[spring-boot-2.1.13.RELEASE.jar:2.1.13.RELEASE]
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121) ~[spring-boot-2.1.13.RELEASE.jar:2.1.13.RELEASE]
        at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) ~[log4j-web-2.13.3.jar:2.13.3]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_301]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_301]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_301]

Trace from web ui

    Line | Method
->> 1363 | $tt__validateAllProjectComponentExportOptions in rundeck.services.ProjectService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     94 | doInTransaction                               in grails.gorm.transactions.GrailsTransactionTemplate$2
|    140 | execute . . . . . . . . . . . . . . . . . . . in org.springframework.transaction.support.TransactionTemplate
|     91 | execute                                       in grails.gorm.transactions.GrailsTransactionTemplate
|    159 | exportPrepare . . . . . . . . . . . . . . . . in rundeck.controllers.ProjectController
|    223 | invoke                                        in org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker
|    188 | invoke . . . . . . . . . . . . . . . . . . .  in org.grails.core.DefaultGrailsControllerClass
|     90 | handle                                        in org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter
|   1040 | doDispatch . . . . . . . . . . . . . . . . .  in org.springframework.web.servlet.DispatcherServlet
|    943 | doService                                     in     ''
|   1006 | processRequest . . . . . . . . . . . . . . .  in org.springframework.web.servlet.FrameworkServlet
|    909 | doPost                                        in     ''
|    883 | service . . . . . . . . . . . . . . . . . . . in     ''
|     67 | doFilterInternal                              in org.rundeck.grails.plugins.securityheaders.RundeckSecurityHeadersFilter
|    320 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    127 | invoke                                        in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
|     91 | doFilter . . . . . . . . . . . . . . . . . .  in     ''
|    334 | doFilter                                      in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    119 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.access.ExceptionTranslationFilter
|     64 | doFilter                                      in grails.plugin.springsecurity.web.UpdateRequestContextHolderExceptionTranslationFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|     54 | doFilter                                      in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    158 | doFilter                                      in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    170 | doFilter                                      in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    200 | doFilter                                      in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|     64 | doFilter                                      in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    105 | doFilter                                      in org.springframework.security.web.context.SecurityContextPersistenceFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|     58 | doFilter                                      in grails.plugin.springsecurity.web.SecurityRequestHolderFilter
|    334 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
|    215 | doFilterInternal                              in org.springframework.security.web.FilterChainProxy
|    178 | doFilter . . . . . . . . . . . . . . . . . .  in     ''
|     77 | doFilterInternal                              in org.grails.web.servlet.mvc.GrailsWebRequestFilter
|     67 | doFilterInternal . . . . . . . . . . . . . .  in org.grails.web.filters.HiddenHttpMethodFilter
|    128 | doFilter                                      in org.springframework.boot.web.servlet.support.ErrorPageFilter
|     66 | access$000 . . . . . . . . . . . . . . . . .  in     ''
|    103 | doFilterInternal                              in org.springframework.boot.web.servlet.support.ErrorPageFilter$1
|    121 | doFilter . . . . . . . . . . . . . . . . . .  in org.springframework.boot.web.servlet.support.ErrorPageFilter
|     71 | doFilter                                      in org.apache.logging.log4j.web.Log4jServletFilter
|   1149 | runWorker . . . . . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
|    624 | run                                           in java.util.concurrent.ThreadPoolExecutor$Worker
^    748 | run . . . . . . . . . . . . . . . . . . . . . in java.lang.Thread
MegaDrive68k commented 3 years ago

Hello @stuartdrennano

I'm trying to reproduce your issue unsuccessfully. The issue happens on a fresh rundeck/docker instance? or only against Oracle as backend?

Regards!

agiwalpooja20-zz commented 2 years ago

@MegaDrive68k I am seeing the same issue on rundeck versions v3.4.9. I am trying to export the archive and same error is thrown.

agiwalpooja20-zz commented 2 years ago

Any workaround is much appreciated

stale[bot] commented 1 year 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