krull / docker-janus

Debian based docker image for https://github.com/meetecho/janus-gateway
GNU General Public License v3.0
59 stars 49 forks source link

Can't connect to the janus server in docker image #7

Closed qweasd1 closed 6 years ago

qweasd1 commented 6 years ago

Hi, I try to run this docker image on my mac. I follow the instruction in Readme.md and I got the server run inside the docker. I can see the information on "http://localhost:8088/janus/info" successfully

Then I serve the samples from janus repo. E.g., the echotest.html from a node server locally on port:3000

I update the connection information in echotest.js to change it to connect to "http://localhost:8088/janus" which points to the server in docker image.

Then I run the echotest.html page and it doesn't work. The log from frontend shows the following: Initializing library janus.js:314 Library initialized: true janus.js:341 Using REST API to contact Janus: http://127.0.0.1:8088/janus janus.js:706 Created session: 6371452023286584 janus.js:953 Created handle: 1239877826562899 echotest.js:113 Plugin attached! (janus.plugin.echotest, id=1239877826562899) janus.js:1328 Creating PeerConnection janus.js:1336 Preparing local SDP and gathering candidates (trickle=true) janus.js:1368 Adding local stream janus.js:1382 Creating data channel janus.js:1800 Creating offer (iceDone=false) janus.js:1839 Setting local description janus.js:1861 Offer ready janus.js:1778 Remote description accepted! echotest.js:168 ICE state changed to checking 2janus.js:1373 Handling Remote Track janus.js:1344 End of candidates. janus.js:2118 Starting bitrate timer (via getStats) echotest.js:174 Janus says our WebRTC PeerConnection is down now janus.js:2173 Cleaning WebRTC stuff janus.js:2218 Stopping local stream tracks janus.js:2222 MediaStreamTrack {kind: "audio", id: "71f97ae6-57cb-4dc1-998b-5665c3d718fb", label: "Built-in Microphone", enabled: true, muted: false, …} janus.js:2222 MediaStreamTrack {kind: "video", id: "f9a2051d-fda6-4178-aefb-7f661a351784", label: "FaceTime HD Camera", enabled: true, muted: false, …} echotest.js:361 ::: Got a cleanup notification ::: janus.js:1389 State change on data channel: null 10echotest.js:344 Uncaught TypeError: Cannot read property 'videoWidth' of undefined at echotest.js:344

Do you know why it happened so? Thanks

krull commented 6 years ago

Hi @qweasd1 it seems that it is echotest.js issue more than connection to the janus server, if you say that you could access the server's janus/info correctly.

Is there any output from docker logs -f <containername> when you have the docker image running?

I haven't touch the jessie build for quite some time now as we are now on our docker build with stretch in production. I'll have a look at the build I have here and see if the demos are still functional in my CI.