Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionBranislav Blaškovič
2015-09-30 11:57:02 UTC
systemd-journal-remote has some issues.
Man page has an example:
...
Copy local journal events to a different journal directory:
journalctl -o export | systemd-journal-remote -o /tmp/dir -
...
This does not work. First of all, binary systemd-journal-remote is not in default $PATH, but in /usr/lib/systemd/systemd-journal-remote.
The second issue is that this example does not work:
# journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir -
For SplitMode=none, output must be a file.
So I have to change it:
# journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir/log.journal -
Finishing after writing 1802 entries
Also if you don't read man page correctly and use file without .journal suffix, it returns really weird and missleading error:
# journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir/log -
Failed to open output journal /tmp/dir/log: Invalid argument
Failed to get writer for source stdin: Invalid argument
Failed to create source for fd:0 (stdin): Invalid argument
It would be nice to have working examples in man page and also some more readable error messages.
Version-Release number of selected component (if applicable):
systemd-journal-gateway-219-17.el7.x86_64
Comment 2Branislav Blaškovič
2015-10-01 13:45:50 UTC
Another issue.
I started gatewayd server and I can gather logs via curl.
But if I do it via systemd-journal-remote --url http://localhost:19531/ I just got:
Spawning curl http://localhost:19531/entries?boot/entries...
Failed to open output journal /var/log/journal/remote/remote-localhost:19531\x2fentries?boot.journal: No such file or directory
Failed to get writer for source localhost:19531/entries?boot: No such file or directory
Failed to create source for fd:7 (localhost:19531/entries?boot): No such file or directory
/var/log/journal is created.
I have to create /var/log/journal/remote to get it working which I don't understand. Man page says:
Retrieve events from a remote systemd-journal-gatewayd(8) instance and store them in /var/log/journal/some.host/remote-some~host.journal:
systemd-journal-remote --url http://some.host:19531/
So I suggest to change "some.host" to "remote". Maybe it would be cool if that tool creates the directory /var/log/journal/remote itself instead of that terrifying red error messages.
(In reply to Branislav Blaškovič from comment #0)
> Also if you don't read man page correctly and use file without .journal
> suffix, it returns really weird and missleading error:
> # journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o
> /tmp/dir/log -
> Failed to open output journal /tmp/dir/log: Invalid argument
> Failed to get writer for source stdin: Invalid argument
> Failed to create source for fd:0 (stdin): Invalid argument
That's worth fixing, IMHO.
Upstream commit: https://github.com/systemd/systemd/commit/6b1b9f75c85d26ddbda62e7b7afa6944044f4f95
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2019:2091
systemd-journal-remote has some issues. Man page has an example: ... Copy local journal events to a different journal directory: journalctl -o export | systemd-journal-remote -o /tmp/dir - ... This does not work. First of all, binary systemd-journal-remote is not in default $PATH, but in /usr/lib/systemd/systemd-journal-remote. The second issue is that this example does not work: # journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir - For SplitMode=none, output must be a file. So I have to change it: # journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir/log.journal - Finishing after writing 1802 entries Also if you don't read man page correctly and use file without .journal suffix, it returns really weird and missleading error: # journalctl -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir/log - Failed to open output journal /tmp/dir/log: Invalid argument Failed to get writer for source stdin: Invalid argument Failed to create source for fd:0 (stdin): Invalid argument It would be nice to have working examples in man page and also some more readable error messages. Version-Release number of selected component (if applicable): systemd-journal-gateway-219-17.el7.x86_64