Confusing Output of "journalctl --setup-keys --force"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Folks,

first, thanks for answering my last question - especially to Lennard. It was a great help to me.

Now, I have still a problem with processing the command "journalctl --setup-keys --force", because of its confusing output. Finally, I would like to have a confirmation that all has been done correctly.

Attached you will find a screenshot of two executed commands. The first one is the journal command directly executed, while the second is a C++ program written by me, which calls the journal command via fork and exec and redirects its output of stdout and stderr via pipes to this program, which are only output with a corresponding identifier. In advance, I've actually expected that both programs produce similar output, but this was suprisingly not the case. Beside this, the command announces an error message, which suggests that something has gone bad. However, both programs return 0 at their end, which indicates success.

But let's go into depth...
 
When executing the command directly the following output is generated:
 
developer@debianVM ~ % sudo journalctl --setup-keys --force
Generating seed...
Generating key pair...
Generating sealing key...
Failed to set file attributes: Operation not supported
The new key pair has been generated. The secret sealing key has been written to
the following local file. This key file is automatically updated when the
sealing key is advanced. It should not be used on multiple hosts.
    /var/log/journal/c1223bdbe6484166aa9af858c392a7e0/fss
Please write down the following secret verification key. It should be stored
at a safe location and should not be saved locally on disk.
    80f1af-760e3b-bca6f8-b265cb/1b5da7-35a4e900
The sealing key is automatically changed every 15min.
The keys have been generated for host debianVM/c1223bdbe6484166aa9af858c392a7e0.
 
When executing my program I'll see only the following output:
 
developer@debianVM ~ % sudo /home/developer/scb/LoggerDaemon_1st/scb/scb/logger_daemon/build/cmake.debug.linux.x86_64/logger_daemon 
err:
Generating seed...
Generating key pair...
err:
Generating sealing key...
err:
Failed to set file attributes: Operation not supported
std:
72aa1f-825856-6d408b-4308bb/1b5da7-35a4e900

 
This means that 4 lines where posted by stderr (err:)  and 1 line by stdout (std:).
 
Now my questions:
  • What's about the rest of lines? Where do they come from, when executing it directly? Why are those lines not output, when executing the journal command by my program? (I know, you don't know my program, so you can assume that it is just goes badly, but actually it has worked in combination with other commands pretty well so far...)
  • The first 4 lines are output via stderr, even though only the last one seems to be a real error message. What's the intension to post the first 3 line via stderr? Even though the error message is posted, everything seems fine, since the return value at the end is 0. So, what's going on here? Was the program really executed correctly?
 
That's all for now...
 
Enjoy your day,
Andreas
 
-- 

Dr. Andreas Krüger
Claudiusstr. 6
10557 Berlin
Mobil:         +49 - 170 - 90 55 075
EMail:         DrAndreasKrueger@xxxxxx

Attachment: Screenshot_2021-02-23_19-03-01.png
Description: PNG image

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux