Sobes.tech
Middle

Started the service, journalctl logs do not show anything. What to do?

sobes.tech AI

Answer from AI

If the service is running but journalctl does not show its logs, you should check a few things:

  1. Make sure the service is actually writing logs to the systemd journal. It might be writing to a file or stdout, but systemd is not capturing the output.
  2. Verify that you are using the correct unit name in the command, for example:
    journalctl -u service_name.service
    
  3. Check the service status with systemctl status service_name.service — there may be errors or hints.
  4. If the service is started via ExecStart and the output is not redirected, add the following parameters to the unit file:
    StandardOutput=journal
    StandardError=journal
    
  5. Restart the service and systemd:
    systemctl daemon-reload
    systemctl restart service_name.service
    
  6. Check the access rights to the journal, the current user might not have access.

If after all checks the logs do not appear, the problem might be with the service itself — it does not write logs or crashes before logging begins.