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 #12741] Parse error: "premature EOF" when running "icinga2 node update-config" #4674

Closed
icinga-migration opened this issue Sep 18, 2016 · 4 comments
Labels
area/cli Command line helpers bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by balu on 2016-09-18 07:57:46 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-09-19 04:37:48 +00:00)
Target Version: 2.6.0
Last Update: 2016-12-12 13:42:28 +00:00 (in Redmine)

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

Hi,

I have got a problem with my icinga2 installation and need an advise, how to fix it.

My icinga2 installation runs on a virtual machine (KVM/Qemu) on a single hypervisor based on CentOS 7. After running out of ram, my hypervisor freezed and I have done a hard reset. Now commands like 'icinga2 node update-config' failed with error "Error: parse error: premature EOF". Before this happens, everything works fine.

Here my crash report for further informations

Caught unhandled exception.
Current time: 2016-09-18 09:52:32 +0200

Application information:
  Application version: v2.4.7
  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: CentOS Linux
  Platform version: 7 (Core)
  Kernel: Linux
  Kernel version: 3.10.0-327.13.1.el7.x86_64
  Architecture: x86_64

Error: parse error: premature EOF

                     (right here) ------^


        (0) libbase.so: void boost::throw_exception >(boost::exception_detail::error_info_injector const&) (+0xf8) [0x7f2ee5a04d58]
        (1) libbase.so: void boost::exception_detail::throw_exception_(std::invalid_argument const&, char const*, char const*, int) (+0x69) [0x7f2ee5a04e19]
        (2) libbase.so: icinga::JsonDecode(icinga::String const&) (+0x3ce) [0x7f2ee59a7e3e]
        (3) libbase.so: icinga::Utility::LoadJsonFile(icinga::String const&) (+0x195) [0x7f2ee59c60f5]
        (4) libcli.so: icinga::NodeUtility::LoadNodeFile(icinga::String const&) (+0x37) [0x7f2ee537c497]
        (5) libcli.so: icinga::NodeUtility::CollectNodes(icinga::String const&, std::vector, std::allocator > >&) (+0x24) [0x7f2ee537c744]
        (6) libbase.so: icinga::Utility::Glob(icinga::String const&, boost::function const&, int) (+0x1fa) [0x7f2ee59cea0a]
        (7) libcli.so: icinga::NodeUtility::GetNodes() (+0xaf) [0x7f2ee53763df]
        (8) libcli.so: icinga::NodeUtility::PrintNodes(std::ostream&) (+0x37) [0x7f2ee53828d7]
        (9) libcli.so: icinga::NodeListCommand::Run(boost::program_options::variables_map const&, std::vector > const&) const (+0x175) [0x7f2ee5385515]
        (10) /usr/lib64/icinga2/sbin/icinga2() [0x411e5f]
        (11) /usr/lib64/icinga2/sbin/icinga2() [0x40f52a]
        (12) libc.so.6: __libc_start_main (+0xf5) [0x7f2ee2cc4b15]
        (13) /usr/lib64/icinga2/sbin/icinga2() [0x40f631]


***
* This would indicate a runtime problem or configuration error. If you believe this is a bug in Icinga 2
* please submit a bug report at https://dev.icinga.org/ and include this stack trace as well as any other
* information that might be useful in order to reproduce this problem.
***

It would be grateful for an advise.

Best regards and thank you very much,
Ludwig

Changesets

2016-09-19 04:34:37 +00:00 by gbeutner fa1fa23

Fix crash in NodeUtility::CollectNodes

fixes #12741
@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-09-19 04:36:05 +00:00

  • Category set to CLI
  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version set to 2.6.0

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-09-19 04:37:38 +00:00

As a temporary workaround you can remove the files in /var/lib/icinga2/api/repository. On an unrelated note, we're probably going to deprecate the whole "node update-config" mechanism at some point in the future.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-09-19 04:37:48 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset fa1fa23.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-12-12 13:42:28 +00:00

  • Subject changed from Parse error: premature EOF to Parse error: "premature EOF" when running "icinga2 node update-config"

@icinga-migration icinga-migration added bug Something isn't working area/cli Command line helpers labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.6.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Command line helpers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant