Change backend IP addresses of Postgres, Redis and NFS for Hipchat Datacenter Nodes

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

Problem

You need to change the IP address or endpoint for external datastores used with HipChat Datacenter including

  • Postgres
  • Redis
  • NFS

Resolution

HipChat Datacenter first reads a site.json file in order to find the Postgres database. Most configuration data is found in the 'configurations' table in your HipChat database. Follow the steps below to update the service endpoints you're changing.

Update your database pointer

On each Application Node in the cluster;

  1. Login via SSH and become root using the "sudo dont-blame-hipchat" utility
  2. Edit the site.json found at

    /hipchat/config/site.json
  3. Using an editor of your choice, update the servers key:value for your postgres database.

    {
        "environment": "btf",
        "hostname": "hipchat",
        "ipaddress": "192.168.122.4",
        "databases": {
            "hipchat_postgres": {
                "user": "hipchat",
                "pass": "hipchat",
                "schema": "hipchat",
                "servers": [
                    "IP_ADDRESS_OR_FQDN_OF_POSTGRES:5432"
                ]
            }
        },
        "server_id": "111111111111111111111111111111"
  4. Edit the Crowd.cfg.xml found at

    crowd.cfg.xml
    /etc/crowd/crowd.cfg.xml
    
  5. Update the following line with your new IP or FQDN

    Crowd Postgres IP
    <property name="hibernate.connection.url">jdbc:postgresql://YOUR_NEW_IP_ADDRESS:5432/hipchat</property>

Restart each datacenter node:

Restart Hipchat Services on Each Node
hipchat datacenter restart

Verify your changes;

Datacenter Selfcheck
hipchat datacenter selfcheck

HipChat will now connect to the Postgres endpoint defined. The changes below are now made in your Postgres database. Ensure backups or snapshots are available for your Postgres service.

Update the Postgres database for Redis and NFS Pointers

To update your Redis Server Endpoint run the following command with your new IP or FQDN:

Redis Hostname
UPDATE configurations SET value='NEW_IP_OR_FQDN' WHERE key='redishostname';

To update your NFS Server Endpoint, run the following command with your new IP or FQDN:

NFS Hostname
UPDATE configurations SET value='NEW_IP_OR_FQDN' WHERE key='nfshostname';


Ports can also be changed with the following queries;

You may not need to change service ports, this is optional.

Redis Port
UPDATE configurations SET value='PORT_NO' WHERE key='redisport';
NFS Port
UPDATE configurations SET value='PORT_NO' WHERE key='nfsport';


Changes can be validated by checking the configurations table;

check config table
select * from configurations;



Last modified on May 10, 2018

Was this helpful?

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