mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 14:45:54 -05:00
31801e20c3
and remove the old scripts, to reduce the supported ways of doing things.
2.2 KiB
2.2 KiB
Troubleshooting
Logs
While Moonfire NVR is running, logs will be written to stderr.
- When running the configuration UI, you typically should redirect stderr
to a text file to avoid poor interaction between the interactive stdout
output and the logging. If you use the recommended
nvr config 2>debug-log
command, output will be in thedebug-log
file. - When running detached through Docker, Docker saves the logs for you.
Try
nvr logs
ordocker logs moonfire-nvr
. - When running through systemd, stderr will be redirected to the journal.
Try
sudo journalctl --unit moonfire-nvr
to view the logs. You also likely want to setMOONFIRE_FORMAT=google-systemd
to format logs as expected by systemd.
Logging options are controlled by environmental variables:
MOONFIRE_LOG
controls the log level. Its format is similar to theRUST_LOG
variable used by the env-logger crate.MOONFIRE_LOG=info
is the default.MOONFIRE_LOG=info,moonfire_nvr=debug
gives more detailed logging of themoonfire_nvr
crate itself.MOONFIRE_FORMAT
selects the output format. The two options currently accepted aregoogle
(the default, like the Google glog package) andgoogle-systemd
(a variation for better systemd compatibility).
If you use Docker, set these via Docker's --env
argument.
Problems
Error: pts not monotonically increasing; got 26615520 then 26539470
If your streams cut out with an error message like this one, it might mean that your camera outputs B frames. If you believe this is the case, file a feature request; Moonfire NVR currently doesn't support B frames. You may be able to configure your camera to disable B frames in the meantime.
moonfire-nvr config
displays garbage
This happens if your machine is configured to a non-UTF-8 locale, due to
gyscos/Cursive#13. As a workaround, try setting the environment variable
LC_ALL=C.UTF-8
. This should automatically be set with the Docker container.