Ask Your Question
5

'no route to host' trying to ssh to new instance.

asked 2013-07-19 15:18:20 -0500

MattWar gravatar image

updated 2013-07-20 10:28:33 -0500

Hi,

I'm working my way through the openstack cloud computing cookbook and setting up an openstack environm,ent in virtualbox with ubuntu.

everything went fine up until it came to starting an ubuntu cloud image instance and connecting to it.

Everything appears ok;

openstack1:~/openstack$ nova image-list
+--------------------------------------+-----------------------------------------------------+--------+--------+
| ID                                   | Name                                                | Status | Server |
+--------------------------------------+-----------------------------------------------------+--------+--------+
| d68ac93c-7a5c-497b-bc6e-58183cf9167a | images/precise-server-cloudimg-i386-vmlinuz-virtual | ACTIVE |        |
| 45ec8f6f-fe7d-4f9a-a437-1bb6aa285dc9 | images/precise-server-cloudimg-i386.img             | ACTIVE |        |
+--------------------------------------+-----------------------------------------------------+--------+--------+


openstack1:~/openstack$ nova boot myInstance --image 45ec8f6f-fe7d-4f9a-a437-1bb6aa285dc9 --flavor 2 --key_name openstack

+-------------------------------------+-----------------------------------------+
| Property                            | Value                                   |
+-------------------------------------+-----------------------------------------+
| status                              | BUILD                                   |
| updated                             | 2013-07-19T20:14:20Z                    |
| OS-EXT-STS:task_state               | scheduling                              |
| OS-EXT-SRV-ATTR:host                | None                                    |
| key_name                            | openstack                               |
| image                               | images/precise-server-cloudimg-i386.img |
| hostId                              |                                         |
| OS-EXT-STS:vm_state                 | building                                |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000008                       |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None                                    |
| flavor                              | m1.small                                |
| id                                  | d6d3a7dd-e39b-4e39-94ff-14b5519649fc    |
| user_id                             | openstack                               |
| name                                | myInstance                              |
| adminPass                           | 5U8YRNAFbk7v                            |
| tenant_id                           | cookbook                                |
| created                             | 2013-07-19T20:14:20Z                    |
| OS-DCF:diskConfig                   | MANUAL                                  |
| accessIPv4                          |                                         |
| accessIPv6                          |                                         |
| progress                            | 0                                       |
| OS-EXT-STS:power_state              | 0                                       |
| metadata                            | {}                                      |
| config_drive                        |                                         |
+-------------------------------------+-----------------------------------------+


after a short wait I can see


openstack1:~/openstack$ nova list
+--------------------------------------+------------+--------+----------------------------+
| ID                                   | Name       | Status | Networks                   |
+--------------------------------------+------------+--------+----------------------------+
| d6d3a7dd-e39b-4e39-94ff-14b5519649fc | myInstance | ACTIVE | vmnet=10.0.0.4, 172.16.1.1 |
+--------------------------------------+------------+--------+----------------------------+

However; I also get this error on the console;

block nbd15: Receive control failed (result -32)

and when attempting to SSH I get

openstack1:~/openstack$ ssh -i openstack.pem <a href="mailto:ubuntu@172.16.1.1">ubuntu@172.16.1.1</a>
ssh: connect to host 172.16.1.1 port 22: No route to host

I've been through all the cookbook steps up until this point several times, and am as sure as I can be that everything has been done correctly...

any assistance in troubleshooting this would be much appreciated!

edit: after a short while I have noticed the instance goes to SHUTOFF state, does this imply it has shut itself down for some reason?

openstack1:/var/log/libvirt/qemu$ nova list
+--------------------------------------+------------+---------+----------------------------+
| ID                                   | Name       | Status  | Networks                   |
+--------------------------------------+------------+---------+----------------------------+
| 9fed4c54-a48b-4a21-b6c2-c73d74ad8254 | myInstance | SHUTOFF | vmnet=10.0.0.3, 172.16.1.1 |
+--------------------------------------+------------+---------+----------------------------+

