tcWebHooks: SSL handshake errors to https://hooks.slack.com

Expected Behavior

Slack incoming webhooks work with the plugin

Current Behavior

Both trying to preview & test the webhooks, or triggering them from a build results in:

Error: Error Unsupported record version Unknown-0.0 occurred while attempting to execute WebHook. (801)

checking server logs, it shows this:

[2020-04-08 14:55:26,619]   WARN -   jetbrains.buildServer.SERVER - WebHookListener :: :doPost :: An IOException occurred while attempting to execute WebHook (https://hooks.slack.com/services/REDACTED). See the following debug stacktrace
[2020-04-08 14:55:26,620]  ERROR -   jetbrains.buildServer.SERVER - WebHookUserRequestedExecutorImplError Unsupported record version Unknown-0.0 occurred while attempting to execute WebHook.

Steps to Reproduce (for bugs)

  1. Add some SSl/HTTPS Certificates to <Root project>
  2. Create a slack webhook
  3. Attempt to test or trigger the webhook.

Your Environment

  • tcWebHooks Version: 1.1.357.397
  • TeamCity Version: 2019.2.2
  • TeamCity server Operating System: Official Linux 2019.2.2 docker images with Perforce cli added.

The https/ssl certificates were added for ldaps authentication on the server. After doing this, it was observed that some other plugins had issues. For them however they gave a more expected failure of “unable to find valid certification path to requested target”. tcWebHooks however instead gives the “Unsupported record version”, which still seems to be an ssl handshake error. Adding the certs for hooks.slack.com doesn’t seem to affect it.

My best guess as to what is happening is that once the TeamCity server has these keys in a keystore, httpclient is trying to send them as client certificates, and that’s causing the broken connection? In which case rather than using HttpClients.createDefault(), need to override it to some settings where it doesn’t send the client certs from the trust store?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

It turns off “Sever Name Indication” SSL/TLS extension. Typically used for virtual hosts by domain name. hooks.slack.com and likely others most likely require it on? Several years ago the opposite was true, some hosts broke if you passed it instead of ignoring it. Some change in behavior around it with the jdk versions though triggered it to start failing for me. Or who knows, maybe it was a change on Slack’s part. I haven’t gone back to 2019.1.3 to see how that behaves.