- Promtail started sending logs before Loki was ready. This can happen in test environments where promtail already read all logs and sent them off. You have two options:
- Start promtail later, e.g., 60 seconds
- Make sure new log messages are written after both promtail and Loki have started
- Promtail started sending logs before Loki was ready. This can happen in test environments where promtail already read all logs and sent them off. Here is what you can do:
- Generally start promtail after Loki, e.g., 60 seconds later.
- Restarting promtail will not necessarily resend log messages that have been read. To force sending all messages again, delete the positions file (default location `/tmp/positions.yaml`) or make sure new log messages are written after both promtail and Loki have started.
## Failed to create target, "ioutil.ReadDir: readdirent: not a directory"