Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3124

Use IP-address rather than host name as server address

XMLWordPrintable

    • Icon: Patch Patch
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • System service
    • None

      system/src/main/org/jboss/system/server/ServerConfigUtil.java
      method
      public static String fixRemoteAddress(String address)
      contains the line
      return InetAddress.getLocalHost().getHostName();
      I propose to change it to
      return InetAddress.getLocalHost().getHostAddress();
      Sometimes on client's machine DNS is set up incorrectly and client connects to server by IP-address rather then by host name. If the PooledInvoker is used, then server returns to client ServerAddress which was "fixed" (see PooledInvoker.java, startService() method) with the help of ServerConfigUtil.fixRemoteAddress(). Now it returns a host name, and some clients can't find it via DNS. The proposed change solves this problem. Also it removes unnecessary DNS search when client opens sockets.

            Unassigned Unassigned
            olegnitz Oleg Nitz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: