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

Unable to restart scheduler and broker on ubuntu 16.04 #28

Open
fpeyre opened this issue Mar 23, 2017 · 2 comments
Open

Unable to restart scheduler and broker on ubuntu 16.04 #28

fpeyre opened this issue Mar 23, 2017 · 2 comments

Comments

@fpeyre
Copy link

fpeyre commented Mar 23, 2017

I install Alignak with the package for ubuntu 16.04
(At the moment when I make this issue : alignak-all_0.2-1.1489300848.c527ae7_all.deb )

I have some issues when i want restart with systemctl the scheduler and the broker

For the scheduler, after systemctl restart alignak-scheduler, I make

systemctl status alignak-scheduler
● alignak-scheduler.service - Alignak Scheduler
   Loaded: loaded (/lib/systemd/system/alignak-scheduler.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2017-03-23 15:14:04 UTC; 48s ago
  Process: 23884 ExecStart=/usr/bin/alignak-scheduler -d -c /etc/alignak/daemons/schedulerd.ini (code=exited, status=1/FAILURE)
 Main PID: 23455 (code=killed, signal=KILL)
   CGroup: /lxc/infra-core-monitoring-test-3064715/system.slice/alignak-scheduler.service
           ├─23456 alignak-scheduler                                                                   
           └─23761 alignak-scheduler-master module: logs                                               

Mar 23 15:14:04 infra-core-monitoring-test-3064715 alignak-scheduler[23884]:     sys.exit(main())
Mar 23 15:14:04 infra-core-monitoring-test-3064715 alignak-scheduler[23884]:   File "/usr/lib/python2.7/dist-packages/alignak/bin/alignak_scheduler.py", line 97, in main
Mar 23 15:14:04 infra-core-monitoring-test-3064715 alignak-scheduler[23884]:     daemon.main()
Mar 23 15:14:04 infra-core-monitoring-test-3064715 alignak-scheduler[23884]:   File "/usr/lib/python2.7/dist-packages/alignak/daemons/schedulerdaemon.py", line 391, in main
Mar 23 15:14:04 infra-core-monitoring-test-3064715 alignak-scheduler[23884]:     self.uri = self.http_daemon.uri
Mar 23 15:14:04 infra-core-monitoring-test-3064715 alignak-scheduler[23884]: AttributeError: 'NoneType' object has no attribute 'uri'
Mar 23 15:14:04 infra-core-monitoring-test-3064715 systemd[1]: alignak-scheduler.service: Control process exited, code=exited status=1
Mar 23 15:14:04 infra-core-monitoring-test-3064715 systemd[1]: Failed to start Alignak Scheduler.
Mar 23 15:14:04 infra-core-monitoring-test-3064715 systemd[1]: alignak-scheduler.service: Unit entered failed state.
Mar 23 15:14:04 infra-core-monitoring-test-3064715 systemd[1]: alignak-scheduler.service: Failed with result 'exit-code'.

I make the same thing for the broker. We have a different error message

systemctl status alignak-broker
● alignak-broker.service - Alignak Broker
   Loaded: loaded (/lib/systemd/system/alignak-broker.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Thu 2017-03-23 15:21:30 UTC; 16s ago
  Process: 23942 ExecStart=/usr/bin/alignak-broker -d -c /etc/alignak/daemons/brokerd.ini (code=exited, status=0/SUCCESS)
 Main PID: 23414 (code=killed, signal=KILL)
   CGroup: /lxc/infra-core-monitoring-test-3064715/system.slice/alignak-broker.service
           ├─23415 alignak-broker                                                                
           └─23639 alignak-broker-master module: backend_broker                                  

Mar 23 15:20:01 infra-core-monitoring-test-3064715 alignak-broker[23942]:   File "/usr/lib/python2.7/dist-packages/alignak/http/daemon.py", line 122, in __init__
Mar 23 15:20:01 infra-core-monitoring-test-3064715 alignak-broker[23942]:     raise PortNotFree(msg)
Mar 23 15:20:01 infra-core-monitoring-test-3064715 alignak-broker[23942]: PortNotFree: Error: Sorry, the port 0.0.0.0/7772 is not free
Mar 23 15:20:01 infra-core-monitoring-test-3064715 alignak-broker[23942]: [2017-03-23 15:20:00 UTC] INFO: [alignak.daemon] Waiting for initial configuration
Mar 23 15:21:30 infra-core-monitoring-test-3064715 systemd[1]: alignak-broker.service: Start operation timed out. Terminating.
Mar 23 15:21:30 infra-core-monitoring-test-3064715 alignak-broker[23942]: .........................................................................................[2017-03-23 15:21:30 UTC] INFO: [alignak.daemon] process 23942 received a signal: 15
Mar 23 15:21:30 infra-core-monitoring-test-3064715 alignak-broker[23942]: .
Mar 23 15:21:30 infra-core-monitoring-test-3064715 systemd[1]: Failed to start Alignak Broker.
Mar 23 15:21:30 infra-core-monitoring-test-3064715 systemd[1]: alignak-broker.service: Unit entered failed state.
Mar 23 15:21:30 infra-core-monitoring-test-3064715 systemd[1]: alignak-broker.service: Failed with result 'timeout'.

I don't know if it's specific to the package or alignak itself. If I am at the wrong place, i will create the issue on Alignak.

I am available to make more test or give you more information

@fpeyre
Copy link
Author

fpeyre commented Mar 23, 2017

Ok for more information:

My use case is not just a simple restart.
I make systemctl start alignak-scheduler once
I make a restart, everything seems work
I make systemctl start alignak-scheduler
I make restart -> We have the error message

I join the log in a file
schedulerd.log.txt
brokerd.log.txt

@mohierf
Copy link
Contributor

mohierf commented Mar 23, 2017

In the scheduler log, the interesting error is:

[2017-03-23 17:34:30 UTC] ERROR: [alignak.daemon] The HTTP daemon port is not free...
[2017-03-23 17:34:30 UTC] ERROR: [alignak.daemon] The HTTP daemon port is not free: Error: Sorry, the port 0.0.0.0/7768 is not free
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/alignak/daemon.py", line 784, in setup_communication_daemon
    ssl_cert, server_dh, self.daemon_thread_pool_size)
  File "/usr/lib/python2.7/dist-packages/alignak/http/daemon.py", line 122, in __init__
    raise PortNotFree(msg)
PortNotFree: Error: Sorry, the port 0.0.0.0/7768 is not free
[2017-03-23 17:34:30 UTC] CRITICAL: [alignak.daemon] I got an unrecoverable error. I have to exit.
[2017-03-23 17:34:30 UTC] CRITICAL: [alignak.daemon] You can get help at https://github.com/Alignak-monitoring/alignak
[2017-03-23 17:34:30 UTC] CRITICAL: [alignak.daemon] If you think this is a bug, create a new issue including as much details as possible (version, configuration, ..
[2017-03-23 17:34:30 UTC] CRITICAL: [alignak.daemon] -----
[2017-03-23 17:34:30 UTC] CRITICAL: [alignak.daemon] Back trace of the error: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/alignak/daemons/schedulerdaemon.py", line 391, in main
    self.uri = self.http_daemon.uri
AttributeError: 'NoneType' object has no attribute 'uri'

This problem happens once the scheduler got started and received a configuration. All the previous start/stop of the daemon do not raise any problem.

Note that the broker has the same behaviour 😉

And I think that this may be related with Alignak-monitoring/alignak#673

@fpeyre fpeyre changed the title Unable to restart scheduler and arbiter on ubuntu 16.04 Unable to restart scheduler and broker on ubuntu 16.04 Mar 23, 2017
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