Skip to content
This repository was archived by the owner on Sep 27, 2022. It is now read-only.

Debian 9: /var/lib/apt/periodic/update-success-stamp not found #1

Closed
clecherbauer opened this issue Jan 19, 2020 · 5 comments
Closed

Comments

@clecherbauer
Copy link

I tried to run apt_exporter on Debian 9 and got this exception:

Jan 19 21:05:45 apt_exporter[15566]: time="2020-01-19T21:05:45+01:00" level=fatal msg="no such file or directory" source="apt_exporter.go:359"

I think this is the cause:

if err := e.watcher.Add("/var/lib/apt/periodic/update-success-stamp"); err != nil {

Directly after a new installation of Debian the /var/lib/apt/periodic directory is empty.
Maybe these files are firstly written after the execution of the APT Periodic cron. Furthermore the file /var/lib/apt/periodic/update-success-stamp is named /var/lib/apt/periodic/udate-stamp.

For which distribution did you develop this exporter?

@pmaene
Copy link
Owner

pmaene commented Jan 19, 2020

Hi! Thanks for checking this out, that's nice to see! I've built this exporter for Ubuntu and never tried it on Debian (let alone a fresh installation), so I'm not surprised to see it failing.

Given that it gets this far, I assume this means /var/log/apt/history.log does exist on Debian? Do you know if it creates /var/lib/apt/periodic/update-success-stamp at some point, or if it has a similar file. I added these watchers with out-of-band updating to avoid having the apt calls during the HTTP endpoint, as they are rather slow.

pmaene added a commit that referenced this issue Jan 20, 2020
The update-success-stamp file itself may not have been created yet.
@pmaene pmaene closed this as completed in 2f47780 Jan 20, 2020
@pmaene
Copy link
Owner

pmaene commented Jan 20, 2020

@lebokus Would you mind trying again with the version I just pushed (v0.3.0). I believe both issues should have been addressed (the file not existing, and the different name of the stamp file on Debian).

@clecherbauer
Copy link
Author

Sorry for not responding - I will test it tonight.

Thank you very much!

@clecherbauer
Copy link
Author

@pmaene Yeah this fixed it. Thanks for your effort :)

@pmaene
Copy link
Owner

pmaene commented Jan 22, 2020

Great, happy to hear that! Thank you for checking!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants