-
Notifications
You must be signed in to change notification settings - Fork 584
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 #13237] Icinga2 won't run in background, only foreground #4794
Comments
Updated by mfriedrich on 2016-11-18 09:23:29 +00:00
You're probably hitting the same bug as many others with a crash in your http server connection for the API. Are you using the API for anything (Dashing, Event Streams, etc.) at this point? |
Updated by mfriedrich on 2016-11-18 09:23:57 +00:00
|
Updated by andyb2000 on 2016-11-18 09:27:21 +00:00 Hi, If I stop all API request and try to run in background would that be a suitable test? |
Updated by andyb2000 on 2016-11-18 09:32:22 +00:00 Just an update, I shutdown all remote API connections (shutdown apache2, etc) so nothing was connecting to the API, and the same issue persists so I suspect this may not be related. |
Updated by mfriedrich on 2016-11-18 10:05:52 +00:00 A full crash log would be interesting, including the stack trace. |
Updated by andyb2000 on 2016-11-18 10:58:44 +00:00 thanks for looking, I'm trying to find a way to replicate and produce a crash/stack trace. I'm starting to suspect systemd is the issue not Icinga2 itself, but if I could get a few pointers? /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 daemon All work without any problems (but stay foregrounded to my console) and don't crash. Which also runs, which leads me to believe it's the systemd /etc/init.d/icinga2 that's causing the issue here in daemonising the package. Is there a way I can run icinga2 in background under gdb? I can't run it and attach gdb as the process never lives long enough to start. If I call it from systemctl:
but no process running The best I could do was set debug on systemctl: /var/log/icinga2# SYSTEMD_LOG_LEVEL=debug /bin/systemctl start icinga2 Could it somehow be trying to call an X11 interface for some reason? (This is a headless machine without X installed) |
Updated by mfriedrich on 2016-12-07 21:22:10 +00:00 Icinga 2 doesn't need X11, that's a dead end. Could you test the snapshot packages, they include fixes for the initial stream crash problem. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13237
Created by andyb2000 on 2016-11-18 08:53:06 +00:00
Assignee: andyb2000
Status: Feedback
Target Version: (none)
Last Update: 2016-12-07 21:22:10 +00:00 (in Redmine)
Icinga2 running for weeks without issues (in background, using init script /etc/init.d/icinga2 start), this morning process won't start, but it will run in foreground.
No configuration changes were made between the normal running and failure.
When trying to start with the init script (/etc/init.d/icinga2 start), no startup.log written, no log files written, no crash files written. Just no process running.
If I then run with /etc/init.d/icinga2 foreground it starts and works without issue.
I suspect the start of the crash was logged in the icinga2.err:
icinga2: /usr/include/boost/smart_ptr/intrusive_ptr.hpp:174: T* boost::intrusive_ptr::operator->() const [with T = icinga::Stream]: Assertion `px != 0' failed.
Caught SIGABRT.
Current time: 2016-11-17 21:35:52 +0000
icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.5.4-1)
Copyright © 2012-2016 Icinga Development Team (https://www.icinga.org/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Application information:
Installation root: /usr
Sysconf directory: /etc
Run directory: /run
Local state directory: /var
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
System information:
Platform: Ubuntu
Platform version: 16.04.1 LTS (Xenial Xerus)
Kernel: Linux
Kernel version: 3.16.0-77-generic
Architecture: x86_64
Build information:
Compiler: GNU 5.4.0
Build host: lgw01-29
Disabled features: compatlog debuglog gelf graphite icingastatus influxdb opentsdb perfdata syslog
Enabled features: api checker command ido-mysql livestatus mainlog notification statusdata
information/cli: Icinga application loader (version: r2.5.4-1)
information/cli: Loading configuration file(s).
information/ConfigItem: Committing config item(s).
information/ApiListener: My API identity: myhost
information/ConfigItem: Instantiated 2 ApiUsers.
information/ConfigItem: Instantiated 1 ApiListener.
information/ConfigItem: Instantiated 2 Zones.
information/ConfigItem: Instantiated 1 FileLogger.
information/ConfigItem: Instantiated 2 Endpoints.
information/ConfigItem: Instantiated 16 NotificationCommands.
information/ConfigItem: Instantiated 21988 Notifications.
information/ConfigItem: Instantiated 222 CheckCommands.
information/ConfigItem: Instantiated 10 Downtimes.
information/ConfigItem: Instantiated 840 Hosts.
information/ConfigItem: Instantiated 1 IcingaApplication.
information/ConfigItem: Instantiated 345 HostGroups.
information/ConfigItem: Instantiated 183 Comments.
information/ConfigItem: Instantiated 26 UserGroups.
information/ConfigItem: Instantiated 27 Users.
information/ConfigItem: Instantiated 10155 Services.
information/ConfigItem: Instantiated 3 TimePeriods.
information/ConfigItem: Instantiated 1 ServiceGroup.
information/ConfigItem: Instantiated 1 NotificationComponent.
information/ConfigItem: Instantiated 1 LivestatusListener.
information/ConfigItem: Instantiated 1 CheckerComponent.
information/ConfigItem: Instantiated 1 IdoMysqlConnection.
information/ConfigItem: Instantiated 1 ExternalCommandListener.
information/ConfigItem: Instantiated 1 StatusDataWriter.
information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
information/cli: Finished validating the configuration file(s).
Please advise what else I can test/carry out to further diagnose.
I carried out the #development instructions got gdb, etc, etc, however running under gdb it works fine (again I suspect because it's running in foreground).
Relations:
The text was updated successfully, but these errors were encountered: