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
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.
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:
- Direct client applications to other servers.
- 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
- 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
- DS 5 and later:
- Change the hostname details in the /etc/hosts file and/or on the DNS.
- 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
- Restart DS/OpenDJ:
$ ./stop-ds $ ./start-ds
- Regenerate all self-signed certificates. See Administration Guide › Preparing For Secure Communications and Administration Guide › Changing Server Certificates for further information.
- Restart DS/OpenDJ:
$ ./stop-ds $ ./start-ds
- 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
- DS 5 and later:
- 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
- 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.