mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
04.37.2008 76e39dcf01a098877f2e2d21f7d0b027a581915b
Complementary fix for issue 3272.  When we cannot connect using the host name provided or retrieved using InetAddress, try to connect to localhost and if this fails, try to connect to 0.0.0.0.
1 files modified
14 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java 14 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/util/ServerController.java
@@ -427,6 +427,18 @@
          InitialLdapContext ctx = null;
          for (int i=0; i<20 && !connected; i++)
          {
            if ((i == 10) && !"localhost".equals(hostName))
            {
              // Try with local host.  This might be necessary in certain
              // network configurations.
              ldapUrl = "ldap://localhost:" + port;
            }
            if (i == 15)
            {
              // Try with 0.0.0.0.  This might be necessary in certain
              // network configurations.
              ldapUrl = "ldap://0.0.0.0:" + port;
            }
            try
            {
              ctx = Utils.createLdapContext(
@@ -456,7 +468,7 @@
            {
              try
              {
                Thread.sleep(5000);
                Thread.sleep(7500);
              }
              catch (Throwable t)
              {