I also see this in the libvirt log for the image

2013-07-19 20:30:03.832+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-1.0 -no-kvm -m 2048 -smp 1,sockets=1,cores=1,threads=1 -name instance-00000009 -uuid 9fed4c54-a48b-4a21-b6c2-c73d74ad8254 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-00000009.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -kernel /var/lib/nova/instances/instance-00000009/kernel -append root=/dev/vda console=ttyS0 -drive file=/var/lib/nova/instances/instance-00000009/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/var/lib/nova/instances/instance-00000009/disk.local,if=none,id=drive-virtio-disk1,format=qcow2,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -netdev tap,fd=19,id=hostnet0,vhost=on,vhostfd=20 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:38:8c:68,bus=pci.0,addr=0x3 -chardev file,id=charserial0,path=/var/lib/nova/instances/instance-00000009/console.log -device isa-serial,chardev=charserial0,id=serial0 -chardev pty ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2013-08-26 09:42:25 -0500

itarchitectkev gravatar image

Hi, I'm the author of the book. You can ignore the block nbd15 errors - I've seen that on successful launches. I am currently working on the Grizzly release of the book and as such I haven't had time to look back at the Essex release branch to see what has changed and what isn't working. Can you paste the nova-compute.log from the compute host that's launching that instance?

edit flag offensive delete link more

Comments

Hi, I have the same issue (status: SHUTOFF) and I can't connect to the new instance, I am following the openstack cookbook (First edition), my nova-compute.log: http://paste.openstack.org/show/47586/%3C/p%3E (http://paste.openstack.org/show/47586/)

Pablolibo gravatar imagePablolibo ( 2013-09-26 23:27:02 -0500 )edit

Hi! I'm following step-by-step the Chapter 1 of the 1st edition and I'm having the exact same problem. Although everything seems to be Ok, I cannot ping the new instance nor ssh it. Also, the machine also goes to "shutoff" status, yet I can handle that by running euca-start-instances command.

baldo gravatar imagebaldo ( 2013-11-29 12:09:20 -0500 )edit
0

answered 2013-07-20 02:23:26 -0500

darragh-oreilly gravatar image

updated 2013-07-26 08:42:14 -0500

Could be just a lack of memory - how much has the VirtualBox VM got? - you are trying to start a 2048MB m1.small within it. Try using the m1.tiny flavor which just requires 512MB. Also starting Ubuntu in QEMU is very slow - try the slim Cirros test image instead - it only needs 50MB RAM.

Update: this problem seems to be the same as this question. Maybe this cookbook has an errata or the author can help? You will need to provide the OS and OpenStack versions.

edit flag offensive delete link more

Comments

The virtualbox VM has 4GB / 2 CPU / 40GB disk. Trying to start up a tiny instance also fails the same way.

MattWar gravatar imageMattWar ( 2013-07-20 07:10:51 -0500 )edit

How does /var/lib/nova/instances/instance-00000009/console.log end?

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-07-20 08:15:09 -0500 )edit

Added file lines to the question. I do notice this; CPU0: AMD QEMU Virtual CPU version 1.0 stepping 03, but my system is intel, is it possible qemu &/or the image are trying to run with the wrong CPU type?

MattWar gravatar imageMattWar ( 2013-07-20 10:25:27 -0500 )edit

Have you tried the cirros image? - its only <20MB to download. Maybe there is some logs for libvirt and QEMU in /var/log/

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-07-20 11:11:33 -0500 )edit

No Joy, I get the same 'block nbd15: Receive control failed (result -32)' error on console, and the same general behaviour. Wether the 'no route to host' issue is linked with the nbd15 error, I'm not sure. I'm looking in more detail at the netwoprk setup as given from the openstack cookbook chapter to see if I can spot any deliberate-mistakes ;) but networking is my weakest skillset of all thats involved here.

MattWar gravatar imageMattWar ( 2013-07-26 08:07:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2013-07-19 15:18:20 -0500

Seen: 4,788 times

Last updated: Aug 26 '13