Total Pageviews

Thursday, December 5, 2019

opendj rename using ./dsconfig error Unable to connect to the server at "dsa.avantastech.com" 4444

issue:

I have followed forgerock opendj rename instructions and i was getting unable to connect error, even LDAP server was up and running.


./dsconfig set-sasl-mechanism-handler-prop --handler-name DIGEST-MD5 --port 5444 --hostname dsa.avantastech.com --bindDN "cn=Directory Manager" --bindPassword password --set server-fqdn:dsb.avantastech.com --trustAll

Unable to connect to the server at "dsa.avantastech.com" on port 5444



instructions i followed

How do I change the hostname for DS/OpenDJ (All versions)?

The purpose of this article is to provide information on changing the hostname for a DS/OpenDJ server. This article covers both replicated and non-replicated servers.

Changing the hostname

This process uses the following example server hostnames:
  • Original hostname: dsA.example.com
  • New hostname: dsB.example.com
  • Hostname of another replicated server: dsZ.example.com
To change the server hostname:
  1. Direct client applications to other servers.
  2. Prevent the server from accepting updates from client applications using the following command:
    $ ./dsconfig set-global-configuration-prop --port 4444 --hostname dsA.example.com --bindDN "cn=Directory Manager" --bindPassword password --set writability-mode:internal-only --trustAll --no-prompt
    
  3. If the server is replicated, disable replication using the dsreplication command applicable to your version:
    • DS 5 and later:
      $ ./dsreplication unconfigure --unconfigureAll --port 4444 --hostname dsA.example.com --bindDN "cn=Directory Manager" --adminPassword password --trustAll --no-prompt
    • Pre-DS 5:
      $ ./dsreplication disable --disableAll --port 4444 --hostname dsA.example.com --bindDN "cn=Directory Manager" --adminPassword password --trustAll --no-prompt
      
  4. Change the hostname details in the /etc/hosts file and/or on the DNS.
  5. Change the server-fqdn in the DIGEST-MD5 entry using the following command:
    $ ./dsconfig set-sasl-mechanism-handler-prop --handler-name DIGEST-MD5 --port 4444 --hostname dsA.example.com --bindDN "cn=Directory Manager" --bindPassword password --set server-fqdn:dsB.example.com --trustAll
    
  6. Restart DS/OpenDJ:
    $ ./stop-ds
    $ ./start-ds
  7. Regenerate all self-signed certificates. See Administration Guide › Preparing For Secure Communications and Administration Guide › Changing Server Certificates for further information.
  8. Restart DS/OpenDJ:
    $ ./stop-ds
    $ ./start-ds
  9. If the server was replicated, enable replication on the new server using the dsreplication command applicable to your version:
    • DS 5 and later:
      $ ./dsreplication configure --adminUid admin --adminPassword password --baseDn dc=example,dc=com --host1 dsZ.example.com --port1 4444 --bindDn1 "cn=Directory Manager" --bindPassword1 password --replicationPort1 8989 --host2 dsB.example.com --port2 4444 --bindDn2 "cn=Directory Manager" --bindPassword2 password --replicationPort2 8989 --trustAll --no-prompt
    • Pre-DS 5:
      $ ./dsreplication enable --adminUID admin --adminPassword password --baseDN dc=example,dc=com --host1 dsZ.example.com --port1 4444 --bindDN1 "cn=Directory Manager" --bindPassword1 password --replicationPort1 8989 --host2 dsB.example.com --port2 4444 --bindDN2 "cn=Directory Manager" --bindPassword2 password --replicationPort2 8989 --trustAll --no-prompt
  10. If the server was replicated, initialize the new server to ensure it has all the changes that have occurred since you disabled replication:
    $ ./dsreplication initialize --adminUID admin --adminPassword password --baseDN dc=example,dc=com --hostSource dsZ.example.com --portSource 4444 --hostDestination dsB.example.com --portDestination 4444 --trustAll --no-prompt
  11. Re-enable the server to accept updates from client applications using the following command:
    $ ./dsconfig set-global-configuration-prop --port 4444 --hostname dsA.example.com --bindDN "cn=Directory Manager" --bindPassword password --set writability-mode:enabled --trustAll --no-prompt

on step 5 i was getting unable to find server error. I was using my local server host file to change dns name. logs was showing serera cant be find.

Solution:

I have changed the command to

./dsconfig set-sasl-mechanism-handler-prop --handler-name DIGEST-MD5 --port 4444 --hostname dsB.example.com --bindDN "cn=Directory Manager" --bindPassword password --set server-fqdn:dsB.example.com --trustAll

and run the command. I was getting confirmation about the correct name. I selected option "f" to confirm and it worked.



No comments:

Post a Comment