Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to post data to webhook: hostname in certificate didn't match #247

Open
cprato79 opened this issue Mar 30, 2021 · 6 comments
Open
Labels

Comments

@cprato79
Copy link

Version report

Jenkins and plugins versions report:

    Jenkins: 2.254
    Plugin: 4.14.0
    jdk: 8
  • What Operating System are you using (both controller, and any agents involved in the problem)?

    i run jenkins from the official docker container

Reproduction steps

  • create the webhook on Microsoft Team Connector side
  • set the webhook url in the specific job configuration section
  • run the job

Results

Expected result:
a notify on Microsoft Teams side

Actual result:

[Office365connector] Failed to post data to webhook - https://dedalusspa.webhook.office.com/webhookb2/cd5d0f2b-c3a0-404d-91de-5ef4abeba9bd@9ffff5c3-bdfa-4a9d-b595-ff68329945ef/JenkinsCI/f7660493bed54d349e6dc6bb51bfae9a/fb16f452-f0f9-4f4c-89b0-88913bdef5d8
javax.net.ssl.SSLException: hostname in certificate didn't match: <dedalusspa.webhook.office.com> != </*.internal.outlook.com/*.outlook.com/outlook.com/office365.com/*.office365.com/*.outlook.office365.com/*.office.com/outlook.office.com/substrate.office.com/attachment.outlook.live.net/attachment.outlook.office.net/attachment.outlook.officeppe.net/attachments.office.net/*.clo.footprintdns.com/*.nrb.footprintdns.com/ccs.login.microsoftonline.com/ccs-sdf.login.microsoftonline.com/substrate-sdf.office.com/attachments-sdf.office.net/*.live.com/mail.services.live.com/hotmail.com/*.hotmail.com/outlook.com>

Test

running by curl it gets the notification as well:

sh("curl -k -X POST -H 'Content-type:application/json' --data '{\"text\":\"Message sent by jenkins\"}' ${WEB_HOOK_URL}")

where the variable: WEB_HOOK_URL is replaced by the full URL got by Microsoft Teams Connector

@cprato79 cprato79 added the bug label Mar 30, 2021
@cprato79
Copy link
Author

I found the following: link

The webook url has changed !

@jishwin13
Copy link

jishwin13 commented Apr 1, 2021

Is it working now for you? i have a web-hook URL which was created recently and includes the tenant's name as mentioned in the link you posted above but office 365 connector still fails to send notification with this error as well. Any updates?

@cprato79
Copy link
Author

cprato79 commented Apr 2, 2021

The notification has begun to works only after i restored the previous url as microsoft teams had generated it.

This is a temporary workaround working until Microsoft will not disable this behavior definitively!

@sostrich
Copy link

sostrich commented Apr 15, 2021

The fix outlined in #240 (comment) worked, we upgraded from Oracle Java 8 to OpenJdk 11 as described here https://stackoverflow.com/a/55244659, and our new connector started working.

@cprato79
Copy link
Author

The fix outlined in #240 (comment) worked, we upgraded from Oracle Java 8 to OpenJdk 11 as described here https://stackoverflow.com/a/55244659, and our new connector started working.

Thank you ! I will try.

@jishwin13
Copy link

jishwin13 commented Apr 19, 2021

My issue was actually a table-to-divs migration issue after an update to Jenkins 2.277.1. Some of the plugins were causing the configure UI to be broken. Once these plugins were disabled, the notifications started getting posted using incoming webhooks and office 365 connector plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants