Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-7107

NetworkServerControl fails to connect to server started on INADDR_ANY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 10.14.2.0, 10.15.2.0
    • None
    • Network Server
    • None
    • Normal
    • Known fix, Patch Available, Workaround attached
    • Seen in production

    Description

      If starting a NetworkServerControl on INADDR_ANY (0.0.0.0) it also uses this address when connecting to the running server instance (e.g. in method ping(), ...).

      Strictly speaking, INADDR_ANY isn't a valid target address. However, under normal circumstances, this works anyway. But if you have any "security" software in place that blocks such connections (Firewall or VPN, e.g. Cisco AnyConnect), you end up with an IOException: 

      Could not connect to Derby Network Server on host 0.0.0.0, port 1527: Permission denied: connect.

      One simple fix would be to explicitly check the host address 'hostAddress' in NetworkServerControlImpl.setUpSocket() and if this is INADDR_ANY, use 'localhost' instead. 

      Attachments

        1. DERBY-7107.diff
          3 kB
          Holger Rehn

        Activity

          People

            Unassigned Unassigned
            ickzon Holger Rehn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: