You are not logged in.

#1 2015-09-08 17:08:44

krafczyk
Member
Registered: 2015-09-08
Posts: 37

[SOLVED] journalctl --list-boots isn't working

Hey, I'm trying to get the boot list with `journalctl --list-boots`, but I keep getting the following message:

journalctl --list-boots
Failed to determine boots: No data available

Now, it seems to be able to detect the boots because journalctl -b -1 journalctl -b -2 etc.. seems to work.

Here is my /etc/systemd/journald.conf

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
Storage=persistent
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg

Any ideas why journalctl isn't listing the boots?

Last edited by krafczyk (2015-09-09 17:48:25)

Offline

#2 2015-09-08 17:41:14

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [SOLVED] journalctl --list-boots isn't working

Did you check if your journal is corrupted? Can you post the output of the following command?

$ journalctl --verify

About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-09-09 17:20:17

krafczyk
Member
Registered: 2015-09-08
Posts: 37

Re: [SOLVED] journalctl --list-boots isn't working

I didn't know that I could do that.

Here is the output, it seems that the journal is corrupted.

journalctl --verify
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f3522b3735d-84aeee5732ac16be.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f36e8338505-4f13b01605443d98.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system.journal                            
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f352e987c2e-e2108f57a2e5abf7.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f2ce94bbc1e-b3dad52ed7603e0a.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000@00051f37648cb0bd-8dc245956ce768f4.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f1e00c8576b-3539283d4cd38223.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f1641fba11b-3085e48cbff9524e.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f0e7b010059-6063503d2434fe67.journal~
94cfe8: Unused data (entry_offset==0)                                                             
94cfe8: Invalid hash (c1648cc15d94d323 vs. 4bc3ab3a54d92c30                                       
94cfe8: Envalid object contents: Bad message                                                      
File corruption detected at /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f36f520dcd4-4f9ab20d1ed361a2.journal~:94cfe8 (of 16777216 bytes, 58%).
FAIL: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f36f520dcd4-4f9ab20d1ed361a2.journal~ (Bad message)
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000@00051f1e0191337a-b893f54f2ce8b5b6.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000@00051f3557b12c85-eb67c722774e7d54.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f34f8a227a5-25a1b8c54a46bf90.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f34b3f4d0d6-90a535324a7fb52d.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f350c95f062-b5251d7338f050df.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f4be22c5e14-c33ff6b94638396c.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f3556221d45-49d311e58847020c.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f3762ae03d3-cd5ea53a54afb4b1.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f37683e5f50-bbc0e003c150e6a1.journal~
6f1fd8: Unused data (entry_offset==0)                                                             
6f1fd8: Invalid hash (7521d3fe9120f0b1 vs. 8d76c45ada9f24fb                                       
6f1fd8: Envalid object contents: Bad message                                                      
File corruption detected at /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f343a1a52ca-540d29398642c0f1.journal~:6f1fd8 (of 8388608 bytes, 86%).
FAIL: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f343a1a52ca-540d29398642c0f1.journal~ (Bad message)
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000.journal                         
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f2d9e77f552-f1444749b6cfc653.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f4ad1215896-de9b9030c0b74ebd.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000@00051f350dd9f768-f3b0c8d2974fd003.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000@00051f352fc62017-adae949f9f6af21d.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/user-1000@00051f35243db27c-af6d699402e073e9.journal~
PASS: /var/log/journal/44ac3abcebce4b8da88c3c673bd378ca/system@00051f1de5a78d09-cfc33309e334e3f7.journal~

Assuming there was some event which corrupted my journal, is there a proper way to remove the corrupted entries so that journalctl --list-boots can work properly?

Offline

#4 2015-09-09 17:34:08

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [SOLVED] journalctl --list-boots isn't working

krafczyk wrote:

is there a proper way to remove the corrupted entries so that journalctl --list-boots can work properly?

Firstly, stop the journal service

# systemctl stop systemd-journald

then delete the corrupted files manually and finally restart the journal service

# systemctl start systemd-journald

About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#5 2015-09-09 17:45:08

krafczyk
Member
Registered: 2015-09-08
Posts: 37

Re: [SOLVED] journalctl --list-boots isn't working

Excellent! That's worked.

Thanks very much.

Offline

Board footer

Powered by FluxBB