0

Using Mattermost Notification plugin on Jenkins (running on macOS) gives me the following error:

Error posting to Mattermost
java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:336)
    at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:177)
    at java.io.FilterInputStream.read(FilterInputStream.java:133)
    at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:115)
    at java.io.FilterInputStream.read(FilterInputStream.java:107)
    at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:134)
    at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:697)
    at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:810)
    at jenkins.plugins.mattermost.StandardMattermostService.publish(StandardMattermostService.java:100)
    at jenkins.plugins.mattermost.ActiveNotifier.completed(ActiveNotifier.java:116)
    at jenkins.plugins.mattermost.MattermostListener.onCompleted(MattermostListener.java:27)
    at jenkins.plugins.mattermost.MattermostListener.onCompleted(MattermostListener.java:15)
    at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
    at hudson.model.Run.execute(Run.java:1861)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)

I get the same error when pressing "Test connection". Endpoints/url work fine with Curl. Any hints on why that is failing?

francisaugusto
  • 1,077
  • 1
  • 12
  • 29

1 Answers1

0

It was the proxy settings. I had to add my mattermost instance to the "no-proxy" settings.

francisaugusto
  • 1,077
  • 1
  • 12
  • 29