Please create a database by running a nova-api server on this host.

Asked by janson

I am trying to install nova (bexar) on centos5.5,
when I use this command:
nova-manage --flagfile /etc/nova/nova.conf project zipfile PRO1 janson
to create nova.zip file.

but an error occurs as follows:

[root@localhost nova]# nova-manage --flagfile /etc/nova/nova.conf project zipfile PRO1 janson
Unexpected error while running command.
Command: openssl ca -batch -out /tmp/tmptqlfLM/outbound.csr -config ./openssl.cnf -infiles /tmp/tmptqlfLM/inbound.csr
Exit code: 1
Stdout: ''
Stderr: "Using configuration from ./openssl.cnf\nerror loading the config file './openssl.cnf'\n16786:error:02001002:system library:fopen:No such file or directory:bss_file.c:122:fopen('./openssl.cnf','rb')\n16786:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:125:\n16786:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:197:\n"
The above error may show that the certificate db has not been created.
Please create a database by running a nova-api server on this host.

any ideas ???

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
janson
Solved:
Last query:
Last reply:
Revision history for this message
Christian Berendt (berendt) said :
#1

got to /var/lib/nova/CA and check if there is a file openssl.cnf. If not, copy and modify it from openssl.cnf.tmpl. I'm not sure, but I think you have to call the script genrootca.sh, too.

also we created a symlink /usr/lib64/python/site-packages/CA pointing to /var/lib/nova/CA. I'm not sure if this is necessary or it's only something special about our packaging.

maybe you have no /var/lib/nova/CA and you can find the files directly in /usr/lib64/python/site-packages/CA.

Revision history for this message
janson (janson071) said :
#2

yes, in /var/lib/nova/CA there is not a file openssl.cnf. but I don't know how to modify it.
Is it just to copy from openssl.cnf.tmpl ???

Revision history for this message
Vish Ishaya (vishvananda) said :
#3

did you try the suggestion in the error? As in running nova-api before exporting the zipfile?

Vish

On Feb 23, 2011, at 10:01 PM, janson wrote:

> Question #146517 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/146517
>
> janson posted a new comment:
> yes, in /var/lib/nova/CA there is not a file openssl.cnf. but I don't know how to modify it.
> Is it just to copy from openssl.cnf.tmpl ???
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
janson (janson071) said :
#4

to Vish,

yes , perhaps I should create a database by running a nova-api server on this host.

but Could you tell me how ???

Revision history for this message
Vish Ishaya (vishvananda) said :
#5

./bin/nova-api
On Feb 24, 2011, at 10:45 PM, janson wrote:

> Question #146517 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/146517
>
> janson posted a new comment:
> to Vish,
>
> yes , perhaps I should create a database by running a nova-api server on
> this host.
>
> but Could you tell me how ???
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
janson (janson071) said :
#6

following https://bugs.launchpad.net/nova/+bug/724317

it said this is a bug.

and I modify the openssl.cnf file following that page.

In the end, it doesn't work. so I don't know what to do next ???

Revision history for this message
janson (janson071) said :
#7

to Vish Ishaya:

execute ./bin/nova-api

[root@localhost nova-2011.1]# ./bin/nova-api
2011-02-25 17:00:55,366 AUDIT nova.api [-] Starting nova-api node (version 2011.1-workspace:tarmac-20110202111800-10sib5zxlu8xluca)
2011-02-25 17:00:55,366 DEBUG nova.api [-] Using paste.deploy config at: /dowmload/nova-2011.1/nova/../etc/nova-api.conf from MainProcess (pid=5770) run_app ./bin/nova-api:52
2011-02-25 17:00:55,373 DEBUG nova.api [-] App Config: ec2
{'/2007-08-29': 'ec2metadata', 'verbose': '1', '__file__': '/dowmload/nova-2011.1/etc/nova-api.conf', '/latest': 'ec2metadata', 'here': '/dowmload/nova-2011.1/etc', '/services/Cloud': 'ec2cloud', '/': 'ec2versions', '/services/Admin': 'ec2admin', '/2007-10-10': 'ec2metadata', '/2008-09-01': 'ec2metadata', '/2007-03-01': 'ec2metadata', '/2007-01-19': 'ec2metadata', '/2008-02-01': 'ec2metadata', '/1.0': 'ec2metadata', '/2009-04-04': 'ec2metadata', '/2007-12-15': 'ec2metadata'} from MainProcess (pid=5770) run_app ./bin/nova-api:59
2011-02-25 17:00:55,373 INFO nova.api [-] Running ec2 API
2011-02-25 17:00:55,624 DEBUG nova.api [-] App Config: osapi
{'__file__': '/dowmload/nova-2011.1/etc/nova-api.conf', '/v1.0': 'openstackapi', 'verbose': '1', 'here': '/dowmload/nova-2011.1/etc', '/': 'osversions'} from MainProcess (pid=5770) run_app ./bin/nova-api:59
2011-02-25 17:00:55,624 INFO nova.api [-] Running osapi API
2011-02-25 17:00:55,667 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8773
2011-02-25 17:00:55,671 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8774

