Can't SSH with "juju ssh" command to EC2 instance.

Bug #1313785 reported by Alex Lomov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Andrew Wilkins
juju (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

After updating juju to 1.19.1-trusty-amd64 version I can't ssh with juju command.

Here are details: https://gist.github.com/allomov/11374976

I am working with aws btw (ec2 environment type).

The error message is: "ssh: Could not resolve hostname ip-172-31-21-242.us-west-2.compute.internal: Name or service not known".

Also I can SSH with standard SSH command:
"ssh -i ~/.juju/ssh/juju_id_rsa <email address hidden>"

It seems that `juju ssh` tries to us private DNS name.

Tags: regression ssh

Related branches

John A Meinel (jameinel)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.19.2
importance: High → Critical
Robie Basak (racb)
Changed in juju (Ubuntu):
status: New → Triaged
Revision history for this message
Andrew Wilkins (axwalk) wrote :

I am not able to reproduce this.

juju ssh will now ssh to machine 0's public address directly, and then proxy through that to machine 0's internal address. This is to support environments where machines do not have unique public addresses (i.e. with load balancing).

Can you please ssh to the machine directly and then check whether you can resolve ip-172-31-21-242.us-west-2.compute.internal. If that does not resolve, that would indicate a problem with EC2. If it *does* resolve, then please try "juju ssh" again with --debug and attach the output.

Changed in juju-core:
status: Triaged → Incomplete
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Critical → High
Revision history for this message
Curtis Hovey (sinzui) wrote :

This issue might be that the 1.19.1 client cannot ssh to 1.18.1/2 server. I cannot use juju ssh to get to Juju CI using this combination.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1313785] Re: Can't SSH with "juju ssh" command to EC2 instance.

That sounds like a regression, we certainly need to be able to fall back to
the old method of connecting if the server doesn't support proxying the
request.

John
=:->

On Tue, May 6, 2014 at 5:12 PM, Curtis Hovey <email address hidden> wrote:

> This issue might be that the 1.19.1 client cannot ssh to 1.18.1/2
> server. I cannot use juju ssh to get to Juju CI using this combination.
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1313785
>
> Title:
> Can't SSH with "juju ssh" command to EC2 instance.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1313785/+subscriptions
>

Revision history for this message
Curtis Hovey (sinzui) wrote :

I have confirmed that juju 1.18.2 can ssh into my one of my units, but juju 1.19.1 cannot:

$ juju status
environment: juju-ci3
machines:
  "0":
    agent-state: started
    agent-version: 1.18.2
    dns-name: ec2-54-84-244-38.compute-1.amazonaws.com
    instance-id: i-59745278
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=200 mem=3840M root-disk=8192M
  "6":
    agent-state: started
    agent-version: 1.18.2
    dns-name: ec2-54-86-142-177.compute-1.amazonaws.com
    instance-id: i-fa1903da
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=2 cpu-power=650 mem=17408M root-disk=8192M
services:
  jenkins:
    charm: cs:precise/jenkins-9
    can-upgrade-to: cs:precise/jenkins-10
    exposed: true
    units:
      jenkins/0:
        agent-state: started
        agent-version: 1.18.2
        machine: "6"
        open-ports:
        - 8080/tcp
        public-address: ec2-54-86-142-177.compute-1.amazonaws.com

$ juju ssh jenkins/0
nc: getaddrinfo: Name or service not known
ssh_exchange_identification: Connection closed by remote host
ERROR subprocess encountered error code 255

tags: added: regression
Changed in juju-core:
status: Incomplete → Triaged
importance: High → Critical
Andrew Wilkins (axwalk)
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Thanks, I hadn't noticed the version difference. I can also reproduce the issue with a 1.18.2 server.

Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.