Error forwarding Bitbucket Cloud to Internal Jenkins
See original GitHub issueAnyone seen this issue?
{ Error: Internal Server Error
at Request.callback (/home/docker/.nvm/v10.15.3/lib/node_modules/smee-client/node_modules/superagent/lib/node/index.js:706:15)
at Stream.parser (/home/docker/.nvm/v10.15.3/lib/node_modules/smee-client/node_modules/superagent/lib/node/index.js:916:18)
at Stream.emit (events.js:189:13)
at Unzip.unzip.on (/home/docker/.nvm/v10.15.3/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:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
status: 500,
response:
Response {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
res:
IncomingMessage {
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
socket: [TLSSocket],
connection: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 500,
statusMessage: 'Server Error',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [ClientRequest],
setEncoding: [Function],
on: [Function],
text:
'\n\n\n\n\n \n <!DOCTYPE html><html><head resURL="/static/d20d011a" data-rooturl="" data-resurl="/static/d20d011a">\n \n\n <title>Jenkins [Jenkins]</title><link rel="stylesheet" href="/static/d20d011a/css/layout-common.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/css/style.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/css/color.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/css/responsive-grid.css" type="text/css" /><link rel="shortcut icon" href="/static/d20d011a/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/d20d011a";</script><script src="/static/d20d011a/scripts/prototype.js" type="text/javascript"></script><script src="/static/d20d011a/scripts/behavior.js" type="text/javascript"></script><script src=\'/adjuncts/d20d011a/org/kohsuke/stapler/bind.js\' type=\'text/javascript\'></script><script src="/static/d20d011a/scripts/yui/yahoo/yahoo-min.js"></script><script src="/static/d20d011a/scripts/yui/dom/dom-min.js"></script><script src="/static/d20d011a/scripts/yui/event/event-min.js"></script><script src="/static/d20d011a/scripts/yui/animation/animation-min.js"></script><script src="/static/d20d011a/scripts/yui/dragdrop/dragdrop-min.js"></script><script src="/static/d20d011a/scripts/yui/container/container-min.js"></script><script src="/static/d20d011a/scripts/yui/connection/connection-min.js"></script><script src="/static/d20d011a/scripts/yui/datasource/datasource-min.js"></script><script src="/static/d20d011a/scripts/yui/autocomplete/autocomplete-min.js"></script><script src="/static/d20d011a/scripts/yui/menu/menu-min.js"></script><script src="/static/d20d011a/scripts/yui/element/element-min.js"></script><script src="/static/d20d011a/scripts/yui/button/button-min.js"></script><script src="/static/d20d011a/scripts/yui/storage/storage-min.js"></script><script src="/static/d20d011a/scripts/hudson-behavior.js" type="text/javascript"></script><script src="/static/d20d011a/scripts/sortable.js" type="text/javascript"></script><script>crumb.init("Jenkins-Crumb", "96c421a9852134a21add1909bc1981db");</script><link rel="stylesheet" href="/static/d20d011a/scripts/yui/container/assets/container.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/scripts/yui/assets/skins/sam/skin.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/scripts/yui/container/assets/skins/sam/container.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/scripts/yui/button/assets/skins/sam/button.css" type="text/css" /><link rel="stylesheet" href="/static/d20d011a/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/d20d011a/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.164.2" data-version="2.164.2"><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/d20d011a/images/headshot.png" alt="[Jenkins]" id="jenkins-head-icon" /><img src="/static/d20d011a/images/title.png" alt="Jenkins" width="139" id="jenkins-name-icon" height="34" /></a></div><div class="login"> <a href="/login?from=%2Fbitbucket-hook%2F"><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/d20d011a/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/d20d011a/lib/layout/breadcrumbs.css\' type=\'text/css\' /><script src=\'/adjuncts/d20d011a/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/d20d011a/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/d20d011a/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/d20d011a/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/d20d011a/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/d20d011a/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.</p><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:826)\n\t\tat org.eclipse.jetty.server.HttpConnection$BlockingReadCallback.failed(HttpConnection.java:649)\n\t\tat org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:138)\n\t\tat org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillableFail(SslConnection.java:451)\n\t\tat org.eclipse.jetty.io.ssl.SslConnection.onFillInterestedFailed(SslConnection.java:314)\n\t\tat org.eclipse.jetty.io.ssl.SslConnection$2.failed(SslConnection.java:165)\n\t\tat org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:138)\n\t\tat org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:406)\njava.util.concurrent.TimeoutException: Idle timeout expired: 5000/5000 ms\n\tat org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166)\n\tat org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)\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:1080)\n\tat org.eclipse.jetty.server.HttpInput.read(HttpInput.java:313)\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 io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRHookReceiver.doIndex(BitBucketPPRHookReceiver.java:79)\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.IndexDispatcher.dispatch(IndexDispatcher.java:27)\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)\n\tat org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:458)\n\tat org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)\n\tat org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)\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:865)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)\n\tat hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)\n\tat org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:243)\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 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:1642)\n\tat io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRCrumbExclusion.process(BitBucketPPRCrumbExclusion.java:47)\n\tat hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:73)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)\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:117)\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 org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)\n\tat hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)\n\tat org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)\n\tat hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)\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:1642)\n\tat org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)\n\tat hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)\n\tat org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:503)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:411)\n\tat org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:305)\n\tat org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)\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 26, 2019 7:02:52 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.164.2</a></span></div></div></div></footer></body></html>' },
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?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:29 (1 by maintainers)
Top Results From Across the Web
Jenkins Unable to connect to Bitbucket cloud - Stack Overflow
I am seeing errors in Jenkins. Thing is Jenkins is unable to connect to bitbucket cloud. Environment Jenkins : Internally hosted ; http:// ......
Read more >Bitbucket Server Integration - Jenkins Plugins
The Bitbucket Server integration plugin is the easiest way to connect Jenkins to Bitbucket Server.
Read more >Bitbucket webhook won't send a request to Jenkins
I am configuring Bitbucket to trigger a job on Jenkins. It is a trivial process and I tested it on test Jenkins server...
Read more >BitBucket Jenkins Continuous Integration - Webhook & ngrok
Video tutorial to demonstrate Continuous Integration set-up of a BitBucket Repo with Jenkins server which is locally running in a private ...
Read more >Issue while integrating Jenkins with bitbucket - Google Groups
I have a repos on remote bitbucket cloud. I am trying to integrate that with Jenkins. I have Jenkins installed on my personal...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Issue-Label Bot is automatically applying the label
bug
to this issue, with a confidence of 0.85. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
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.