• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ec2-plugin
    • None

      in ec2-plugin/src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java

      on line 372 in function `getEC2HostAddress()`

      there is a line:

      ```
      String host = inst.getPublicDnsName();
      ```

      This assumes that DNS Hostnames are enabled for the VPC which the slave instance is in, however, by default DNS is not enabled. This causes an error when attempting to relaunch slave instances in VPC, but *NOT* when launching new instances.

      The best fix would be to remove ALL usage of Public DNS and instead only use public IP or private DNS, both which are guaranteed to exist (I think).

          [JENKINS-34533] Do not call getPublicDnsName

          Ian Bamforth added a comment -

          This problem has bitten me too. The setting for this is clearly labelled "Connect using Public IP", but that is not what the code does - it tries to use the public dns. In a vpc, the public dns resolves to a private ip address.

          Ian Bamforth added a comment - This problem has bitten me too. The setting for this is clearly labelled "Connect using Public IP", but that is not what the code does - it tries to use the public dns. In a vpc, the public dns resolves to a private ip address.

            francisu Francis Upton
            johnny_shields Johnny Shields
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: