Open jherman opened 5 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.85. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
I noted the issue, and it appears this happens on Github when the Content Type of the hook is set to application/x-www-form-urlencoded. It appears to assume that the body is JSON encoded.
(Jenkins appears to throw the java.lang.Throwable: HttpInput idle timeout exception when there is no body in the message sent to github-webhook).
@mgust Just a heads up, that this was for BitBucket. Maybe it's the same issue?
Any update on this issue
@mgust Just a heads up, that this was for BitBucket. Maybe it's the same issue?
Ah, missed that. I suspect it may be something similar though as the error basically just seemed to mean that Jenkins didn't get a body in the trigger.
at org.eclipse.jetty.server.HttpInput$ErrorState.noContent(HttpInput.java:1080)
this part buried in the stacktrace appears to throw the TimeoutException to show there were no content.
So basically, the error is upstream. Either BitBucket isn't sending a body to Smee, or the format of the body it sends is malformed and can't be parsed.
Actually I still believe it's smee that has an issue. I ended up using socketxp instead for relaying and it works well. I have to believe the issue lies with smee.
I was experiencing the same issue with Jenkins, GitHub, and smee. Changing the Content Type to 'application/json' on the GitHub webook configuration is what finally worked for me. As @mgust indicated, setting the webhook configuration to 'application/x-www-form-urlencoded' does not appear to provide the correct response for Jenkins. Not sure is BitBucket has a similar option.
Yeah that may well be the issue and unfortunately Bitbucket doesn't let you switch content type. I also think this project has lost traction as it appears the owners haven't replied to anything in quite some time.
Is this repo is active?
@yrsurya yes, this just isn't a big problem.
Based on this comment from @mgust, it looks like this is due to passing non-JSON data to smee-client
. Whether or not some other client works with the same payload (see [this comment]()) isn't super relevant - kind of just confirms that smee-client
doesn't support application/x-www-form-urlencoded
payloads.
So, I'd say we have two options:
application/x-www-form-urlencoded
.If any of y'all want to open a PR, happy to review it. Should just be some additions here:
https://github.com/probot/smee-client/blob/2eb82ce58dbb66dc2fbcbadc7c81c6b0bcf9df2f/index.js#L19
And here (so two PRs to the different repos):
https://github.com/probot/smee.io/blob/2df8ab37683812fefe01d8a67c8af74ef12db057/server.js#L32
GitHub☁️📦 Webhook payload delivery service. Contribute to probot/smee.io development by creating an account on GitHub.
I am following this blog to setup smee client https://jenkins.io/blog/2019/01/07/webhook-firewalls/
But it didn’t work
Triggering builds with webhooks behind a secure firewallJenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software
Actually I still believe it's smee that has an issue. I ended up using socketxp instead for relaying and it works well. I have to believe the issue lies with smee.
Can I know how you configured socketxp to receive webhooks from bitbucket cloud to internal jenkins as I am also facing same 500 error issue while using sme where it is working for github
Having the same issue with BitBucket.
BitBucket is claiming to be sending Content-Type application/json
. I'll have more of a poke around and report back here.
Had a poke in the client code and captured some wireshark traces to check what was being sent to jenkins.
The problem is that for some reason (not sure why exactly) the content-length is wrong. When I prevent the content length from being added to the request it appears to work. Need to do more testing and can complete a pull request then.
Ok
Hi, any update on this issue? please let us know
Hi Any update on this issue, it would be very helpful if we can get it working for Bitbucket.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
I am hitting the same problem. I have compared a tcpdump trace of a direct connection from Bitbucket to my Jenkins (works) with the one between smee client to Jenkins.
The original POST looks like follows:
POST /bitbucket-scmsource-hook/notify/ HTTP/1.1
Host: <removed>
X-Real-IP: <removed>
X-Forwarded-For: <removed>
X-Forwarded-Host: jenkins<removed>
X-Forwarded-Port: 443
X-Forwarded-Proto: https
Connection: close
Content-Length: 7548
User-Agent: Bitbucket-Webhooks/2.0
Accept-Encoding: gzip, deflate
Accept: */*
Content-Type: application/json
X-Hook-UUID: <removed>
X-Event-Key: repo:push
X-Event-Time: Sat, 04 Jan 2020 17:07:36 GMT
X-Request-UUID: <removed>
X-Attempt-Number: 1
{"push": {"changes": [{"forced": false, "old": {"name": "feature/CAAS-2_hetzner-cloud-api-via-curl", "links": {"commits":
The packet coming from the smee client looks like follows:
POST /bitbucket-scmsource-hook/notify/ HTTP/1.1
host: smee.io
accept-encoding: gzip, deflate
user-agent: Bitbucket-Webhooks/2.0
content-type: application/json
connection: close
accept: */*
x-hook-uuid: <removed>
x-event-key: repo:push
x-event-time: Sat, 04 Jan 2020 17:19:01 GMT
x-request-uuid: <removed>
x-attempt-number: 1
x-request-id: 39efe3ca-de29-4299-a281-3f81bff2ccfa
x-forwarded-for: <removed>
x-forwarded-proto: https
x-forwarded-port: 443
via: 1.1 vegur
connect-time: 0
x-request-start: 1578158342399
total-route-time: 0
content-length: 7548
timestamp: 1578158342403
{"push":{"changes":[{"forced":false,"old":{"name":"feature/CAAS-2_hetzner-cloud-api-via-curl","links":{"commits":{"href":
I have noticed that the spaces behind :
and ,
are missing in the POST sent by the smee client. However, both are reporting the same length:
Content-Length: 7548
It seems like the content-length of the packet sent by the smee client is wrong. Is it just copied from the input packet? If I have seen it correctly from the source, the content is interpreted by a JSON slurper and it is re-built before being sent out. If so, I guess, the length should be re-calculated.
I am not sure, whether a correct content-length will solve the issue, though. Maybe we also should add the spaces? However, https://jsonformatter.curiousconcept.com/ tells me that the smee client has sent a valid JSON, so Jenkins should be able to cope with it.
This is probably not a smee client issue, but an issue of smee.io. See https://github.com/probot/smee.io/issues/5.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
I am getting the same error:
Error: cannot POST /bitbucket-scmsource-hook/notify/ (500)
at Response.toError (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/response.js:94:15)
at ResponseBase._setStatusProperties (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/response-base.js:123:16)
at new Response (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/response.js:41:8)
at Request._emitResponse (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/index.js:752:20)
at Stream.parser (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/index.js:916:38)
at Stream.emit (events.js:189:13)
at Unzip.unzip.on (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/unzip.js:55:12)
at Unzip.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1103:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
status: 500,
text:
'\n \n <!DOCTYPE html><html class=""><head resURL="/static/7d1612bd" data-rooturl="" data-resurl="/static/7d1612bd">\n \n \n\n <title>Jenkins [Jenkins]</title><link rel="stylesheet" href="/static/7d1612bd/jsbundles/base-styles-v2.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/css/color.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/css/responsive-grid.css" type="text/css"><link rel="shortcut icon" href="/static/7d1612bd/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/7d1612bd";</script><script src="/static/7d1612bd/scripts/prototype.js" type="text/javascript"></script><script src="/static/7d1612bd/scripts/behavior.js" type="text/javascript"></script><script src=\'/adjuncts/7d1612bd/org/kohsuke/stapler/bind.js\' type=\'text/javascript\'></script><script src="/static/7d1612bd/scripts/yui/yahoo/yahoo-min.js"></script><script src="/static/7d1612bd/scripts/yui/dom/dom-min.js"></script><script src="/static/7d1612bd/scripts/yui/event/event-min.js"></script><script src="/static/7d1612bd/scripts/yui/animation/animation-min.js"></script><script src="/static/7d1612bd/scripts/yui/dragdrop/dragdrop-min.js"></script><script src="/static/7d1612bd/scripts/yui/container/container-min.js"></script><script src="/static/7d1612bd/scripts/yui/connection/connection-min.js"></script><script src="/static/7d1612bd/scripts/yui/datasource/datasource-min.js"></script><script src="/static/7d1612bd/scripts/yui/autocomplete/autocomplete-min.js"></script><script src="/static/7d1612bd/scripts/yui/menu/menu-min.js"></script><script src="/static/7d1612bd/scripts/yui/element/element-min.js"></script><script src="/static/7d1612bd/scripts/yui/button/button-min.js"></script><script src="/static/7d1612bd/scripts/yui/storage/storage-min.js"></script><script src="/static/7d1612bd/scripts/hudson-behavior.js" type="text/javascript"></script><script src="/static/7d1612bd/scripts/sortable.js" type="text/javascript"></script><script>crumb.init("Jenkins-Crumb", "829a9bec34d37a30b09b4a725b62f0cf8027d90029ac612cdd872d31e2b696ea");</script><link rel="stylesheet" href="/static/7d1612bd/scripts/yui/container/assets/container.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/scripts/yui/assets/skins/sam/skin.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/scripts/yui/container/assets/skins/sam/container.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/scripts/yui/button/assets/skins/sam/button.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/scripts/yui/menu/assets/skins/sam/menu.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/css/google-fonts/roboto/css/roboto.css" type="text/css"><link rel="stylesheet" href="/static/7d1612bd/jsbundles/ui-refresh-overrides.css" type="text/css"><meta name="ROBOTS" content="INDEX,NOFOLLOW"><meta name="viewport" content="width=device-width, initial-scale=1"><script src="/adjuncts/7d1612bd/org/kohsuke/stapler/jquery/jquery.full.js" type="text/javascript"></script><script>var Q=jQuery.noConflict()</script><script src="/static/7d1612bd/jsbundles/vendors.js" type="text/javascript"></script><script src="/static/7d1612bd/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.222.1" data-version="2.222.1"><a href="#skip2content" class="skiplink">Skip to content</a><div id="page-head"><header id="header" class="page-header"><div class="page-header__brand"><div class="logo"><a id="jenkins-home-link" href="/"><img src="/static/7d1612bd/images/jenkins-header-logo-v2.svg" alt="[Jenkins]" id="jenkins-head-icon"><img src="/static/7d1612bd/images/title.png" alt="Jenkins" width="139" id="jenkins-name-icon" height="34"></a></div><a href="/" class="page-header__brand-link"><img src="/static/7d1612bd/images/jenkins-header-logo-v2.svg" alt="[Jenkins]" class="page-header__brand-image"><span class="page-header__brand-name">Jenkins</span></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="main-search__input has-default-text"><span class="main-search__icon-leading"><svg viewBox="0 0 24 24" aria-hidden="" focusable="false" class="svg-icon "><use href="/static/7d1612bd/images/material-icons/svg-sprite-action-symbol.svg#ic_search_24px"></use></svg></span><a href="https://jenkins.io/redirect/search-box" class="main-search__icon-trailing"><svg viewBox="0 0 24 24" aria-hidden="" focusable="false" class="svg-icon "><use href="/static/7d1612bd/images/material-icons/svg-sprite-action-symbol.svg#ic_help_outline_24px"></use></svg></a><div id="search-box-completion"></div><script>createSearchBox("/search/");</script></div></form></div><div class="login page-header__hyperlinks"><div id="visible-am-insertion" class="page-header__am-wrapper"></div><a href="/loginEntry?from=%2Fbitbucket-scmsource-hook%2Fnotify%2F"><b>log in</b></a></div></header><div id="breadcrumbBar"><tr id="top-nav"><td id="left-top-nav" colspan="2"><link rel=\'stylesheet\' href=\'/adjuncts/7d1612bd/lib/layout/breadcrumbs.css\' type=\'text/css\' /><script src=\'/adjuncts/7d1612bd/lib/layout/breadcrumbs.js\' type=\'text/javascript\'></script><div class="top-sticker noedge"><div class="top-sticker-inner"><div class="breadcrumbs__wrapper"><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></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/7d1612bd/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/" title="Jenkins project" 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/7d1612bd/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" title="Bug tracker" 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/7d1612bd/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" title="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/7d1612bd/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" title="Twitter: @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/7d1612bd/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.\n Please check <a href="https://jenkins.io/redirect/issue-tracker">our bug tracker</a> to see if a similar problem has already been reported.\n If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem.\n If you think this is a new issue, please file a new issue.\n When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins.\n <a href="https://jenkins.io/redirect/users-mailing-list">The users list</a> might be also useful in understanding what has happened.<h2>Stack trace</h2><pre style="margin:2em; clear:both">Also: java.lang.Throwable: HttpInput failure\n\t\tat org.eclipse.jetty.server.HttpInput.failed(HttpInput.java:830)\n\t\tat org.eclipse.jetty.server.HttpConnection$BlockingReadCallback.failed(HttpConnection.java:659)\n\t\tat org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:138)\n\t\tat org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:407)\njava.util.concurrent.TimeoutException: Idle timeout expired: 5000/5000 ms\n\tat org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:171)\n\tat org.eclipse.jetty.io.IdleTimeout.idleCheck(IdleTimeout.java:113)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\nCaused: java.io.IOException\n\tat org.eclipse.jetty.server.HttpInput$ErrorState.noContent(HttpInput.java:1083)\n\tat org.eclipse.jetty.server.HttpInput.read(HttpInput.java:321)\n\tat sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)\n\tat sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)\n\tat sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)\n\tat java.io.InputStreamReader.read(InputStreamReader.java:184)\n\tat java.io.Reader.read(Reader.java:140)\n\tat org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2537)\n\tat org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2516)\n\tat org.apache.commons.io.IOUtils.copy(IOUtils.java:2493)\n\tat org.apache.commons.io.IOUtils.copy(IOUtils.java:2441)\n\tat org.apache.commons.io.IOUtils.toString(IOUtils.java:1084)\n\tat org.apache.commons.io.IOUtils.toString(IOUtils.java:1064)\n\tat com.cloudbees.jenkins.plugins.bitbucket.hooks.BitbucketSCMSourcePushHookReceiver.doNotify(BitbucketSCMSourcePushHookReceiver.java:80)\n\tat java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)\n\tat org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)\n\tat org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)\n\tat org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)\n\tat org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)\n\tat org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)\n\tat org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)\n\tat org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)\n\tat org.kohsuke.stapler.Stapler.service(Stapler.java:238)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)\n\tat org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)\n\tat jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)\n\tat io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)\n\tat io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)\n\tat com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)\n\tat jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)\n\tat hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat com.cloudbees.jenkins.plugins.bitbucket.hooks.BitbucketSCMSourcePushHookReceiver.process(BitbucketSCMSourcePushHookReceiver.java:59)\n\tat hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:127)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)\n\tat hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat hudson.security.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:118)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)\n\tat hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:500)\n\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)\n\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)\n\tat java.lang.Thread.run(Thread.java:748)\n</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: Apr 23, 2020 3:49:25 PM UTC</span><span class="rest_api"><a href="api/">REST API</a></span><span class="jenkins_ver"><a href="https://jenkins.io/">Jenkins ver. 2.222.1</a></span></div></div></div></footer><script async="true" src="/static/7d1612bd/scripts/svgxuse.min.js" type="text/javascript"></script></body></html>',
method: 'POST',
path: '/bitbucket-scmsource-hook/notify/'
Same error here, payload never made it to Jenkins.
error: Error: cannot POST /generic-webhook-trigger/invoke?token=MyToken (500)
at Response.toError (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/response.js:94:15)
at ResponseBase._setStatusProperties (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/response-base.js:123:16)
at new Response (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/response.js:41:8)
at Request._emitResponse (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/index.js:752:20)
at /usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/index.js:916:38
at Stream.<anonymous> (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/parsers/json.js:19:7)
at Stream.emit (events.js:315:20)
at Unzip.<anonymous> (/usr/local/lib/node_modules/smee-client/node_modules/superagent/lib/node/unzip.js:55:12)
at Unzip.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1201:12) {
status: 500,
text: '',
method: 'POST',
path: '/generic-webhook-trigger/invoke?token=MyToken'
},
I have the same issue with bitbucket:
Error: Internal Server Error at Request.callback (/snapshot/webhooks/node_modules/superagent/lib/node/index.js:706:15) at Stream.
(/snapshot/webhooks/node_modules/superagent/lib/node/index.js:916:18) at Stream.emit (events.js:311:20) at Stream.EventEmitter.emit (domain.js:482:12) at Unzip. (/snapshot/webhooks/node_modules/superagent/lib/node/unzip.js:55:12) at Unzip.emit (events.js:323:22) at Unzip.EventEmitter.emit (domain.js:482:12) at endReadableNT (_stream_readable.js:1204:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { status: 500, response: Response { _events: [Object: null prototype] {},
I got it working by using the PR from here: https://github.com/probot/smee-client/pull/152 manually in the npm code.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Yes this is still relevant as at least https://github.com/probot/smee-client/pull/152 has not been closed yet.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Had same issue while trying to parse gitlab http request into jenkins, #152 fixed it for me.
Anyone seen this issue?
I'm currently running smee on Centos 7:
smee --url https://smee.io/XXXXXXXXXXXXXX --target https://X.X.X.X/bitbucket-hook/
I logged the call from Bitbucket, and reproduced the POST call using just CURL locally, and it started the job just fine. So it appears Bitbucket is fine and Jenkins is fine. I'm not sure what smee-client doesn't like here.
Any advice?