jneilliii / OctoPrint-YouTubeLive

43 stars 10 forks source link

No stream / no errors #28

Closed zmerlynn closed 6 years ago

zmerlynn commented 6 years ago

Hey! I love the idea of this plugin, and have been trying to get it to work. I'm trying to find any relevant logs now, because I'm stuck after looking around the issues and readmes.

I followed the Docker instructions, and the test container streams and works fine. I could just throw that in an init script and call it done, to be honest.

However, from the OctoPrint plugin side, this is what's happening:

2018-06-17 09:44:20,504 - octoprint.plugins.youtubelive - INFO - OctoPrint-YouTubeLive loaded! Checking stream status.
2018-06-17 09:44:20,736 - octoprint.plugins.youtubelive - INFO - YouTubeLive is streaming

At any point in this process, if I do a docker ps -a, I see no containers that have exited. I was guessing the container exited quickly with an error but don't see any evidence that it was ever started.

As I said, I can run the container manually per instructions, have verified that I can run simple HelloWorld, etc.

OctoPi on a Pi3, standard distribution, no modifications to the octoprint/youtubelive Dockerfile, etc.

Is there somewhere else to look for logs of what's going on? Thanks!

zmerlynn commented 6 years ago

Relevant daemon.log section. ~09:44 is when I rebooted, ~10:09 is when I hit "Stop" on the plugin.

$ grep dockerd /var/log/daemon.log
Jun 17 09:43:55 octopi dockerd[588]: time="2018-06-17T09:43:55.416529885-07:00" level=info msg="Processing signal 'terminated'"
Jun 17 09:44:13 octopi dockerd[561]: time="2018-06-17T09:44:13.027100827-07:00" level=warning msg="Error while setting daemon root propagation, this is not generally critical but may cause some functionality to not work or fallback to less desirable behavior" dir=/var/lib/docker error="error getting daemon root's parent mount: Could not find source mount of /var/lib/docker"
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14.288166399-07:00" level=info msg="libcontainerd: started new docker-containerd process" pid=611
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="starting containerd" module=containerd revision=773c489c9c1b21a6d78b5c538cd395416ec50f88 version=v1.0.3
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.content.v1.content"..." module=containerd type=io.containerd.content.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." module=containerd type=io.containerd.snapshotter.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.btrfs" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module=containerd
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." module=containerd type=io.containerd.snapshotter.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." module=containerd type=io.containerd.metadata.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=warning msg="could not use snapshotter btrfs in metadata plugin" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module="containerd/io.containerd.metadata.v1.bolt"
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.differ.v1.walking"..." module=containerd type=io.containerd.differ.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." module=containerd type=io.containerd.gc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.content"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.events"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.images"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." module=containerd type=io.containerd.monitor.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." module=containerd type=io.containerd.runtime.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.version"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." module=containerd type=io.containerd.grpc.v1
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg=serving... address="/var/run/docker/containerd/docker-containerd-debug.sock" module="containerd/debug"
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg=serving... address="/var/run/docker/containerd/docker-containerd.sock" module="containerd/grpc"
Jun 17 09:44:14 octopi dockerd[561]: time="2018-06-17T09:44:14-07:00" level=info msg="containerd successfully booted in 0.027864s" module=containerd
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.084403482-07:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.307066034-07:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.307956920-07:00" level=warning msg="Your kernel does not support cgroup memory limit"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.308138951-07:00" level=warning msg="Your kernel does not support cgroup cfs period"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.308194940-07:00" level=warning msg="Your kernel does not support cgroup cfs quotas"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.308246399-07:00" level=warning msg="Your kernel does not support cgroup rt period"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.308296815-07:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.308743743-07:00" level=warning msg="mountpoint for pids not found"
Jun 17 09:44:15 octopi dockerd[561]: time="2018-06-17T09:44:15.311063222-07:00" level=info msg="Loading containers: start."
Jun 17 09:44:17 octopi dockerd[561]: time="2018-06-17T09:44:17.723572440-07:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Jun 17 09:44:18 octopi dockerd[561]: time="2018-06-17T09:44:18.519437231-07:00" level=info msg="Loading containers: done."
Jun 17 09:44:18 octopi dockerd[561]: time="2018-06-17T09:44:18.960615824-07:00" level=info msg="Docker daemon" commit=f150324 graphdriver(s)=overlay2 version=18.05.0-ce
Jun 17 09:44:18 octopi dockerd[561]: time="2018-06-17T09:44:18.961798377-07:00" level=info msg="Daemon has completed initialization"
Jun 17 09:44:18 octopi dockerd[561]: time="2018-06-17T09:44:18.995061033-07:00" level=info msg="API listen on /var/run/docker.sock"
Jun 17 10:09:50 octopi dockerd[561]: time="2018-06-17T10:09:50-07:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/73430ff54a2cd0e139ac3a22b1de67c9a0f3d550f7cd51a39df1c0735dfd7c5f/shim.sock" debug=false module="containerd/tasks" pid=1000
Jun 17 10:09:51 octopi dockerd[561]: time="2018-06-17T10:09:51-07:00" level=warning msg="OOM monitoring failed" error="cgroups: memory cgroup not supported on this system"
Jun 17 10:09:52 octopi dockerd[561]: time="2018-06-17T10:09:52-07:00" level=info msg="shim reaped" id=73430ff54a2cd0e139ac3a22b1de67c9a0f3d550f7cd51a39df1c0735dfd7c5f module="containerd/tasks"
Jun 17 10:09:52 octopi dockerd[561]: time="2018-06-17T10:09:52.524027147-07:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"

May try to pop docker into a higher logging level to see if I can trace what the plugin is doing.

jneilliii commented 6 years ago

Did you set the url of your stream to include the IP address of your pi in webcam settings?

zmerlynn commented 6 years ago

That got it, sorry for the noise. I had changed the Snapshot URL and not the Stream URL.

You might treat this as an issue to surface it a little better. I'm sure you're tired of saying the same thing over and over again. :) I'm also not sure why it's not showing up in docker ps -a after exiting - presumably because the plugin deletes the container entirely.

Thanks for the plugin!

jneilliii commented 6 years ago

It is annoying people don't look through the closed issues prior to posting. This specific fix has been answered on several of them.

jneilliii commented 6 years ago

The container is created with the auto_remove option, so once the docker is stopped it automatically clears out.

zmerlynn commented 6 years ago

Nothing is surfaced in the plugin, nothing in the logs, and the container is removed so you can't see the container logs either (when you could just force a remove at the start of the named container if it's already running). I was literally about to add some logging in the plugin if you hadn't replied. I checked the settings page twice, but due to its placement in the OctoPrint UI it's an easy PEBCAK. And you're talking to someone that can navigate this, except an easy user error.

So maybe before you get annoyed answering the same question consider that some portion of the people that asked have actually tried to self-service but failed. It might save you time to make this easier to determine.