This appears different than “Raspberry pi camera not working” so I started a new thread.
Raspberry Pi 2, with official Pi camera (5 MP version)
Flashforge Creator Pro
Browser is on a Mac Pro running Sierra
I’ve been running OctoPi, but thought I’d try Astrobox again now that dual extruder is supported. I couldn’t get video to work even though both Astrobox and browser are on my local network. I just get the WebRTC startup error and the crying monkey. Still images work.
As a side note, when WebRTC fails, janus becomes a zombie. Parent process (/AstroBox/run) apparently isn’t doing a “wait” to reap the dead PID.
Long story short, the problem was the firewall, even though this is all on the local network. The only thing I could find on firewall requirements is this:
from 25 days ago. “We simply use port 443 (SSL) same as any https connection”. This appears to be inaccurate. My firewall logs say that Astrobox is trying to connect to “turn.astroprint.com” on UDP port 443, application protocol STUN.
I opened UDP (not TCP) port 443 on my firewall to turn.astroprint.com, allowing application protocol STUN, and now video works perfectly on Safari, Firefox, and Chrome. Video is much better than with OctoPi, especially on my phone.
However, my browser is also trying to connect UDP port 80 to the same IP, as well as tons of high-port UDP being attempted to my public IP. But leaving those blocked doesn’t seem to cause a problem.
I say “mostly solved” because of the extra UDP connections, and the fact that the zombie janus process remains a random problem. When that happens, I have to log in and do a “sudo service astrobox restart” to clear the defunct process or WebRTC won’t start.
root 1109 892 0 02:06 ? 00:00:00 [janus] <defunct>
STUN is a tunneling protocol. Why is a STUN connection required to be opened to do streaming video between my browser and Astrobox on the same local network? Why is the browser trying to do high-port UDP to my public IP when it is streaming locally?