it just stoped here.
any ideas ???

Revision history for this message
Vish Ishaya (vishvananda) said :
#8

it looks like it is working fine (your certificate db will now exist and you can use project zipfile)

On Feb 25, 2011, at 1:02 AM, janson wrote:

> Question #146517 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/146517
>
> janson posted a new comment:
> to Vish Ishaya:
>
> execute ./bin/nova-api
>
> [root@localhost nova-2011.1]# ./bin/nova-api
> 2011-02-25 17:00:55,366 AUDIT nova.api [-] Starting nova-api node (version 2011.1-workspace:tarmac-20110202111800-10sib5zxlu8xluca)
> 2011-02-25 17:00:55,366 DEBUG nova.api [-] Using paste.deploy config at: /dowmload/nova-2011.1/nova/../etc/nova-api.conf from MainProcess (pid=5770) run_app ./bin/nova-api:52
> 2011-02-25 17:00:55,373 DEBUG nova.api [-] App Config: ec2
> {'/2007-08-29': 'ec2metadata', 'verbose': '1', '__file__': '/dowmload/nova-2011.1/etc/nova-api.conf', '/latest': 'ec2metadata', 'here': '/dowmload/nova-2011.1/etc', '/services/Cloud': 'ec2cloud', '/': 'ec2versions', '/services/Admin': 'ec2admin', '/2007-10-10': 'ec2metadata', '/2008-09-01': 'ec2metadata', '/2007-03-01': 'ec2metadata', '/2007-01-19': 'ec2metadata', '/2008-02-01': 'ec2metadata', '/1.0': 'ec2metadata', '/2009-04-04': 'ec2metadata', '/2007-12-15': 'ec2metadata'} from MainProcess (pid=5770) run_app ./bin/nova-api:59
> 2011-02-25 17:00:55,373 INFO nova.api [-] Running ec2 API
> 2011-02-25 17:00:55,624 DEBUG nova.api [-] App Config: osapi
> {'__file__': '/dowmload/nova-2011.1/etc/nova-api.conf', '/v1.0': 'openstackapi', 'verbose': '1', 'here': '/dowmload/nova-2011.1/etc', '/': 'osversions'} from MainProcess (pid=5770) run_app ./bin/nova-api:59
> 2011-02-25 17:00:55,624 INFO nova.api [-] Running osapi API
> 2011-02-25 17:00:55,667 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8773
> 2011-02-25 17:00:55,671 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8774
>
> it just stoped here.
> any ideas ???
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
janson (janson071) said :
#9

to Vish:

but

2011-02-25 17:00:55,667 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8773
2011-02-25 17:00:55,671 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8774

it stoped here for a long time.

then execute
 "nova-manage --flagfile /etc/nova/nova.conf project zipfile PRO1 janson"

it's the same question.

if certificate db now exist and can use project zipfile, where can I find it ?

Revision history for this message
Vish Ishaya (vishvananda) said :
#10

by default it is nova.zip in the dir you executed from. If you want a different location you can specify it
nova-manage --flagfile /etc/nova/nova.conf project zipfile PRO1 janson /path/to/some/zipfile.zip

On Feb 27, 2011, at 5:40 PM, janson wrote:

> Question #146517 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/146517
>
> janson posted a new comment:
> to Vish:
>
> but
>
> 2011-02-25 17:00:55,667 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8773
> 2011-02-25 17:00:55,671 AUDIT nova.root [-] Starting ./bin/nova-api on 0.0.0.0:8774
>
> it stoped here for a long time.
>
> then execute
> "nova-manage --flagfile /etc/nova/nova.conf project zipfile PRO1 janson"
>
> it's the same question.
>
> if certificate db now exist and can use project zipfile, where can I
> find it ?
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
janson (janson071) said :
#11

to Vish:

I am very sorry I can't find nova.zip, perhaps it isn't created gernerally.

Revision history for this message
janson (janson071) said :
#12

to Vish and all :

thank you very much, now I can find nova.zip .

all I must say: thanks for all your help!

Revision history for this message
Gaurav Gupta (gagupta) said :
#13

I am running into the same error, but I can't seem to be able to fix it after trying all the solutions available. Here is the error I am getting:

