Ask Your Question
1

Cannot SSH to Docker Instance on Kilo [closed]

asked 2015-06-03 14:05:11 -0500

Nastooh gravatar image

updated 2015-06-04 13:59:19 -0500

Hi
Followed https://wiki.openstack.org/wiki/Docker + some extra steps, https://ask.openstack.org/en/question..., to install Docker on Kilo. Instantiated rastasheep/ubuntu-sshd:14.04 docker image, on a multinode setup, based on Ubuntu 14.04. Assigned a floating IP to the instance and am able to ping externally; however, cannot ssh to instance. Tried the following:
On the network node, can ping instance's private IP, via netns:

# ip netns exec  qdhcp-b2ef7455-4180-4c66-a12c-917b6dfa7814 ping 10.40.100.17
PING 10.40.100.17 (10.40.100.17) 56(84) bytes of data.
64 bytes from 10.40.100.17: icmp_seq=1 ttl=64 time=1.11 ms
64 bytes from 10.40.100.17: icmp_seq=2 ttl=64 time=0.638 ms
64 bytes from 10.40.100.17: icmp_seq=3 ttl=64 time=0.240 ms
...
# ip netns exec  qrouter-1b699d5a-aa76-4471-9215-589f8c6be39e ping 10.40.100.17
PING 10.40.100.17 (10.40.100.17) 56(84) bytes of data.
64 bytes from 10.40.100.17: icmp_seq=1 ttl=64 time=1.38 ms
64 bytes from 10.40.100.17: icmp_seq=2 ttl=64 time=0.269 ms
64 bytes from 10.40.100.17: icmp_seq=3 ttl=64 time=0.316 ms
...

Can also ping externally:

# neutron  floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id                                   | fixed_ip_address | floating_ip_address | port_id                              |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| f4dbb89f-b030-44c7-b0b6-097260270d47 | 10.40.100.17     | 10.4.50.54          | e3ff0376-8b02-4784-a2d9-f7a27ae982e6 |
+--------------------------------------+------------------+---------------------+--------------------------------------+
#
$ ping 10.4.50.54 
PING 10.4.50.54 (10.4.50.54) 56(84) bytes of data.
64 bytes from 10.4.50.54: icmp_seq=1 ttl=63 time=1.47 ms
64 bytes from 10.4.50.54: icmp_seq=2 ttl=63 time=0.912 ms
64 bytes from 10.4.50.54: icmp_seq=3 ttl=63 time=0.619 ms

Executing bash on the running instance, I can ssh and ping the instance:

# docker exec -it c2363ef4a783 /bin/bash
root@instance-00000016:/# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8150 (8.1 KB)  TX bytes:8150 (8.1 KB)

nse3ff0376-8b Link encap:Ethernet  HWaddr fa:16:3e:31:c3:ed  
          inet addr:10.40.100.17  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe31:c3ed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:297 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3085 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:32243 (32.2 KB)  TX bytes:365503 (365.5 KB)

root@instance-00000016:/# ping 10.40.100.17
PING 10.40.100.17 (10.40.100.17) 56(84) bytes of data.
64 bytes from 10.40.100.17: icmp_seq=1 ttl=64 time=0.046 ms
64 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Nastooh
close date 2015-06-05 13:26:19.384081

Comments

What is the routing table like inside the docker container? Also it's ip a l? My experience docker containers have their own IP addresses and are on their own private docker0 private net.

slmingol gravatar imageslmingol ( 2015-06-05 16:01:30 -0500 )edit

I am facing the same problem. Can you please share what you did to solve this issue?

rehansheta gravatar imagerehansheta ( 2015-10-12 18:03:18 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-06-04 09:57:51 -0500

updated 2015-06-04 15:58:03 -0500

Have you allowed port 22 in your default security group?

# nova secgroup-add-rule default tcp 22 22 0.0.0.0/0

OR

# neutron security-group-rule-create --direction ingress --protocol tcp --port_range_min 22 --port_range_max 22 default
edit flag offensive delete link more

Comments

1

Thanks for reply. Kindly, see Edit 1. (format issue). I should also add that I can ssh to cirros, latest d8de71c04044, image.

Nastooh gravatar imageNastooh ( 2015-06-04 13:57:40 -0500 )edit
1

Can you share the Dockerfile used to build the container image?

jose-de-la-rosa gravatar imagejose-de-la-rosa ( 2015-06-04 16:02:51 -0500 )edit
1

From docker hub: rastasheep/ubuntu-sshd 14.04 063f5e7d07b3 3 days ago 251.2 MB

Nastooh gravatar imageNastooh ( 2015-06-04 17:42:32 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-06-03 14:05:11 -0500

Seen: 300 times

Last updated: Jun 04 '15