How To Enable Debug Logging for Authentication in Hipchat Server

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

Debug logging is needed in order to change the level of information provided in the existing logs so that more informations are shown than usual. The following debug logging with the specific class helps to log the process of authentication in details in /var/log/hipchat/atlassian-crowd.log

Solution

  • Edit log4j.properties located in /opt/atlassian/crowd/crowd-webapp/WEB-INF/classes/  and add the line below:

    log4j.logger.com.atlassian.hipchat=DEBUG
    

    Note that you will need root access to modify the file - run sudo dont-blame-hipchat to gain root. 

  • Then run the following to restart the internal Crowd in Hipchat Server (embedded Crowd server is utilised to manage directory integration and external users authentication) so that the debug logging can take effect:

    sudo /etc/init.d/crowd restart or hipchat service --restart db
  • Here's a sample debug logging once enabled:

    [INFO] [talledLocalContainer] 10:34:34,988 DEBUG com.atlassian.hipchat.http.client.Coral - Resolved coral base URL as 'http://10.0.0.40:8080/v2/user/test%2Bdev1%40atlassian.com'
    [INFO] [talledLocalContainer] 10:34:35,653 DEBUG com.atlassian.hipchat.server.rest.HipChatCrowdAuthenticateResource - Found HipChat user HipChatUser{uid=155, email=test+dev1@atlassian.com, name=SaM LB1, group_admin=false}
    [INFO] [talledLocalContainer] 10:34:35,788 DEBUG com.atlassian.hipchat.server.rest.HipChatCrowdAuthenticateResource - Found corresponding Crowd user name: some(test_dev1)
    [INFO] [talledLocalContainer] 10:34:35,789 DEBUG com.atlassian.hipchat.server.authenticate.HipChatAuthenticator - Authenticating HipChat user 'test+dev1@atlassian.com' with password <none> on service web
    [INFO] [talledLocalContainer] 10:34:35,789 DEBUG com.atlassian.hipchat.http.client.Coral - Resolved coral base URL as 'http://10.0.0.40:8080/v2/authenticate'
    [INFO] [talledLocalContainer] 10:34:36,473 DEBUG com.atlassian.hipchat.http.client.Coral - Resolved coral base URL as 'http://10.0.0.40:8080/v2/user/test%2Bdev1%40atlassian.com'
    [INFO] [talledLocalContainer] 10:34:37,138 DEBUG com.atlassian.hipchat.server.rest.HipChatCrowdAuthenticateResource - Authenticated 'test+dev1@atlassian.com' successfully with HipChat
    [INFO] [talledLocalContainer] 10:34:37,138 DEBUG com.atlassian.hipchat.server.authenticate.CrowdAuthenticator - Authenticating Crowd user 'test+dev1@atlassian.com' with password ********
    [INFO] [talledLocalContainer] 10:34:37,138 DEBUG com.atlassian.hipchat.server.authenticate.CrowdAuthenticator - Found username 'test_dev1' for email address 'test+dev1@atlassian.com'
    [INFO] [talledLocalContainer] 10:34:46,768 DEBUG com.atlassian.hipchat.server.rest.HipChatCrowdAuthenticateResource - Authenticated 'test+dev1@atlassian.com' (test+dev1@atlassian.com) successfully with Crowd.

Last modified on Jan 19, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.