euca-allocate-address failed

Asked by Moshe Melnikov

I installed Nova with script from https://github.com/dubsquared/OpenStack-NOVA-Installer-Script/raw/master/nova-CC-
install-v1.1.sh
When I try to run euca-allocate-address command it failed with following message:
root@Moshe-U2:~# euca-allocate-address
UnknownError: An unknown error has occurred. Please try your request again.

How can I resolve it?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Everett Toews
Solved:
Last query:
Last reply:
Revision history for this message
Everett Toews (everett-toews) said :
#1

Did you create some floating IP addresses first? You need to run

nova-manage floating create my-hostname xxx.xxx.xxx.xxx/xx

before you can use euca-allocate-address.

Have a look at the last answer to this question, https://answers.launchpad.net/nova/+question/149013

There's more info on floating IPs there.

Revision history for this message
Moshe Melnikov (moshe-zadarastorage) said :
#2

In my configuration I use FlatManager network. Do I need to "euca-allocate-addres" to create public IP?
Curently I have running instance, but I can't SSH or ping to it's IP
My nova,conf
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--verbose
--s3_host=170.70.0.3
--rabbit_host=170.70.0.3
--cc_host=170.70.0.3
--ec2_url=http://170.70.0.3:8773/services/Cloud
--fixed_range=10.0.0.0/12
--network_size=8
--FAKE_subdomain=ec2
--routing_source_ip=170.70.0.3
--verbose
--sql_connection=mysql://root:moshe@170.70.0.3/nova
--network_manager=nova.network.manager.FlatManager
--libvirt_type=qemu

ifconfig
br100 Link encap:Ethernet HWaddr 08:00:27:98:06:26
          inet addr:170.70.0.3 Bcast:170.70.0.255 Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe98:626/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:56627 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16412 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:27522943 (27.5 MB) TX bytes:1501829 (1.5 MB)

eth0 Link encap:Ethernet HWaddr 08:00:27:98:06:26
          inet6 addr: fe80::a00:27ff:fe98:626/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:121104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40122 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:96777151 (96.7 MB) TX bytes:3179456 (3.1 MB)

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:16436 Metric:1
          RX packets:2960703 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2960703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:269330997 (269.3 MB) TX bytes:269330997 (269.3 MB)

virbr0 Link encap:Ethernet HWaddr 46:7f:8e:55:d3:1b
          inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
          inet6 addr: fe80::447f:8eff:fe55:d31b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)

vnet0 Link encap:Ethernet HWaddr fe:16:3e:67:c5:22
          inet6 addr: fe80::fc16:3eff:fe67:c522/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:195 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6624 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:10078 (10.0 KB) TX bytes:846720 (846.7 KB)

euca-describe-instances
RESERVATION r-w0qmkhve ZProject1
INSTANCE i-00000001 ami-an1inti6 10.0.0.2 10.0.0.2 running ZProject1 (ZProject1, Moshe-U2)0 m1.tiny 2011-04-04 12:45:17 nova

I can't ping to 10.0.0.2

Revision history for this message
Best Everett Toews (everett-toews) said :
#3

First you need to "create" public IPs with

nova-manage floating create my-hostname xxx.xxx.xxx.xxx/xx

keep in mind that those public IPs have to belong to you and be routable to
your network.

Then you need to allocation them to yourself as a nova user.

euca-allocate-address xxx.xxx.xxx.xyy

Finally you associate them with an instance.

euca-associate-address -i i-1 xxx.xxx.xxx.xyy
But if you can't ping or ssh the private IP address you're not going to get
very far with a public IP address. Personally, I've never had much luck with
FlatManager. I've only been able to ping and ssh to instances with
FlatDHCPManager or VlanManager. You might want to try one of those network
modes. Plus there's lots of help with that problem in the
answers<https://answers.launchpad.net/nova/+questions?field.search_text=ping+ssh&field.sort=RELEVANCY&field.sort-empty-marker=1&field.actions.search=Search&field.language=en&field.language-empty-marker=1&field.status=OPEN&field.status=NEEDSINFO&field.status=ANSWERED&field.status=SOLVED&field.status-empty-marker=1>already.

You might also want to have a look at the trunk documentation for Configuring
Network on the Compute
Node<http://docs.openstack.org/trunk/openstack-compute-admin/content/configuring-networking-on-the-compute-node.html>.
It's got a lot more info than what's in the official docs currently.

Everett

Revision history for this message
Moshe Melnikov (moshe-zadarastorage) said :
#4

I changed network manager to FlatDHCPManager and now it's working.
I'm just wondering if somebody worked with FlatManager?

Thanks,
Moshe

Revision history for this message
amitkhoth (amitkhoth) said :
#5

#euca-allocate-address
an unknown error has occurred.please try your request again.

 i am unable to solve this problem.
how can i resolve it?