Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when starting masakari-controller #13

Open
chtwerdna opened this issue Feb 6, 2017 · 3 comments
Open

Error when starting masakari-controller #13

chtwerdna opened this issue Feb 6, 2017 · 3 comments

Comments

@chtwerdna
Copy link

Hello,

I downloaded the master branch of this project.
now I can vagrant up the controller and compute nodes.
(with some try and error but adding apt-get and pip cmd to vagrantfile fixed them).
deploy OpenStack in Controller/Compute and devstack started OK.

but when I try to start the masakari-controller it's not running
stack@controller:~ /devstack$ sudo service masakari-controller start
Starting masakari: *
stack@controller:~ /devstack$ sudo service masakari-controller status
** masakari is not running

the only error I found in the log is:
stack@controller:~/masakari$ cat /var/log/masakari/masakari-controller.log
Feb 06 03:23:18 masakari(20458): CRITICAL: An error during initializing masakari controller: No option 'log_file' in section: 'log''
Feb 06 03:23:18 masakari(20458): ERROR: <type 'exceptions.OSError'>'
Feb 06 03:23:18 masakari(20458): ERROR: [Errno 17] File exists: '/var/log/masakari/''
Feb 06 03:23:18 masakari(20458): ERROR: File "/opt/masakari/controller/masakari_controller.py", line 102, in init
os.makedirs(log_dir)
'
Feb 06 03:23:18 masakari(20458): ERROR: File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
'

any idea how to fix this? Thanks.

@sampathP
Copy link
Contributor

sampathP commented Feb 6, 2017

Hi Chtwerdna,
It seems that, masakari failed to init the log file directory and create the log file.
Could you please share the [log] section of your masakari.conf file.
You may retry after completely delete the "/var/log/masakari",
DO NOT FORGET to backup the previous log files before delete it.

And, if you have no strong reason to use this older version of Masakari,
I strongly recommend you to move to latest version of Masakari in Openstack.

@chtwerdna
Copy link
Author

Hi sampathP,

Thanks for the hint.
the [log] section in my /etc/masakari/masakari-controller.conf only has one line.

[log]
log_level = info

After googling I found masakari has a sample file for this conf.
https://github.com/ntt-sic/masakari/blob/master/masakari-controller/etc/masakari-controller.conf.sample
(there is also a sample file in the directory: /etc/masakari/masakari-controller.conf.sample )

is these two file I found the missing configurations.
After adding the following two lines, the controller starts normally.
log_file = /var/log/masakari/masakari-controller.log
logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(threadName)s] %(message)s

By the way, I know that there's a latest version of masakari, but I'm using OpenStack mikata.
Also this is the first try to verify the function and behaviors so I just need a quick setup environment.
After this I may try the new masakari in Openstack.

Thanks again for both the hint and the recommendation.

@sampathP
Copy link
Contributor

sampathP commented Feb 7, 2017

Hi Chtwerdna,
As you found out, with log settings, this should work fine.
Even in openstack masakari, masakari-monitors and python-masakariclient,
you can find the samples of required config file and you can generate the full config file with tox.
Let us know if you need any help..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants