<div dir="ltr"><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px">I wants to listen to remote journal logs ( logs which we receive from another machine, using systemd-journal-remote) and take some action accordingly. For that I wrote a small application which opens remote journal directory (sd_journal_open_directory (j,"/var/log/journal/remote/",0) and parse through all the logs using sd_journal_next() and whenever sd_journal_next returns 0 (no new logs), I wait on sd_journal_wait().</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px">I ran this process as root, sd_journal_wait() wakes up whenever journal remote receives new logs but sd_journal_next always returns 0. But journalctl works, it could able to read.</p><p style="box-sizing:border-box;margin-top:0px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px;margin-bottom:0px">If I stop systemd-journal-remote and restart my application, My application works properly, it reads all the logs properly.</p><p style="box-sizing:border-box;margin-top:0px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px;margin-bottom:0px"><br></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px;margin-bottom:0px"><br></p></div>