Hello,
I think journalctl is not working at the get go after I create a droplet and have accessed it through the console. Let me describe my experience:
Right after I have created a droplet, I call journalctl but get “No journal files were found.”
I’ve pasted the console output below
2023-06-18T03:56:23-root@ubuntu:~# journalctl -n 10
No journal files were found.
-- No entries --
2023-06-18T03:56:50-root@ubuntu:~# journalctl -k
No journal files were found.
-- No entries --
2023-06-18T03:56:56-root@ubuntu:~# journalctl -b
No journal files were found.
-- No entries --
So I check the status of the service:
2023-06-18T03:56:59-root@ubuntu:~# systemctl status journalctl
Unit journalctl.service could not be found.
2023-06-18T03:57:13-root@ubuntu:~# systemctl status systemd-journald.service
● systemd-journald.service - Journal Service
Loaded: loaded (/lib/systemd/system/systemd-journald.service; static)
Active: active (running) since Sun 2023-06-18 03:55:13 UTC; 2min 11s ago
TriggeredBy: ● systemd-journald.socket
● systemd-journald-audit.socket
● systemd-journald-dev-log.socket
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
Main PID: 374 (systemd-journal)
Status: "Processing requests..."
Tasks: 1 (limit: 9492)
Memory: 3.9M
CPU: 182ms
CGroup: /system.slice/systemd-journald.service
└─374 /lib/systemd/systemd-journald
I restart the service:
2023-06-18T03:57:47-root@ubuntu:~# systemctl restart systemd-journald.service
2023-06-18T03:58:12-root@ubuntu:~# systemctl status systemd-journald.service
● systemd-journald.service - Journal Service
Loaded: loaded (/lib/systemd/system/systemd-journald.service; static)
Active: active (running) since Sun 2023-06-18 03:58:02 UTC; 21s ago
TriggeredBy: ● systemd-journald.socket
● systemd-journald-audit.socket
● systemd-journald-dev-log.socket
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
Main PID: 7967 (systemd-journal)
Status: "Processing requests..."
Tasks: 1 (limit: 9492)
Memory: 4.9M
CPU: 16ms
CGroup: /system.slice/systemd-journald.service
└─7967 /lib/systemd/systemd-journald
Jun 18 03:58:02 ubuntu systemd-journald[7967]: Journal started
Jun 18 03:58:02 ubuntu systemd-journald[7967]: System Journal (/var/log/journal/09dac98d7851cdf1a9dadf62648e805e) is 8.0M, max 4.0G, 3.9G free.
Notice: journal has been rotated since unit was started, output may be incomplete.
2023-06-18T03:58:23-root@ubuntu:~# systemctl status journalctl
Unit journalctl.service could not be found.
I call journalctl again, and this time it works as expected
2023-06-18T03:58:47-root@ubuntu:~# journalctl -n 10
Jun 18 03:58:02 ubuntu systemd[1]: Stopping Journal Service...
Jun 18 03:58:02 ubuntu systemd-journald[374]: Received SIGTERM from PID 1 (systemd).
Jun 18 03:58:02 ubuntu systemd[1]: systemd-journald.service: Deactivated successfully.
Jun 18 03:58:02 ubuntu systemd[1]: Stopped Journal Service.
Jun 18 03:58:02 ubuntu systemd[1]: Starting Journal Service...
Jun 18 03:58:02 ubuntu systemd-journald[7967]: Journal started
Jun 18 03:58:02 ubuntu systemd-journald[7967]: System Journal (/var/log/journal/09dac98d7851cdf1a9dadf62648e805e) is 8.0M, max 4.0G, 3.9G free.
Jun 18 03:58:02 ubuntu systemd[1]: Started Journal Service.
Why is this happening?
Thanx
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Heya @cybertrapped,
Is sounds to me like there was nothing to be written in the journal rather than anything else.
This could be tested by creating a Droplet and starting, or stopping another service that is not the journal to see if anything will be written there.