0
> journalctl
-b: -c: line 0: unexpected EOF while looking for matching `"'
-b: -c: line 1: syntax error: unexpected end of file
> systemctl status docker.service
-b: -c: line 0: unexpected EOF while looking for matching `"'
-b: -c: line 1: syntax error: unexpected end of file

https://clbin.com/0CNIZ <- Link to strace of journalctl

I'll update the question if there is need for other information.

I've restarted the pc. Deleted the logs and it still fails. Not sure what to try next.

plitter
  • 101
  • Are you absolutely sure you've removed all the data from /var/log/journal ? – Artem S. Tashkinov Aug 19 '20 at 13:43
  • I did journalctl --rotate and then journalctl --vacuum-time=1s. According to https://unix.stackexchange.com/a/457902/54544 – plitter Aug 19 '20 at 13:51
  • Please simply run this command and reboot: sudo /bin/rm /var/log/journal/*/* if logs are not important for you. – Artem S. Tashkinov Aug 19 '20 at 14:10
  • @ArtemS.Tashkinov I did what you suggested and realized there is a difference when I do the command with sudo and without sudo. http://ix.io/2uDk – plitter Aug 19 '20 at 15:02
  • 1
    Looks like your user systemctl is not system-wide systemctl. What's the output of which systemctl? – Artem S. Tashkinov Aug 19 '20 at 15:04
  • /usr/bin/systemctl and with sudo /usr/bin/systemctl – plitter Aug 19 '20 at 15:07
  • There's some corruption in your system but I'm not sure what it is exactly. – Artem S. Tashkinov Aug 19 '20 at 15:09
  • Is there some user configurations for journalctl. Or any next step to check? I assume that I will hit this issue again and deleting the /var/log/journal// isn't something I necessarily want to do... I did add a git fetch that runs every 15 mins or so, but it isn't running. Strictly speaking I don't know that, but pretty sure I didn't enable it. – plitter Aug 19 '20 at 15:26
  • As a quick test I'd create a new user account and verify jounralctl works under it. – Artem S. Tashkinov Aug 19 '20 at 15:27
  • Done, and the new user gets to do journalctl. – plitter Aug 19 '20 at 15:37
  • 1
    Great, you have something in your $HOME which breaks journalctl. I've no idea what it could be but presumably something which your shell executes automatically, e.g. .bashrc or .bash_profile or something like that It's up to you to untangle the mess :-) – Artem S. Tashkinov Aug 19 '20 at 15:43
  • I found my issue, it is the PAGER variable that I've set. My smallest reproducible case is export PAGER="/usr/bin/bash -c 'vim -R -'". – plitter Aug 20 '20 at 07:31

1 Answers1

0

Thanks to @Artem I've found that my issue is that I set my PAGER variable to be export PAGER="/usr/bin/bash -c \"col -b -x | vim -R -c 'set ft=man nolist laststatus=0' -c 'map q :q<cr>' - \"". The smallest reproducible case is export PAGER="/usr/bin/bash -c 'vim -R -'".

The solution that I went with is putting this in a script (that I called pager.

#!/usr/bin/env bash

col -b -x | vim -R -c 'set ft=man nolist laststatus=0' -c 'map q :q<cr>' -

And did export PAGER=pager.

The issue might be that systemd doesn't interpret PAGER properly.

plitter
  • 101