Ask Your Question
0

aodh-api: aodh-api: error: unrecognized arguments: --logfile /var/log/aodh/api.log

asked 2016-12-06 02:10:31 -0600

chansonzhang gravatar image

When I try to run systemctl start openstack-aodh-api.service it gave no error on the console.

But the systemctl status openstack-aodh-api.service show the following status:

    ● openstack-aodh-api.service - OpenStack Alarm API service
   Loaded: loaded (/usr/lib/systemd/system/openstack-aodh-api.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2016-12-06 16:01:04 CST; 6min ago
  Process: 14809 ExecStart=/usr/bin/aodh-api --logfile /var/log/aodh/api.log (code=exited, status=2)
 Main PID: 14809 (code=exited, status=2)

Dec 06 16:01:04 controller systemd[1]: Unit openstack-aodh-api.service entered failed state.
Dec 06 16:01:04 controller systemd[1]: openstack-aodh-api.service failed.
Dec 06 16:01:04 controller systemd[1]: openstack-aodh-api.service holdoff time over, scheduling restart.
Dec 06 16:01:04 controller systemd[1]: start request repeated too quickly for openstack-aodh-api.service
Dec 06 16:01:04 controller systemd[1]: Failed to start OpenStack Alarm API service.
Dec 06 16:01:04 controller systemd[1]: Unit openstack-aodh-api.service entered failed state.
Dec 06 16:01:04 controller systemd[1]: openstack-aodh-api.service failed.

And, I found a error line in /var/log/messages:

Dec  6 14:59:33 controller aodh-api: aodh-api: error: unrecognized arguments: --logfile /var/log/aodh/api.log

Does anyone know what't the matter. Thank you first!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2017-03-13 11:05:14 -0600

Jeffrey Guan gravatar image

updated 2017-03-13 11:42:05 -0600

rbowen gravatar image

ROOT Cause: Let's have a look at the binary script for aodh-api:

/usr/bin/aodh-api
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('--port', '-p', type=int, default=8000,

Please be noticed the default port for aodh api is 8000. But the actually port is 8042 for aodh api.

So we can just go ahead to update "8000" to "8042" for aodh-api.

Then update /usr/lib/systemd/system/openstack-aodh-api.service from "ExecStart=/usr/bin/aodh-api --logfile /var/log/aodh/api.log" to "ExecStart=/usr/bin/aodh-api "

Do not forget to update the ownership for aodh-api.log

chmod -R aodh:aodh /var/log/aodh/aodh-api.log
edit flag offensive delete link more

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

2 followers

Stats

Asked: 2016-12-06 02:10:31 -0600

Seen: 383 times

Last updated: Mar 13 '17