root@cloud:openstack# nova-manage project zipfile openstack-demo cloud
2011-08-16 11:30:19,036 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.pyc'> from (pid=6779) __get_backend /usr/lib/pymodules/python2.6/nova/utils.py:445
2011-08-16 11:30:19,084 DEBUG nova.utils [-] Running cmd (subprocess): openssl genrsa -out /tmp/tmpZCJWTh/temp.key 1024 from (pid=6779) execute /usr/lib/pymodules/python2.6/nova/utils.py:164
2011-08-16 11:30:19,106 DEBUG nova.utils [-] Running cmd (subprocess): openssl req -new -key /tmp/tmpZCJWTh/temp.key -out /tmp/tmpZCJWTh/temp.csr -batch -subj /C=US/ST=California/L=MountainView/O=AnsoLabs/OU=NovaDev/CN=openstack-demo-cloud-2011-08-16T18:30:19Z from (pid=6779) execute /usr/lib/pymodules/python2.6/nova/utils.py:164
2011-08-16 11:30:19,118 DEBUG nova.crypto [-] Flags path: /usr/lib/pymodules/python2.6/nova/..//CA from (pid=6779) _sign_csr /usr/lib/pymodules/python2.6/nova/crypto.py:277
2011-08-16 11:30:19,118 DEBUG nova.utils [-] Running cmd (subprocess): openssl ca -batch -out /tmp/tmpzcrfCV/outbound.csr -config ./openssl.cnf -infiles /tmp/tmpzcrfCV/inbound.csr from (pid=6779) execute /usr/lib/pymodules/python2.6/nova/utils.py:164
2011-08-16 11:30:19,127 DEBUG nova.utils [-] Result was 1 from (pid=6779) execute /usr/lib/pymodules/python2.6/nova/utils.py:179
Unexpected error while running command.
Command: openssl ca -batch -out /tmp/tmpzcrfCV/outbound.csr -config ./openssl.cnf -infiles /tmp/tmpzcrfCV/inbound.csr
Exit code: 1
Stdout: ''
Stderr: "Using configuration from ./openssl.cnf\nerror loading the config file './openssl.cnf'\n6788:error:02001002:system library:fopen:No such file or directory:bss_file.c:126:fopen('./openssl.cnf','rb')\n6788:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:129:\n6788:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:197:\n"
The above error may show that the certificate db has not been created.
Please create a database by running a nova-api server on this host.

Revision history for this message
Vish Ishaya (vishvananda) said :
#14

How did you install nova? It is trying to use a CA directory from python modules and it probably doesn't have write access. If you are running from source, just run nova from the source checkout. It looks like perhaps you did setup.py install? If you are running from packages it should have set the path to something like /var/lib/nova and the CA directory should be copied in there. If the CA directory is somewhere specific, you can use somethng like the flag --state_path=/var/lib/nova

Revision history for this message
Gaurav Gupta (gagupta) said :
#15

I am using the install script from:
https://github.com/cloudbuilders/deploy.sh/blob/master/nova.sh

Specifying the flag '--state_path' resolved the issue. Thanks.

Revision history for this message
santoshsas (santoshsas02) said :
#16

facing the same problem however i couldnot find openssl.cnf.tmp ... Could any one help

Revision history for this message
santoshsas (santoshsas02) said :
#17

Error! .. In CA FOLDER there is no openssl.conf is created and where to search for the template file of openstack

2012-12-17 18:17:59 DEBUG nova.utils [req-ba1b0117-64f8-44b2-b812-70eef5795284 None None] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.pyc'> from (pid=17401) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
2012-12-17 18:18:00 DEBUG nova.utils [-] Running cmd (subprocess): openssl genrsa -out /tmp/tmpuXkwyO/temp.key 1024 from (pid=17401) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-12-17 18:18:00 DEBUG nova.utils [-] Running cmd (subprocess): openssl req -new -key /tmp/tmpuXkwyO/temp.key -out /tmp/tmpuXkwyO/temp.csr -batch -subj /C=US/ST=California/O=OpenStack/OU=NovaDev/CN=cookbook-openstack-2012-12-17T12:48:00Z from (pid=17401) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-12-17 18:18:00 DEBUG nova.crypto [-] Flags path: /var/lib/nova/CA from (pid=17401) _sign_csr /usr/lib/python2.7/dist-packages/nova/crypto.py:290
2012-12-17 18:18:00 DEBUG nova.utils [-] Running cmd (subprocess): openssl ca -batch -out /tmp/tmp0XIsyT/outbound.csr -config ./openssl.cnf -infiles /tmp/tmp0XIsyT/inbound.csr from (pid=17401) execute /usr/lib/python2.7/dist-packages/nova/utils.py:219
2012-12-17 18:18:00 DEBUG nova.utils [-] Result was 1 from (pid=17401) execute /usr/lib/python2.7/dist-packages/nova/utils.py:235
Unexpected error while running command.
Command: openssl ca -batch -out /tmp/tmp0XIsyT/outbound.csr -config ./openssl.cnf -infiles /tmp/tmp0XIsyT/inbound.csr
Exit code: 1
Stdout: ''
Stderr: "Using configuration from ./openssl.cnf\nerror loading the config file './openssl.cnf'\n139769128498848:error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen('./openssl.cnf','rb')\n139769128498848:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:172:\n139769128498848:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:197:\n"
The above error may show that the certificate db has not been created.
Please create a database by running a nova-cert server on this host.