Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57762

jenkins returns internal server error (500) when sending a note hook from GitLab

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins version : Jenkins ver. 2.179
      GitLab Plugin:1.5.12
      Gitlab Hook Plugin:1.4.2
      gitlab:GitLab Community Edition 11.9.9
      operating system:centos 7.6.1810
      web browser :Chrome
      java version :1.8.0_211
    • Similar Issues:

      Description

      Request URL: POST http://47.245.31.45:8888/project/test 500Request URL: POST http://47.245.31.45:8888/project/test 500
      Trigger: Note Hook
      Elapsed time: 0.01 sec
      Request time: 1 hour ago
      Request headers:Content-Type: application/jsonX-Gitlab-Event: Note HookX-Gitlab-Token: 09d061d048de432c3f9d7c6604dfdc5dRequest body:{  "object_kind": "note",  "event_type": "note",  "user":

      {    "name": "jenkins",    "username": "rootjenkins",    "avatar_url": "https://www.gravatar.com/avatar/70a98641d937b70de0e27523a15cf114?s=80&d=identicon"  }

      ,  "project_id": 1,  "project": {    "id": 1,    "name": "yuntech",    "description": "",    "web_url": "http://47.245.31.45/root/yuntech",    "avatar_url": null,    "git_ssh_url": "git@47.245.31.45:root/yuntech.git",    "git_http_url": "http://47.245.31.45/root/yuntech.git",    "namespace": "root",    "visibility_level": 0,    "path_with_namespace": "root/yuntech",    "default_branch": "master",    "ci_config_path": null,    "homepage": "http://47.245.31.45/root/yuntech",    "url": "git@47.245.31.45:root/yuntech.git",    "ssh_url": "git@47.245.31.45:root/yuntech.git",    "http_url": "http://47.245.31.45/root/yuntech.git"  },  "object_attributes": {    "attachment": null,    "author_id": 4,    "change_position": null,    "commit_id": "6ddf8586b1b0f3e31a53f4ea00a9b4f765f08c51",    "created_at": "2019-05-30 09:05:16 UTC",    "discussion_id": "2f3af6fa84e4d0c1f6ee0d7880bd31ecb051917b",    "id": 28,    "line_code": null,    "note": "good",    "noteable_id": null,    "noteable_type": "Commit",    "original_position": null,    "position": null,    "project_id": 1,    "resolved_at": null,    "resolved_by_id": null,    "resolved_by_push": null,    "st_diff": null,    "system": false,    "type": null,    "updated_at": "2019-05-30 09:05:16 UTC",    "updated_by_id": null,    "description": "good",    "url": "http://47.245.31.45/root/yuntech/commit/6ddf8586b1b0f3e31a53f4ea00a9b4f765f08c51#note_28"  },  "repository": {    "name": "yuntech",    "url": "git@47.245.31.45:root/yuntech.git",    "description": "",    "homepage": "http://47.245.31.45/root/yuntech"  },  "commit": {    "id": "6ddf8586b1b0f3e31a53f4ea00a9b4f765f08c51",    "message": "Update 1",    "timestamp": "2019-05-29T06:56:06Z",    "url": "http://47.245.31.45/root/yuntech/commit/6ddf8586b1b0f3e31a53f4ea00a9b4f765f08c51",    "author":

      {      "name": "xiaopangzl",      "email": "405812432@qq.com"    }

        }}Response headers:Connection: closeDate: Thu, 30 May 2019 09:12:01 GMTX-Content-Type-Options: nosniffExpires: Thu, 01 Jan 1970 00:00:00 GMTCache-Control: no-cache,no-store,must-revalidateX-Hudson-Theme: defaultReferrer-Policy: same-originContent-Type: text/html;charset=utf-8Set-Cookie: JSESSIONID.2c258c5f=node01xjlk4mxk6h071ks0bg83rrc8m15.node0;Path=/;HttpOnlyX-Hudson: 1.395X-Jenkins: 2.179X-Jenkins-Session: dab4b8a4X-Frame-Options: sameoriginX-Instance-Identity: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh1tTTFDIWKHD6vPS1FxSriviYZu/Ww+P88hvNlGVIlzhqcn06VeqZ/iSXOVWnFzkkhX4piyeRPwzi6HDA5Io7m60TcvppXIALvhSMnTo2VIpd/zIUBBO4ksAgLS5QTuoBc3L7a2eGYbP4l6hlFiojkGlZmsJBxepBMCNA5ZHd36BiocFT/U+LtjS4xmsz2Vi8DEeX2l+HRMBba+JPY5xUqvK9yReRPlAnwF/gQMZQt450rIzRGibgHPqOkHt9IOTGDHQ/fO/TeFZBPtvcyBT/pqdRzy8LnxYWoUjs8ATebyigEK1qJK0VINJx92dD+wi7bJuIIKolGxTeiCEm27R+wIDAQABContent-Length: 15240Server: Jetty(9.4.z-SNAPSHOT)Response body:

       

          <!DOCTYPE html><html><head resURL="/static/dab4b8a4" data-rooturl="" data-resurl="/static/dab4b8a4">    
          <title>Jenkins [Jenkins]</title><link rel="stylesheet" href="/static/dab4b8a4/css/layout-common.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/css/style.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/css/color.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/css/responsive-grid.css" type="text/css" /><link rel="shortcut icon" href="/static/dab4b8a4/favicon.ico" type="image/vnd.microsoft.icon" /><link color="black" rel="mask-icon" href="/images/mask-icon.svg" /><script>var isRunAsTest=false; var rootURL=""; var resURL="/static/dab4b8a4";</script><script src="/static/dab4b8a4/scripts/prototype.js" type="text/javascript"></script><script src="/static/dab4b8a4/scripts/behavior.js" type="text/javascript"></script><script src='/adjuncts/dab4b8a4/org/kohsuke/stapler/bind.js' type='text/javascript'></script><script src="/static/dab4b8a4/scripts/yui/yahoo/yahoo-min.js"></script><script src="/static/dab4b8a4/scripts/yui/dom/dom-min.js"></script><script src="/static/dab4b8a4/scripts/yui/event/event-min.js"></script><script src="/static/dab4b8a4/scripts/yui/animation/animation-min.js"></script><script src="/static/dab4b8a4/scripts/yui/dragdrop/dragdrop-min.js"></script><script src="/static/dab4b8a4/scripts/yui/container/container-min.js"></script><script src="/static/dab4b8a4/scripts/yui/connection/connection-min.js"></script><script src="/static/dab4b8a4/scripts/yui/datasource/datasource-min.js"></script><script src="/static/dab4b8a4/scripts/yui/autocomplete/autocomplete-min.js"></script><script src="/static/dab4b8a4/scripts/yui/menu/menu-min.js"></script><script src="/static/dab4b8a4/scripts/yui/element/element-min.js"></script><script src="/static/dab4b8a4/scripts/yui/button/button-min.js"></script><script src="/static/dab4b8a4/scripts/yui/storage/storage-min.js"></script><script src="/static/dab4b8a4/scripts/hudson-behavior.js" type="text/javascript"></script><script src="/static/dab4b8a4/scripts/sortable.js" type="text/javascript"></script><script>crumb.init("Jenkins-Crumb", "1c1558179e1509179ff9bf3b53c5ad75");</script><link rel="stylesheet" href="/static/dab4b8a4/scripts/yui/container/assets/container.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/scripts/yui/assets/skins/sam/skin.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/scripts/yui/container/assets/skins/sam/container.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/scripts/yui/button/assets/skins/sam/button.css" type="text/css" /><link rel="stylesheet" href="/static/dab4b8a4/scripts/yui/menu/assets/skins/sam/menu.css" type="text/css" /><meta name="ROBOTS" content="INDEX,NOFOLLOW" /><meta name="viewport" content="width=device-width, initial-scale=1" /><script src="/static/dab4b8a4/jsbundles/page-init.js" type="text/javascript"></script></head><body data-model-type="hudson.model.Hudson" id="jenkins" class="yui-skin-sam two-column jenkins-2.179" data-version="2.179"><a href="#skip2content" class="skiplink">Skip to content</a><div id="page-head"><div id="header"><div class="logo"><a id="jenkins-home-link" href="/"><img src="/static/dab4b8a4/images/headshot.png" alt="[Jenkins]" id="jenkins-head-icon" /><img src="/static/dab4b8a4/images/title.png" alt="Jenkins" width="139" id="jenkins-name-icon" height="34" /></a></div><div class="login"> <a href="/login?from=%2Fproject%2Ftest"><b>log in</b></a></div><div class="searchbox hidden-xs"><form role="search" method="get" name="search" action="/search/" style="position:relative;" class="no-json"><div id="search-box-minWidth"></div><div id="search-box-sizer"></div><div id="searchform"><input role="searchbox" name="q" placeholder="search" id="search-box" class="has-default-text" /> <a href="https://jenkins.io/redirect/search-box"><img src="/static/dab4b8a4/images/16x16/help.png" style="width: 16px; height: 16px; " class="icon-help icon-sm" /></a><div id="search-box-completion"></div><script>createSearchBox("/search/");</script></div></form></div></div><div id="breadcrumbBar"><tr id="top-nav"><td id="left-top-nav" colspan="2"><link rel='stylesheet' href='/adjuncts/dab4b8a4/lib/layout/breadcrumbs.css' type='text/css' /><script src='/adjuncts/dab4b8a4/lib/layout/breadcrumbs.js' type='text/javascript'></script><div class="top-sticker noedge"><div class="top-sticker-inner"><div id="right-top-nav"></div><ul id="breadcrumbs"><li class="item"><a href="/" class="model-link inside">Jenkins</a></li><li href="/" class="children"></li></ul><div id="breadcrumb-menu-target"></div></div></div></td></tr></div></div><div id="page-body" class="clear"><div id="side-panel"><div class="task"><a href="https://jenkins.io/" class="task-icon-link"><img src="/static/dab4b8a4/images/24x24/next.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-next icon-md" /></a> <a href="https://jenkins.io/" class="task-link">Jenkins project</a></div><div class="task"><a href="https://jenkins.io/redirect/report-an-issue" class="task-icon-link"><img src="/static/dab4b8a4/images/24x24/gear2.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-gear2 icon-md" /></a> <a href="https://jenkins.io/redirect/report-an-issue" class="task-link">Bug tracker</a></div><div class="task"><a href="https://jenkins.io/redirect/mailing-lists" class="task-icon-link"><img src="/static/dab4b8a4/images/24x24/search.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-search icon-md" /></a> <a href="https://jenkins.io/redirect/mailing-lists" class="task-link">Mailing Lists</a></div><div class="task"><a href="https://twitter.com/jenkinsci" class="task-icon-link"><img src="/static/dab4b8a4/images/24x24/user.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-user icon-md" /></a> <a href="https://twitter.com/jenkinsci" class="task-link">Twitter: @jenkinsci</a></div></div><div id="main-panel"><a name="skip2content"></a><h1 style="text-align: center"><img src="/static/dab4b8a4/images/rage.png" width="154" height="179" /><span style="font-size:50px"> Oops!</span></h1><div id="error-description"><p>A problem occurred while processing the request.        Please check <a href="https://jenkins.io/redirect/issue-tracker">our bug tracker</a> to see if a similar problem has already been reported.        If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem.        If you think this is a new issue, please file a new issue.        When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins.        <a href="https://jenkins.io/redirect/users-mailing-list">The users list</a> might be also useful in understanding what has happened.</p><h2>Stack trace</h2><pre style="margin:2em; clear:both">java.lang.NullPointerException at com.dabsquared.gitlabjenkins.trigger.handler.note.NoteHookTriggerHandlerImpl.retrieveCauseData(NoteHookTriggerHandlerImpl.java:66) at com.dabsquared.gitlabjenkins.trigger.handler.note.NoteHookTriggerHandlerImpl.retrieveCauseData(NoteHookTriggerHandlerImpl.java:23) at com.dabsquared.gitlabjenkins.trigger.handler.AbstractWebHookTriggerHandler.createActions(AbstractWebHookTriggerHandler.java:85) at com.dabsquared.gitlabjenkins.trigger.handler.AbstractWebHookTriggerHandler.handle(AbstractWebHookTriggerHandler.java:54) at com.dabsquared.gitlabjenkins.trigger.handler.note.NoteHookTriggerHandlerImpl.handle(NoteHookTriggerHandlerImpl.java:36) at com.dabsquared.gitlabjenkins.trigger.handler.note.NoteHookTriggerHandlerImpl.handle(NoteHookTriggerHandlerImpl.java:23) at com.dabsquared.gitlabjenkins.GitLabPushTrigger.onPost(GitLabPushTrigger.java:470) at com.dabsquared.gitlabjenkins.webhook.build.NoteBuildAction$1.performOnPost(NoteBuildAction.java:57) at com.dabsquared.gitlabjenkins.webhook.build.BuildWebHookAction$TriggerNotifier.run(BuildWebHookAction.java:54) at hudson.security.ACL.impersonate(ACL.java:273) at com.dabsquared.gitlabjenkins.webhook.build.NoteBuildAction.execute(NoteBuildAction.java:54) at com.dabsquared.gitlabjenkins.webhook.GitLabWebHook.getDynamic(GitLabWebHook.java:44) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:454) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:797) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at com.dabsquared.gitlabjenkins.webhook.GitLabWebHook$GitlabWebHookCrumbExclusion.process(GitLabWebHook.java:53) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:73) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:505) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804) at java.lang.Thread.run(Thread.java:748)</pre></div></div></div><footer><div class="container-fluid"><div class="row"><div class="col-md-6" id="footer"></div><div class="col-md-18"><span class="page_generated">Page generated: May 30, 2019 5:12:01 PM CST</span><span class="rest_api"><a href="api/">REST API</a></span><span class="jenkins_ver"><a href="https://jenkins.io/">Jenkins ver. 2.179</a></span></div></div></div></footer></body></html>

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            javiplx Javier Palacios
            Reporter:
            xiaopangzl zhao l
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: