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 #11801] Error: Function call 'rename' for file '/var/spool/icinga2/tmp/service-perfdata' failed with error code 2, 'No such file or directory' #4221

Closed
icinga-migration opened this issue May 18, 2016 · 12 comments

Comments

Projects
None yet
2 participants
@icinga-migration
Copy link
Member

commented May 18, 2016

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

Created by Dynatomic on 2016-05-18 05:16:26 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-05-18 12:35:03 +00:00)
Target Version: 2.4.9
Last Update: 2017-01-13 15:16:35 +00:00 (in Redmine)

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

systemctl status icinga2
icinga2.service - Icinga host/service/network monitoring system
Loaded: loaded (/usr/lib/systemd/system/icinga2.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-05-18 04:42:02 UTC; 3min 33s ago
Process: 9285 ExecStart=/usr/sbin/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG} (code=exited, status=1/FAILURE)
Process: 9224 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2 (code=exited, status=0/SUCCESS)
Main PID: 22141 (code=exited, status=0/SUCCESS)

May 18 04:42:02 icinga.ns-pos.com icinga2[9285]: Context:
May 18 04:42:02 icinga.ns-pos.com icinga2[9285]: (0) Activating object 'icinga-status' of type 'IcingaStatusWriter'
May 18 04:42:02 icinga.ns-pos.com icinga2[9285]: [2016-05-18 04:42:02 +0000] information/LivestatusListener: Created UNIX socket in '/run/icinga2/cmd/livestatus'.
May 18 04:42:02 icinga.ns-pos.com icinga2[9285]: [2016-05-18 04:42:02 +0000] critical/ConfigItem: Error: Function call 'rename' for file '/var/spool/icinga2/tmp/service-perfdata' failed with error code 2, 'No such file or directory'
May 18 04:42:02 icinga.ns-pos.com icinga2[9285]: [2016-05-18 04:42:02 +0000] critical/ConfigItem: 1 error
May 18 04:42:02 icinga.ns-pos.com icinga2[9285]: [2016-05-18 04:42:02 +0000] critical/cli: Error activating configuration.
May 18 04:42:02 icinga.ns-pos.com systemd[1]: icinga2.service: control process exited, code=exited status=1
May 18 04:42:02 icinga.ns-pos.com systemd[1]: Failed to start Icinga host/service/network monitoring system.
May 18 04:42:02 icinga.ns-pos.com systemd[1]: Unit icinga2.service entered failed state.
May 18 04:42:02 icinga.ns-pos.com systemd[1]: icinga2.service failed.

icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: v2.4.8)

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: CentOS Linux
Platform version: 7 (Core)
Kernel: Linux
Kernel version: 3.10.0-327.18.2.el7.x86_64
Architecture: x86_64

Changesets

2016-05-18 12:01:32 +00:00 by gbeutner bb69540

Fix exception in PerfdataWriter::RotateFile

fixes #11801

2016-05-19 07:50:55 +00:00 by gbeutner 0e76876

Fix exception in PerfdataWriter::RotateFile

fixes #11801

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 18, 2016

Updated by twidhalm on 2016-05-18 08:19:39 +00:00

I just had the same issue on SLES 11 SP 3. Creating the files /var/spool/icinga2/tmp/{host,service}-perfdata and chowning them to "icinga" got Icinga 2 starting again.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 18, 2016

Updated by Dynatomic on 2016-05-18 11:05:34 +00:00

Thanks, will give that a try

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 18, 2016

Updated by gbeutner on 2016-05-18 12:00:45 +00:00

  • Relates set to 9236
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 18, 2016

Updated by gbeutner on 2016-05-18 12:02:00 +00:00

  • Category changed from Packages to Perfdata
  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version set to 2.4.9
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 18, 2016

Updated by gbeutner on 2016-05-18 12:35:04 +00:00

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

Applied in changeset bb69540.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 20, 2016

Updated by mgochhait on 2016-05-20 21:41:49 +00:00

