Symptoms
- TeamCity webhooks are enabled, and necessary parameters are set up.
- The service that should receive the webhooks doesn't receive them.
Cause
Possible causes are:
- Parameters required for webhooks are not set correctly.
- Issues on the third-party service's side.
Resolution
To narrow down possible causes, it is recommended to test the webhooks with the following parameters:
-
teamcity.internal.webhooks.enable=true. Note that it should be added to the Root project. -
teamcity.internal.webhooks.url: use https://webhook.site/ to generate a unique URL, and use it as a value of this parameter. Note that it should be added to the Root project. -
teamcity.internal.webhooks.events={event_name}. This parameter can be added to projects that need to send webhooks or to the Root project. - The authorization parameters (
teamcity.internal.webhooks.username,teamcity.internal.webhooks.password) are not required for the testing scenario and should be deleted. - If payload customization parameters (
teamcity.internal.webhooks.{event_name}.fields) are used, they should be removed for the test purposes.
With these settings in place, trigger the event and confirm whether the payload was received at https://webhook.site/.
If the payload wasn't received, there are the following possibilities:
- Issue with the connection. Please check if https://webhook.site/ is reachable from the TeamCity Server.
- TeamCity is unable to send the webhook due to some issues. Webhooks-related events are logged into the
teamcity-server.logfile. They can be found byjetbrains.buildServer.webhook.WebhooksEventListenercategory. For further investigation, contact TeamCity Support and provide theteamcity-server.logfile that covers the time of the test.
If the payload was received:
- If originally the payload was customized using the payload customization parameters, add them back and test again. The issue might have been caused by a mistake in this parameter.
- If it was not customized, or when https://webhook.site/ receives the payload correctly with added customization parameters, change the
teamcity.internal.webhooks.urlto the original service that should listen to the webhooks. - If the service requires authorization, add authorization parameters to the Root project. Confirm that their values are correct.
- Trigger the event, and check whether the payload was received.
The above steps should help resolve the most common errors in webhooks configuration.
If the problem persists after following these instructions:
- check for connection issues between the TeamCity server and a third-party service.
- The logs of the service that listens to webhooks may also provide some insights into possible causes (for example, authorization errors).
- In case everything seems correct and the service doesn't log any error messages, contact TeamCity Support and provide the
teamcity-server.logfile that covers the time when webhooks should've been triggered.
Comments
0 comments
Please sign in to leave a comment.