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

[dev.icinga.com #14013] icinga2 debian service does not exit after restart if no pseudo terminal is available #4924

Closed
icinga-migration opened this issue Jan 14, 2017 · 4 comments
Labels
area/setup Installation, systemd, sample files bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/14013

Created by bebehei on 2017-01-14 21:27:14 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2017-01-14 21:27:14 +00:00 (in Redmine)

Icinga Version: 2.6.0
Backport?: Not yet backported
Include in Changelog: 1

Hi,

the icinga2 service script does not exit, if there is no pseudo-terminal available.

Although icinga2 is restarted successfully, config-management-jobs like salt '*' service.restart icinga2 (or the ansible analogy) never return.

It does not work on Ubuntu 14.04. It works on Ubuntu 16.04 flawless.

[bebe:~] % ssh -t bernoulli service icinga2 restart
 * checking Icinga2 configuration                                                      [ OK ] 
 * Restarting icinga2 monitoring daemon icinga2                                               [2017-01-14 22:21:02 +0100] information/cli: Icinga application loader (version: r2.6.0-1)
[2017-01-14 22:21:02 +0100] information/cli: Loading configuration file(s).
[2017-01-14 22:21:02 +0100] information/ConfigItem: Committing config item(s).
[2017-01-14 22:21:02 +0100] information/ApiListener: My API identity: bernoulli
[2017-01-14 22:21:02 +0100] information/ConfigItem: Instantiated 1 ApiListener.
[2017-01-14 22:21:02 +0100] information/ConfigItem: Instantiated 2 Zones.
[2017-01-14 22:21:02 +0100] information/ConfigItem: Instantiated 1 FileLogger.
[2017-01-14 22:21:02 +0100] information/ConfigItem: Instantiated 2 Endpoints.
[2017-01-14 22:21:02 +0100] information/ConfigItem: Instantiated 201 CheckCommands.
[2017-01-14 22:21:02 +0100] information/ConfigItem: Instantiated 1 IcingaApplication.
[2017-01-14 22:21:02 +0100] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2017-01-14 22:21:02 +0100] information/ConfigObject: Restoring program state from file '/var/lib/icinga2/icinga2.state'
[2017-01-14 22:21:02 +0100] information/ConfigObject: Restored 208 objects. Loaded 0 new objects without state.
[2017-01-14 22:21:02 +0100] information/ConfigItem: Triggering Start signal for config items
[2017-01-14 22:21:02 +0100] information/ApiListener: Adding new listener on port '5665'
[2017-01-14 22:21:02 +0100] information/JsonRpcConnection: Reconnecting to API endpoint 'mon' via host 'mon' and port '5665'
[2017-01-14 22:21:02 +0100] information/ConfigItem: Activated all objects.
                                                                                       [ OK ]
Connection to bernoulli.itv.uni-stuttgart.de closed.
[bebe:~] % ssh bernoulli pidof icinga2
18058 18053
[bebe:~] % ssh bernoulli service icinga2 restart
 * checking Icinga2 configuration
   ...done.
 * Restarting icinga2 monitoring daemon icinga2
   ...done.
^CKilled by signal 2.
[bebe:~] 255 % ssh bernoulli pidof icinga2
18278 18273
[bebe:~] %
@icinga-migration icinga-migration added bug Something isn't working area/setup Installation, systemd, sample files labels Jan 17, 2017
@dnsmichi
Copy link
Contributor

Sounds familiar to what we've discussed with Stefan a few days ago. Upgrading clients with wheezy or Ubuntu 14.04 did not work out, while other distributions using Systemd worked like a charm. It either is related to the Debian specific init script, or, how we handle closing file descriptors on restart.

@bebehei
Copy link
Contributor

bebehei commented Mar 30, 2017

It either is related to the Debian specific init script, or, how we handle closing file descriptors on restart.

After experiencing this issue, I researched the initscripts. And IIRC, there had been no change in the debian init-script with an obvious relation to this.

@AlexanderS
Copy link

Yes, it has nothing to do with the init script. The file descriptors or not closed on startup/restart. See also #5038 for some analysis.

@dnsmichi
Copy link
Contributor

Ah, that was the missing issue link, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/setup Installation, systemd, sample files bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants