benbusby / piro

A Raspberry Pi security camera rover
MIT License
100 stars 17 forks source link

Janus problem. #7

Closed pikkaroni closed 5 years ago

pikkaroni commented 5 years ago

I have an issue running the raztot app after succesful install. I get stuck here, and Janus reports errors, I hope someone can spot my mistake, i'm quite new to linux:

pi@raspberrypi:/ $ cd ~/raztot pi@raspberrypi:~/raztot $ python3 -m venv ./venv pi@raspberrypi:~/raztot $ source ./venv/bin/activate (venv) pi@raspberrypi:~/raztot $ source run.sh local Starting pigpiod... Using api key: 58lRMY3r0FMAoZxPv8ADVZj6Bo3sJAka Janus commit: 5665a5be27222ff4957819f9d8b360b67afb12ab Compiled on: Thu Jun 6 23:18:46 CEST 2019


Starting Meetecho Janus (WebRTC Server) v0.7.2

Checking command line arguments... Debug/log level is 4 Debug/log timestamps are disabled Debug/log colors are enabled Adding 'vmnet' to the ICE ignore list... Using 192.168.0.109 as local IP... [WARN] Token based authentication disabled Initializing recorder code Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled) TURN REST API backend: (disabled) [WARN] Janus is deployed on a private address (192.168.0.109) but you didn't specify any STUN server! Expect trouble if this is supposed to work over the internet and not just in a LAN... Crypto: OpenSSL >= 1.1.0 [WARN] No cert/key specified, autogenerating some... Fingerprint of our certificate: EF:DB:25:19:31:F9:22:EA:3C:9E:C4:06:E8:BD:AD:61:C5:5D:70:CD:3B:65:0F:55:5C:9A:83:C4:C4:7F:0B:E0 [WARN] Data Channels support not compiled Joining Janus requests handler thread [WARN] Event handlers support disabled Plugins folder: /opt/janus/lib/janus/plugins Sessions watchdog started Loading plugin 'libjanus_nosip.so'... JANUS NoSIP plugin initialized! Loading plugin 'libjanus_videocall.so'... JANUS VideoCall plugin initialized! Loading plugin 'libjanus_textroom.so'... JANUS TextRoom plugin initialized! Loading plugin 'libjanus_voicemail.so'... JANUS VoiceMail plugin initialized! Loading plugin 'libjanus_streaming.so'... JANUS Streaming plugin initialized! Loading plugin 'libjanus_echotest.so'... JANUS EchoTest plugin initialized! Loading plugin 'libjanus_sip.so'... JANUS SIP plugin initialized! Loading plugin 'libjanus_audiobridge.so'... JANUS AudioBridge plugin initialized! Loading plugin 'libjanus_videoroom.so'... JANUS VideoRoom plugin initialized! Loading plugin 'libjanus_recordplay.so'... JANUS Record&Play plugin initialized! Transport plugins folder: /opt/janus/lib/janus/transports Loading transport plugin 'libjanus_http.so'... HTTP webserver started (port 8088, /janus path listener)... [WARN] HTTPS webserver disabled [WARN] Admin/monitor HTTP webserver disabled [WARN] Admin/monitor HTTPS webserver disabled JANUS REST (HTTP/HTTPS) transport plugin initialized! Loading transport plugin 'libjanus_pfunix.so'... [WARN] Unix Sockets server disabled (Janus API) [WARN] Unix Sockets server disabled (Admin API) [WARN] No Unix Sockets server started, giving up... [WARN] The 'janus.transport.pfunix' plugin could not be initialized Initializing... Running SocketIO app on 127.0.0.1...

I followed and sat up everything according to the guide, but it does not seem that i can open the Raztot webapp even though my Dataplicity server link is working fine. I have also tried to run the app locally, but with same result. Hopefully it's ok to ask this here, also new to github :)

benbusby commented 5 years ago

All of the warnings in the log you posted are actually normal for Janus -- none of them should have any impact on the raztot app itself. It looks like the app started successfully based on the Running SocketIO app on 127.0.0.1 message.

Can you clarify what you mean by the Dataplicity server link working? Do you see the login page for the raztot when you go to that link? Or does it show a 502 Gateway Error message? Alternatively, it could be showing a penguin page, which means that nginx isn't running.

Can you also paste the output of sudo systemctl status nginx.service?

pikkaroni commented 5 years ago

This is my Dataplicity page after i enter the Raspberry Pi remotely:

Untitled

So maybe it is nginx that isnt running then, but from the terminal it seems like it is active:

pi@raspberrypi:~ $ sudo systemctl status nginx.service ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en Active: active (running) since Fri 2019-06-07 08:21:25 CEST; 12min ago Docs: man:nginx(8) Process: 495 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code= Process: 426 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process o Main PID: 501 (nginx) CGroup: /system.slice/nginx.service ├─501 nginx: master process /usr/sbin/nginx -g daemon on; master_proc ├─502 nginx: worker process ├─503 nginx: worker process ├─504 nginx: worker process └─505 nginx: worker process

Jun 07 08:21:23 raspberrypi systemd[1]: Starting A high performance web server a Jun 07 08:21:25 raspberrypi systemd[1]: Started A high performance web server an lines 1-16/16 (END)

How do I proceed? it is a 3 b+ board, if that makes any difference.

Edit: I can log in to the Pi through Dataplicity just fine with su pi and then my password, and it seems the app is running just fine, am I missing how to open the app interface somehow? Or should it open automatically after cd ~/raztot source run.sh local ?

benbusby commented 5 years ago

Looks like nginx is working fine from the output you included.

If you open the url on the Dataplicity page in your screenshot (in the right side column, the one that is obscured), do you see any errors or results? That’s where the raztot web app should appear.

pikkaroni commented 5 years ago

I have now managed to start the stream, and I can move the wheels, but no camera feed. I can capture a video and play it though. Why is there no live feed?

This is the readout:

Creating new session: 7861964452338182; 0x6bd03730 Creating new handle in session 7861964452338182: 8022226437033781; 0x6bd03730 0x6bd03630 Starting stream... Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstRpiCamSrc:rpicamsrc0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)20/1, stream-format=(string)byte-stream, alignment=(string)nal, profile=(string)constrained-baseline /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)20/1, stream-format=(string)byte-stream, alignment=(string)nal, profile=(string)constrained-baseline /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)20/1, stream-format=(string)byte-stream, alignment=(string)nal, profile=(string)constrained-baseline /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)20/1, stream-format=(string)byte-stream, alignment=(string)nal, profile=(string)constrained-baseline /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)20/1, stream-format=(string)avc, alignment=(string)au, profile=(string)constrained-baseline, parsed=(boolean)true, level=(string)4, codec_data=(buffer)0142c028ffe1000f2742c02895a01e0089f9601e244d4001000528ce025c80 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)42c028, sprop-parameter-sets=(string)"J0LAKJWgHgCJ+WAeJE1A\,KM4CXIA\=", payload=(int)96, ssrc=(uint)29732882, timestamp-offset=(uint)2880884797, seqnum-offset=(uint)24475, a-framerate=(string)20 /GstPipeline:pipeline0/GstMultiUDPSink:multiudpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)42c028, sprop-parameter-sets=(string)"J0LAKJWgHgCJ+WAeJE1A\,KM4CXIA\=", payload=(int)96, ssrc=(uint)29732882, timestamp-offset=(uint)2880884797, seqnum-offset=(uint)24475, a-framerate=(string)20 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)20/1, stream-format=(string)avc, alignment=(string)au, profile=(string)constrained-baseline, parsed=(boolean)true, level=(string)4, codec_data=(buffer)0142c028ffe1000f2742c02895a01e0089f9601e244d4001000528ce025c80 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 2880884797 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 24475 Timeout expired for session 18596601849963... Detaching handle from JANUS Streaming plugin; 0x6bd01568 0x6bd01318 0x6bd01568 0x6bd01630 Destroying session 18596601849963; 0x6bd01428 [janus.plugin.streaming-0x6bd01318] No WebRTC media anymore [5757462045718309] Handle and related resources freed; 0x6bd01568 0x6bd01428

Hope you can help.

benbusby commented 5 years ago

Hmm, well nothing in the console output indicates any error with the live stream. Can you open the web dev tools (Ctrl+Shift+I on Chrome) and tell me if you see any errors under the “Console” tab after you hit Start Stream?

pikkaroni commented 5 years ago

I did get an error from Janus it seems. Im tempted to restore raspbian and do a fresh install.

Here is the google chrome console error:

Cleaning WebRTC stuff janus-gateway.js:238 ::: Got a cleanup notification ::: janus-gateway.js:61 Plugin attached! (janus.plugin.streaming, id=5278803727998824) janus-gateway.js:40 Selected video id #222 controller.js:101 Successfully started stream janus.js:3005 Cleaning WebRTC stuff janus-gateway.js:238

janus.js:530 Failed to parse response body: {message: "Failed to parse response body", error: ReferenceError: bootbox is not defined at onmessage (https://aplastic-gibbon-8404.dataplicity.i…, response: Response} error @ janus.js:530

Cannot share error log it seems, here is a screencap: image

pikkaroni commented 5 years ago

I am reinstalling Raspbian and now installing the app on a fresh system, I am suspecting some problems due to a motion server I had set up earlier. Will update and close if I dont encounter any more errors.

pikkaroni commented 5 years ago

A complete reinstall of raspbian and Raztot worked, I think maybe motion or noip-2 was interfering with the stream. Thank you for the support.