It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I get the Server ID when Confluence won't start

My licence expired and I have purchased a new one. To get the licence I need to:

To get your Server ID:

  1. Log in as a Confluence administrator
  2. Click on the Settings icon and choose General configuration
  3. Click on the License Details link (under 'Administration')
  4. Your Server ID is listed in the Server ID field


Since Confluence won't start it just gives me a "put in your licence" screen. How do I find the Server ID.

 

2 answers

1 accepted

1 vote
Answer accepted
BryanT Community Leader May 10, 2019

Hi @DaveF - You might want to take a look at this Confluence Knowledge Base article. It includes a SQL query that you can run to hopefully bring you back that information.

https://confluence.atlassian.com/confkb/what-is-the-confluence-server-id-151519275.html

@BryanT's answer wouldn't work for me, as I was using the H2 database for a test instance. 

However, it's probably even simpler to search the log. You should be able to find a group of lines like these which contain the server ID:

--------------------------
Build Information
--------------------------
maxUsers = -1
installationDate = Fri Nov 01 18:29:59 GMT 2019
supportEntitlementNumber = SEN-L12345678
buildNumber = 8401
serverId = ABCD-CAFE-1234-WXYZ
version = 7.2.0
home = /var/atlassian/application-data/confluence
upTime = 4 minutes, 26 seconds
baseUrl = http://localhost:8090
devMode = false

Umm, which log file and where is it located.  I cannot find a log file with this information.

@Evan_W , on Linux it is usually at /var/atlassian/application-data/confluence/logs/atlassian-confluence.log

For more details about Confluence logfiles, see https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html

Hey Metin, thanks for the tip, but I couldn't find the log.  It took sometime, and by the way Atlassian, what's with showing a dialogue box without simply showing the server id!  Seems like a bug to me.

This is my solution - only took me a day to piece together - again thanks Atlassian.

  1. I needed to interrogate a table in postgres, but I had to login to postgres.  Unfortunately my credentials weren't working, so I had to set the database to not require a password (source)

  2. Install locate

    $ sudo apt install locate
  3. Update the locate database

    $ updatedb
  4. Locate the file pg_hba.conf.

    $ locate pg_hba.conf /etc/postgresql/10/main/pg_hba.conf/usr/share/postgresql/10/pg_hba.conf.sample
  5. Edit pg_hba.conf file:

    # IPv4 local connections:host    all             all             127.0.0.1/32            md5
  6. Change below line for MD5 to TRUST

    # IPv4 local connections:host    all             all             127.0.0.1/32            trust
  7. Restart the PostgreSQL Server:

    $ sudo /etc/init.d/postgresql restart
  8. Connect the PostgreSQL:

    psql -h localhost -U postgrespassword? "password"
  9. Now in the psql environment.

  10. Change the password

    confluence=# ALTER USER postgres with password 'new_password';
  11. List all of the databases

    postgres=# \l

    confluence | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 | postgres   | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 | template0  | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 | =c/postgres          +            |          |          |             |             | postgres=CTc/postgres template1  | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 | postgres=CTc/postgres+            |          |          |             |             | =c/postgres

  12. Select the confluence database

    postgres=# \c confluenceSSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)You are now connected to database "confluence" as user "postgres".confluence=#
  13. Look up the server id

    confluence=# SELECT * FROM BANDANA WHERE bandanakey = 'confluence.server.id';
  14. The resultant server ID is shown (now you can paste into the licence generation page on the Atlassian site and finally retrieve the missing key).
  15. Quit from postgres

    confluence=# \q
  16. Restart the server

  17. Done (Simple eh).

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

3,140 views 4 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you