parautenbach / TeamCity-HipChat-Notifier

TeamCity HipChat Notifier for sending build server notifications to HipChat.
Other
59 stars 31 forks source link

Server startup event never fires #50

Closed Kizmar closed 9 years ago

Kizmar commented 9 years ago

I should first note: after the server has been running for a while, the HipChat Notifier works fine.

I'm not really sure what's going on with this, but when I happen to reboot the server I see the "Build server shutting down." message in HipChat. When the server comes back online, I never see the "Build server started." message.

When I RDP to the machine immediately after a reboot and review the HipChat Notifier settings, the "Test connection" button fails and the room list is empty. If I hit the page again X minutes later, "Test connection" works and the rooms dropdown is populated - yet the "Build server started." message still doesn't show in HipChat.

I don't know what happens between it not working right after a reboot, and it working X minutes later. I do have logging enabled. This is the log file after I bounce the server:

2015-04-22 08:30:28,032 - DEBUG - Set "C:\ProgramData\JetBrains\TeamCity\config\hipchat" as the template path 
2015-04-22 08:30:28,058 - INFO  - Project configuration page registered 
2015-04-22 08:30:28,082 - DEBUG - Server extension created 
2015-04-22 08:30:28,086 - DEBUG - Server extension registered 
2015-04-22 08:30:28,102 - INFO  - Global configuration page registered 
2015-04-22 08:30:28,119 - DEBUG - Config file path: C:\ProgramData\JetBrains\TeamCity\config\hipchat.xml 
2015-04-22 08:30:28,119 - INFO  - Controller created 
2015-04-22 08:30:28,128 - DEBUG - Loading existing configuration 
2015-04-22 08:30:28,208 - DEBUG - Caching all available emoticons 
2015-04-22 08:30:28,208 - DEBUG - Start index: 0 
2015-04-22 08:30:29,181 - DEBUG - Adding emoticon: bacon - https://dujrsrsgsd3nh.cloudfront.net/img/emoticons/112717/bacon-1413835253.png 
... moar emoticon stuff ...
2015-04-22 08:30:29,693 - DEBUG - Adding emoticon: forscale - https://dujrsrsgsd3nh.cloudfront.net/img/emoticons/forscale-1428536097.png 
2015-04-22 08:30:29,693 - DEBUG - Start index: 300 
... moar index stuff ...
2015-04-22 08:30:49,969 - DEBUG - Start index: 9900 
2015-04-22 08:30:50,153 - ERROR - Could not retrieve emoticons: 429 Unknown Status 
2015-04-22 08:30:50,153 - INFO  - Emoticon cache reloaded: 214 
2015-04-22 08:30:50,153 - INFO  - Controller initialised 
2015-04-22 08:31:05,196 - DEBUG - Reading template serverStartupTemplate 
2015-04-22 08:31:05,494 - DEBUG - {"color":"gray","message":"Build server started.","notify":false,"message_format":"html"} 
2015-04-22 08:31:05,690 - ERROR - Message could not be delivered: 429 Unknown Status 
2015-04-22 08:31:21,366 - DEBUG - Bypass SSL check: false 
2015-04-22 08:31:21,565 - ERROR - Could not retrieve rooms: 429 Unknown Status 
2015-04-22 08:31:21,565 - DEBUG - Reading template buildStartedTemplate 
2015-04-22 08:31:21,578 - DEBUG - Reading template buildSuccessfulTemplate 
2015-04-22 08:31:21,589 - DEBUG - Reading template buildFailedTemplate 
2015-04-22 08:31:21,592 - DEBUG - Reading template buildInterruptedTemplate 
2015-04-22 08:31:21,595 - DEBUG - Reading template serverStartupTemplate 
2015-04-22 08:31:21,595 - DEBUG - Reading template serverShutdownTemplate 
2015-04-22 08:31:21,596 - DEBUG - Configuration page variables populated 
2015-04-22 08:31:29,549 - DEBUG - Handling request 
2015-04-22 08:31:29,549 - DEBUG - Test connection 
2015-04-22 08:31:29,549 - DEBUG - Testing authentication 
2015-04-22 08:31:29,550 - DEBUG - API URL: https://api.hipchat.com/v2/ 
2015-04-22 08:31:29,550 - DEBUG - API token: xxxxxxxxxxxx 
2015-04-22 08:31:29,741 - ERROR - Authentication failed: 429 Unknown Status 
2015-04-22 08:31:29,741 - DEBUG - Authentication status: false 

After a few minutes, if I refresh the page... the HipChat stuff is working and the log now has this at the end:

2015-04-22 08:34:27,236 - DEBUG - Bypass SSL check: false 
2015-04-22 08:34:27,464 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,464 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,465 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,465 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,465 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,465 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,465 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,465 - DEBUG - Unknown property: participants 
2015-04-22 08:34:27,466 - DEBUG - Reading template buildStartedTemplate 
2015-04-22 08:34:27,467 - DEBUG - Reading template buildSuccessfulTemplate 
2015-04-22 08:34:27,467 - DEBUG - Reading template buildFailedTemplate 
2015-04-22 08:34:27,468 - DEBUG - Reading template buildInterruptedTemplate 
2015-04-22 08:34:27,468 - DEBUG - Reading template serverStartupTemplate 
2015-04-22 08:34:27,469 - DEBUG - Reading template serverShutdownTemplate 
2015-04-22 08:34:27,469 - DEBUG - Configuration page variables populated 
parautenbach commented 9 years ago

Hello

I think the problem is #49, which was fixed in v0.9.0 of the plugin (the cause is a problem with the HipChat API). Which version of the plugin and TeamCity are you using?

parautenbach commented 9 years ago

Btw, HTTP code 429 means the HipChat API's rate limiting kicked in.

parautenbach commented 9 years ago

No further information was provided.