Slack Jenkins plugin not working

I am running jenkins from a .bat file because I need some applications to be able to perform some service operations that otherwise would not be possible from the service.

I installed the jenkins plugin in Slack. Follow the instructions and go to the plugin setup.

Since I run it locally, I have the following configuration:

  • Base URL: http://127.0.0.1:7061/
  • Command Subdomain: weatherwindowsapp
  • Integration Current: gk2aDYzJP8DQ2mGssS1Sssm1
  • Channel: #testchannel

If I click the "Test Connection" button below, the following error is output to the jenkins console:

    [0m[33mApr 18, 2017 3:53:29 PM jenkins.plugins.slack.StandardSlackService publish
WARNING: Response Code: 403
[0m[33mApr 18, 2017 4:00:33 PM hudson.security.csrf.CrumbFilter doFilter
WARNING: No valid crumb was included in request for /gk1aDYmKI6DQ3mGsuZ1fevm5. Returning 403.
[0m[33mApr 18, 2017 4:00:33 PM jenkins.plugins.slack.StandardSlackService publish
WARNING: Slack post may have failed. Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /gk1aDYmKI6DQ3mGsuZ1fevm5. Reason:
<pre>    No valid crumb was included in the request</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

[0m[33mApr 18, 2017 4:00:33 PM jenkins.plugins.slack.StandardSlackService publish
WARNING: Response Code: 403
[0m

If I change the base URL to "/", I get this answer:

  [0m[33mApr 18, 2017 4:26:21 PM jenkins.plugins.slack.StandardSlackService publish
WARNING: Error posting to Slack
java.lang.IllegalStateException: Target host is null
        at org.apache.http.util.Asserts.notNull(Asserts.java:46)
        at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:125)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(Closeabl

I followed the instructions step by step, tried unsuccessfully to use Base URl.

+6
1

. ( slack.com. ):

+9

Source: https://habr.com/ru/post/1016607/


All Articles