Able to replicate issue in version 2.4.10 .

icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.4.10-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: 14.04.2 LTS, Trusty Tahr
Kernel: Linux
Kernel version: 3.13.0-46-generic
Architecture: x86_64

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 24, 2016

Updated by spkane on 2016-05-24 22:55:08 +00:00

I see this problem on Icinga v2.4.10, where both directories are on the same mount point and owned by icinga.

# ls -lFaR /var/spool/icinga2/
/var/spool/icinga2/:
total 8
drwxr-x---.  4 icinga icinga   51 May 24 10:27 ./
drwxr-xr-x. 14 root   root   4096 May 18 19:30 ../
-rw-------.  1 icinga icinga  495 May 24 15:03 .bash_history
drwxrwx---.  2 icinga icinga   50 May 24 15:46 perfdata/
drwxr-x---.  2 icinga icinga   49 May 24 15:46 tmp/

/var/spool/icinga2/perfdata:
total 28
drwxrwx---. 2 icinga icinga    50 May 24 15:46 ./
drwxr-x---. 4 icinga icinga    51 May 24 10:27 ../
-rw-r--r--. 1 icinga icinga 26118 May 24 14:53 service-perfdata.1464126471-PID-44011

/var/spool/icinga2/tmp:
total 0
drwxr-x---. 2 icinga icinga 49 May 24 15:46 ./
drwxr-x---. 4 icinga icinga 51 May 24 10:27 ../
-rw-r--r--. 1 icinga icinga  0 May 24 15:46 host-perfdata
-rw-r--r--. 1 icinga icinga  0 May 24 15:46 service-perfdata

EDITED: I thought I had fixed it, but that was not the case...This is still ongoing.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 25, 2016

Updated by satock on 2016-05-25 13:06:23 +00:00

I have the same problem:

[2016-05-25 13:42:13 +0200] critical/ConfigItem: Error: Function call 'rename' for file '/var/spool/icinga2/tmp/service-perfdata' failed with error code 2, 'No such file or directory'

[2016-05-25 13:42:13 +0200] critical/ConfigItem: 1 error
[2016-05-25 13:42:13 +0200] critical/cli: Error activating configuration.

icinga2 - The Icinga 2 network monitoring daemon (version: r2.4.10-1)

Copyright (c) 2012-2016 Icinga Development Team (https://www.icinga.org/)
License GPLv2+: GNU GPL version 2 or later 
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: 14.04.4 LTS, Trusty Tahr
  Kernel: Linux
  Kernel version: 3.13.0-74-generic
  Architecture: x86_64
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 28, 2016

Updated by WilliamsJD on 2016-11-28 16:39:57 +00:00

Apparently this can still happen in 2.5.2 as well.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jan 13, 2017

Updated by Benedikt1992 on 2017-01-13 15:16:35 +00:00

With Version 2.5.4 it happens as well. Even with a brand new installation. I would suggest to reopen this issue

@frankiejol

This comment has been minimized.

Copy link

commented Sep 13, 2018

This happens to me too.
This is icinga 2.6.0-2 installed from Debian Stretch packages.
When I restart icinga2 it complains about the perfdata-files.

critical/ConfigItem: Error: Function call 'rename' for file '/var/spool/icinga2/tmp/host-perfdata' failed with error code 2, 'No such file or directory'
	(0) Activating object 'perfdata' of type 'PerfdataWriter'
 critical/ConfigItem: 1 error
critical/cli: Error activating configuration.

To successfully restart icinga2 I have to do:
rm /var/spool/icinga2/tmp/*-perfdata ; /etc/init.d/icinga2 restart

Please let me know if you need more information.

@ghost

This comment has been minimized.

Copy link

commented Dec 7, 2018

Just had the same issue on r2.10.2-1.

rm /var/spool/icinga2/tmp/*-perfdata ; /etc/init.d/icinga2 restart lets me get icinga2 started, but it does not fix the issue permanently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.