Ask Your Question
1

What causes error "service n-net is not running" when running stack.sh?

asked 2013-05-10 06:52:18 -0500

Pío Pío 1949 gravatar image

updated 2013-08-22 19:44:16 -0500

fifieldt gravatar image

Hi! I'm trying to run a DevStack installation in a fresh Ubuntu 12.04 Server installation. I am using two physical servers - the controller node is working fine (or seems to), but the compute node is not, since stack.sh fails every time I run it.

I created a user "stack" with password "stack" and I'm running stack.sh with it. Every time I try to run it, I get this error: "Error: service n-net is not running". Typing "nova-manage service list" or "nova-manage host list" after stack.sh fails gives me the following error:

2013-05-09 14:44:07.926 CRITICAL nova [req-83022c84-e910-4eb3-aa02-4e992fa5002a None None] Could not parse rfc1738 URL from string ''
2013-05-09 14:44:07.926 TRACE nova Traceback (most recent call last):
2013-05-09 14:44:07.926 TRACE nova   File "/usr/local/bin/nova-manage", line 9, in <module>
2013-05-09 14:44:07.926 TRACE nova     load_entry_point('nova==2013.2.a549.g4ce8f2a', 'console_scripts', 'nova-manage')()
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/cmd/manage.py", line 1292, in main
2013-05-09 14:44:07.926 TRACE nova     ret = fn(*fn_args, **fn_kwargs)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/cmd/manage.py", line 652, in list
2013-05-09 14:44:07.926 TRACE nova     services = db.service_get_all(ctxt)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/db/api.py", line 132, in service_get_all
2013-05-09 14:44:07.926 TRACE nova     return IMPL.service_get_all(context, disabled)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 97, in wrapper
2013-05-09 14:44:07.926 TRACE nova     return f(*args, **kwargs)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 362, in service_get_all
2013-05-09 14:44:07.926 TRACE nova     query = model_query(context, models.Service)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 178, in model_query
2013-05-09 14:44:07.926 TRACE nova     session = kwargs.get('session') or get_session()
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/openstack/common/db/sqlalchemy/session.py", line 350, in get_session
2013-05-09 14:44:07.926 TRACE nova     engine = get_engine(sqlite_fk=sqlite_fk)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/openstack/common/db/sqlalchemy/session.py", line 472, in get_engine
2013-05-09 14:44:07.926 TRACE nova     sqlite_fk=sqlite_fk)
2013-05-09 14:44:07.926 TRACE nova   File "/opt/stack/nova/nova/openstack/common/db/sqlalchemy/session.py", line 531, in create_engine
2013-05-09 14:44:07.926 TRACE nova     connection_dict = sqlalchemy.engine.url.make_url(sql_connection)
2013-05-09 14:44:07.926 TRACE nova   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 178, in make_url
2013-05-09 14:44:07.926 TRACE nova     return _parse_rfc1738_args(name_or_url)
2013-05-09 14:44:07.926 TRACE nova   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 219, in _parse_rfc1738_args
2013-05-09 14:44 ...
(more)
edit retag flag offensive close merge delete

Comments

The trace from the end of the failed stack.sh run, and the localrc from both nodes would be useful.

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-05-10 10:19:16 -0500 )edit

There you go! :)

Pío Pío 1949 gravatar imagePío Pío 1949 ( 2013-05-14 07:29:44 -0500 )edit

3 answers

Sort by » oldest newest most voted
0

answered 2013-05-14 13:21:40 -0500

darragh-oreilly gravatar image

You have n-net in ENABLED_SERVICES for the compute node.

edit flag offensive delete link more
0

answered 2017-03-08 06:07:27 -0500

updated 2017-03-09 04:14:41 -0500

For the Ocata release I founded a solution (2-node setup). An import part is the placement-api since the Newton update (14.0.0), so first of all enable this in all your nodes:

local.conf:

enable_service placement-api

First run ./stack.sh on your controller node and after that installation run it on the other nodes. Also here you will see the error Service n-net is not running...

Now edit your nova.conf file in /etc/nova/nova.conf because there will be no database and database_api section:

[database]
connection=mysql+pymysql://root:DB_PASS@IP_OF_CONTROLLER_NODE/nova

[api_database]
connection=mysql+pymysql://root:DB_PASS@IP_OF_CONTROLLER_NODE/nova_api

When adding these, you can check if it works with following command:

stack@jerico-02:/devstack$ nova-manage --debug host list
host                        zone           
0.0.0.0                     internal       
jerico-03                   internal       
jerico-02                   nova

Also in the dashboard the new compute (hypervisor) shows up!

Hope it helps!

(Tested on Ubuntu Server 16.04 LTS with devstack and OpenStack Ocata)

EDIT 1

It's better to use neutron instead of n-net, so I followed this https://wiki.openstack.org/wiki/NeutronDevstack (link) for using neutron in devstack (easy setup)!

After that, the only problem were cells, which can be fixed by https://ask.openstack.org/en/question/102256/how-to-configure-placement-service-for-compute-node-on-ocata/ (this).

Good luck!

edit flag offensive delete link more
0

answered 2013-05-14 14:02:04 -0500

armando-migliaccio gravatar image

updated 2013-05-14 14:02:35 -0500

It looks like there might be something wrong with your sql connection string (it's either malformed or empty).

Check the content of /etc/nova.conf to investigate.

A similar error was reported here:

bug #1142782

But it looks a lot like the problem you are having, but it is still an open issue.

edit flag offensive delete link more

Comments

All the lines of /opt/stack/nova/etc/nova/nova.conf were commented out (all of them start with "#"). I have tried removing the # at the start of the line and also changed the line for this:

sql_connection=mysql://root:devstack@193.146.91.13/nova?charset=utf8

Still not working. I

Pío Pío 1949 gravatar imagePío Pío 1949 ( 2013-05-15 03:41:59 -0500 )edit

I also think that the SQL connection used to work (at least it must be working for some of the components, since there was some activity in the MySQL server log). But it might be just not working for nova-network.

Pío Pío 1949 gravatar imagePío Pío 1949 ( 2013-05-15 03:43:55 -0500 )edit
1

File in question is /etc/nova/nova.conf; not the one under /opt/stack

armando-migliaccio gravatar imagearmando-migliaccio ( 2013-05-15 05:59:16 -0500 )edit

The sql_connection variable in /etc/nova/nova.conf is empty. For some reason, when I run stack.sh after editing the file to write the right value in, sql_connection goes blank again and I keep having the same error.

Pío Pío 1949 gravatar imagePío Pío 1949 ( 2013-05-15 06:20:04 -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-05-10 06:52:18 -0500

Seen: 2,222 times

Last updated: Mar 09 '17