aau-zid / BigBlueButton-liveStreaming

Streams a given BBB Meeting to an RTMP Server.
GNU General Public License v3.0
201 stars 160 forks source link

Timeout on start stream #78

Closed odairmario closed 3 years ago

odairmario commented 4 years ago

Describe the bug When I try start a livestream I receive this error:

liveStreaming   | Traceback (most recent call last):
liveStreaming   |   File "stream.py", line 167, in <module>
liveStreaming   |     bbb_browser()
liveStreaming   |   File "stream.py", line 78, in bbb_browser
liveStreaming   |     WebDriverWait(browser, selelnium_timeout).until(element)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
liveStreaming   |     raise TimeoutException(message, screen, stacktrace)
liveStreaming   | selenium.common.exceptions.TimeoutException: Message: 
liveStreaming   | 
liveStreaming exited with code 1

To Reproduce Steps to reproduce the behavior: 1 Change docker-compose 2.run docker-compose up

  1. output:
    
    r-compose logs -f
    Attaching to liveStreaming
    liveStreaming   | INFO:root:Starting browser!!
    liveStreaming   | INFO:root:streaming intro...
    liveStreaming   | ffmpeg version 4.3-2~18.04.york0 Copyright (c) 2000-2020 the FFmpeg developers
    liveStreaming   |   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    liveStreaming   |   configuration: --prefix=/usr --extra-version='2~18.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
    liveStreaming   |   libavutil      56. 51.100 / 56. 51.100
    liveStreaming   |   libavcodec     58. 91.100 / 58. 91.100
    liveStreaming   |   libavformat    58. 45.100 / 58. 45.100
    liveStreaming   |   libavdevice    58. 10.100 / 58. 10.100
    liveStreaming   |   libavfilter     7. 85.100 /  7. 85.100
    liveStreaming   |   libavresample   4.  0.  0 /  4.  0.  0
    liveStreaming   |   libswscale      5.  7.100 /  5.  7.100
    liveStreaming   |   libswresample   3.  7.100 /  3.  7.100
    liveStreaming   |   libpostproc    55.  7.100 / 55.  7.100
    liveStreaming   | false: No such file or directory
    liveStreaming   | INFO:root:Open BBB and hide elements!!
    liveStreaming   | INFO:root:create_meeting...
    liveStreaming   | INFO:root:A meeting already exists with that meeting ID. Please use a different meeting ID.
    liveStreaming   | INFO:root:get_join_url...
    liveStreaming   | INFO:root:https://bbb.c3sl.ufpr.br/bigbluebutton/api/join?meetingID=<omiited>&fullName=Live&password=RBovQGTEhtkD&userdata-bbb_auto_join_audio=true&userdata-bbb_enable_video=false&userdata-bbb_listen_only_mode=true&userdata-bbb_force_listen_only=true&userdata-bbb_skip_check_audio=true&joinViaHtml5=true&checksum=<omitted>
    liveStreaming   | Traceback (most recent call last):
    liveStreaming   |   File "stream.py", line 167, in <module>
    liveStreaming   |     bbb_browser()
    liveStreaming   |   File "stream.py", line 78, in bbb_browser
    liveStreaming   |     WebDriverWait(browser, selelnium_timeout).until(element)
    liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
    liveStreaming   |     raise TimeoutException(message, screen, stacktrace)
    liveStreaming   | selenium.common.exceptions.TimeoutException: Message: 
    liveStreaming   | 
    liveStreaming exited with code 1
**Desktop (please complete the following information):**
 - OS: debian 10 linux 5.6.7]
 - Browser chrome
 - Version [e.g. 22]

**BBB VERSIONS**
```bash
root@bbb:/bbb# bbb-conf --version

ii  bbb-apps                              1:2.2.0-46                                      amd64        BigBlueButton applications for Red5
ii  bbb-apps-akka                         2.2.0-88                                        all          BigBlueButton Apps (Akka)
ii  bbb-apps-screenshare                  1:2.2.0-46                                      amd64        BigBlueButton screenshare module for Red5
ii  bbb-apps-sip                          1:2.2.0-11                                      amd64        BigBlueButton SIP module for Red5
ii  bbb-apps-video                        1:2.2.0-43                                      amd64        BigBlueButton video module for Red5
ii  bbb-apps-video-broadcast              1:2.2.0-8                                       amd64        BigBlueButton video broadcast module for Red5
ii  bbb-client                            1:2.2.0-40                                      amd64        BigBlueButton Flash client
ii  bbb-config                            1:2.2.0-200                                     amd64        BigBlueButton configuration utilities
ii  bbb-etherpad                          1:2.2.0-54                                      amd64        The EtherPad Lite components for BigBlueButton
ii  bbb-freeswitch-core                   2:2.2.0-112                                     amd64        BigBlueButton build of FreeSWITCH
ii  bbb-freeswitch-sounds                 1:1.6.7-6                                       amd64        FreeSWITCH Sounds
ii  bbb-fsesl-akka                        2.2.0-66                                        all          BigBlueButton FS-ESL (Akka)
ii  bbb-html5                             1:2.2.0-980                                     amd64        The HTML5 components for BigBlueButton
ii  bbb-mkclean                           1:0.8.7-3                                       amd64        Clean and optimize Matroska and WebM files
ii  bbb-playback-presentation             1:2.2.0-32                                      amd64        BigBluebutton playback of presentation
ii  bbb-record-core                       1:2.2.0-68                                      amd64        BigBlueButton record and playback
ii  bbb-red5                              1:1.0.10-16                                     amd64        The Red5 server for BigBlueButton
ii  bbb-transcode-akka                    2.2.0-8                                         all          BigBlueButton Transcoder
ii  bbb-web                               1:2.2.0-134                                     amd64        BigBlueButton API
ii  bbb-webrtc-sfu                        1:2.2.0-102                                     amd64        BigBlueButton WebRTC SFU
ii  bigbluebutton                         1:2.2.0-5                                       amd64        Open source web conferencing platform (bbb)
ii  ffmpeg                                7:4.2.2-1bbb1~ubuntu16.04                       amd64        Tools for transcoding, streaming and playing of multimedia files
ii  libavcodec58:amd64                    7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice58:amd64                   7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter7:amd64                    7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library containing media filters - runtime files
ii  libavformat58:amd64                   7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample4:amd64                  7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg compatibility library for resampling - runtime files
ii  libavutil56:amd64                     7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library with functions for simplifying programming - runtime files
ii  libopusenc0                           0.2.1-1bbb1                                     amd64        High-level API for encoding Ogg Opus audio streams
ii  libpostproc55:amd64                   7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for post processing - runtime files
ii  libswresample3:amd64                  7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale5:amd64                     7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for image scaling and various conversions - runtime files
mtsonline commented 4 years ago

hi,

if you do not have an intro file please comment the intro file parameter - otherwise it is trying to stream nothing.

What do you get if you open the join url (shown in the logs) (please try it quickly after running the livestream docker, when it threw the error.)

cheers

snehgin commented 4 years ago

@odairmario @mtsonline I am also seeing the same error.

Do I need to enable any specific ports??

mtsonline commented 4 years ago

what do you see when opening the join url in the browser? have you enabled html5 client or do you try to use the old flash one? (this would not work)

snehgin commented 4 years ago

@mtsonline Using html5 client only. while opening the join URL in browser, I am logged in to meeting and a prompt to allow audio appears.

mtsonline commented 4 years ago

so far this sounds ok. :-)

what do the liveStreaming logs say when your user is removed from the meeting? (you can easily show them when you start the docker without -d on the commandline)

does streaming start or is the user removed before the broadcast started?

snehgin commented 4 years ago

@mtsonline this is the prompt I get when log-in from browser. bbb_stream_join Streaming does not start the user gets removed before that. Docker without -d gives the below output bbb_error

mtsonline commented 4 years ago

could you please post the results as code block / text not image - tks

snehgin commented 4 years ago

@mtsonline sure. Here it is Creating network "code_default" with the default driver Creating liveStreaming ... done Attaching to liveStreaming liveStreaming | INFO:root:Starting browser!! liveStreaming | INFO:root:Open BBB and hide elements!! liveStreaming | INFO:root:get_join_url... liveStreaming | INFO:root:https://eins3.epoch.com/bigbluebutton/api/join?meetingID=random-3932760&fullName=Live&password=ap&userdata-bbb_auto_join_audio=true&userdata-bbb_enable_video=false&userdata-bbb_listen_only_mode=true&userdata-bbb_force_listen_only=true&userdata-bbb_skip_check_audio=true&joinViaHtml5=true&checksum=cfe607434fc4d5574ff310c6be7f4c9d3067be61 liveStreaming | Traceback (most recent call last): liveStreaming | File "stream.py", line 167, in <module> liveStreaming | bbb_browser() liveStreaming | File "stream.py", line 78, in bbb_browser liveStreaming | WebDriverWait(browser, selelnium_timeout).until(element) liveStreaming | File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until liveStreaming | raise TimeoutException(message, screen, stacktrace) liveStreaming | selenium.common.exceptions.TimeoutException: Message: liveStreaming | liveStreaming exited with code 1

mtsonline commented 4 years ago

ok so the live user cannot join - the stream is not started at all.

logging in with the join url from these logs works for you?

can you post your docker-compose please.

snehgin commented 4 years ago

@mtsonline

`version: '3.3' services: bbb-streamer: image: aauzid/bigbluebutton-livestreaming container_name: liveStreaming environment:

BigBlueButton Server url:

  - BBB_URL=https://eins3.epoch.com/bigbluebutton/api
  # BigBlueButton secret:
  - BBB_SECRET=<mySecretHere>
  # BigBlueButton meetingID:
  - BBB_MEETING_ID=random-3932760
  # start meeting (optional):
  - BBB_START_MEETING=false
  # attendee password (optional - has to be set to the attendee password of moodle/greenlight or any other frontend to allow joining via their links):
  - BBB_ATTENDEE_PASSWORD=ap
  # moderator password (optional - has to be set to the moderator password of moodle/greenlight or any other frontend to allow joining via their links):
  - BBB_MODERATOR_PASSWORD=mp
  # meeting title (optional):
  - BBB_MEETING_TITLE=liveStreaming Test
  # download / save BigBlueButton meeting
  - BBB_DOWNLOAD_MEETING=false
  # play intro file (can be a local file in videodata folder e.g. /video/intro.mp4 or a url of a mediastream e.g. https://my.intro.stream)
  # BBB_INTRO=false
  # begin the intro at position (optional, e.g. 00:00:05)
  # BBB_BEGIN_INTRO_AT=
  # end intro after (optional, e.g. 01:00:00 - after one hour)
  # BBB_END_INTRO_AT=
  # Media server url:
  - BBB_STREAM_URL=rtmp://a.rtmp.youtube.com/live2/stream/<mykeyhere>
  # Show Chat:
  - BBB_SHOW_CHAT=false
  # Timezone (default: Europe/Vienna):
  - TZ=Europe/Vienna

volumes:
  - ./videodata:/video

`

mtsonline commented 4 years ago

ok, please try to comment the following variables:

they do not make sense if you do not start / create the meeting and may cause problems though.

also note, that you have to add your key to the youtube url at the end

snehgin commented 4 years ago

@mtsonline tried that as well, still not working. please find the updated docker-compose and error logs. I have added the youtube stream key, just removed it while posting here.

`version: '3.3' services: bbb-streamer: image: aauzid/bigbluebutton-livestreaming container_name: liveStreaming environment:

BigBlueButton Server url:

  - BBB_URL=https://eins3.epoch.com/bigbluebutton/api
  # BigBlueButton secret:
  - BBB_SECRET=mysecret
  # BigBlueButton meetingID:
  - BBB_MEETING_ID=random-3932760
  # meeting title (optional):
  - BBB_MEETING_TITLE=liveStreaming Test
  # Media server url:
  - BBB_STREAM_URL=rtmp://a.rtmp.youtube.com/live2/stream/mykeyhere
  # Timezone (default: Europe/Vienna):
  - TZ=Europe/Vienna

volumes:
  - ./videodata:/video`

-- Error Logs

bbbadmin@eins3:~/BBB_stream/code$ sudo docker-compose up Creating network "code_default" with the default driver Creating liveStreaming ... done Attaching to liveStreaming liveStreaming | INFO:root:Starting browser!! liveStreaming | INFO:root:Open BBB and hide elements!! liveStreaming | INFO:root:get_join_url... liveStreaming | INFO:root:https://eins3.epoch.com/bigbluebutton/api/join?meetingID=random-3932760&fullName=Live&password=ap&userdata-bbb_auto_join_audio=true&userdata-bbb_enable_video=false&userdata-bbb_listen_only_mode=true&userdata-bbb_force_listen_only=true&userdata-bbb_skip_check_audio=true&joinViaHtml5=true&checksum=cfe607434fc4d5574ff310c6be7f4c9d3067be61 liveStreaming | Traceback (most recent call last): liveStreaming | File "stream.py", line 167, in <module> liveStreaming | bbb_browser() liveStreaming | File "stream.py", line 78, in bbb_browser liveStreaming | WebDriverWait(browser, selelnium_timeout).until(element) liveStreaming | File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until liveStreaming | raise TimeoutException(message, screen, stacktrace) liveStreaming | selenium.common.exceptions.TimeoutException: Message: liveStreaming | liveStreaming exited with code 1

mtsonline commented 4 years ago

so last thing causing this can be, that the element does not exist, selenium is looking for. to check this, you will have to open the join url in your browser and when the prompt for the listen audio approval pops up, get the html / source code of this block.

then we can compare this with the selenium code ...

did you change anything in the css or bbb html code? ...it also is possible, that something has changed in the last updates, we did not check against the newest versions ourselve.

aguerson commented 4 years ago

BBB liveStreaming works very well with my Chrome version on Ubuntu 18.04 LTS

dpkg -l|grep chrome
ii  google-chrome-stable              85.0.4183.83-1                        amd64        The web browser from Google
snehgin commented 4 years ago

@mtsonline @aguerson I am running BBB on ubuntu 16.04 server. Tried streaming from ubuntu desktop and server, both has same issue. This is the screen I get and its html source. I am using the docker image and not made any changes.

<div class="ReactModal__Overlay ReactModal__Overlay--after-open overlay--Z7FUVK"><div class="ReactModal__Content ReactModal__Content--after-open modal--1DxJyC modal--lmEc2" tabindex="-1" role="dialog" aria-label="Join audio modal"><header class="headerNoBorder--1AuhJR"><h1 class="title--lOpI8"></h1><button aria-label="Close Join audio modal" aria-disabled="false" class="md--Q7ug4 buttonWrapper--x8uow dismiss--1zWwpv" aria-describedby="modalDismissDescription" position="bottom" id="tippy-28"><span class="button--Z2dosza md--Q7ug4 default--Z19H5du circle--Z2c8umk"><i class="icon--2q1XXw icon-bbb-close"></i></span><span class="label--Z12LMR3 hideLabel--2vEtaU">Close</span></button></header><div class="content--IVOUy"><header class="header--48YvN"><h3 class="title--1E0v5I">We need your permission to play audio.</h3></header><div class="content--2hQ1fL"><span class="autoplayPrompt--1YiUrp"><button aria-label="Play audio" aria-disabled="false" class="jumbo--Z12Rgj4 buttonWrapper--x8uow button--Z23moYP"><span class="button--Z2dosza jumbo--Z12Rgj4 success--Z6UU8x circle--Z2c8umk"><i class="icon--2q1XXw icon-bbb-thumbs_up"></i></span><span class="label--Z12LMR3">Play audio</span></button></span></div></div><div id="modalDismissDescription" hidden="">Disregards changes and closes the modal</div></div></div>

bbb_stream_join

aguerson commented 4 years ago

OK. I will create an issue to explain how to install all the platform ;) ( BBB Livestreaming + Nginx + HLS ) Let me few hour to create it.

snehgin commented 4 years ago

@mtsonline @aguerson my BigBlueButton Server is 2.2.22 (2105). will it be an issue?

aguerson commented 4 years ago

Maybe I am wrong, but, 2.2.X or 2.2.26 is the same API.

For the "userdata-bbb" entries, I am not sure.

mtsonline commented 4 years ago

the api won't be the problem - we just have to check which label/text string selenium is looking for and if this is available on the page / why it is missing if not. Could you have a look at the code and see what selenium is avaiting in the corresponding lines? I currently can't so it would be faster if you have a look yourself. If you have the string that is used search for it in your html code ... or if not available check what your page shows for the "allow audio" part.

aguerson commented 4 years ago

done !

https://github.com/aau-zid/BigBlueButton-liveStreaming/issues/83

snehgin commented 4 years ago

@mtsonline the error is in these lines, I believe here we are waiting for the page to load. element = EC.presence_of_element_located((By.XPATH, '//span[contains(@class,"success")]')) WebDriverWait(browser, selelnium_timeout).until(element)

I have increased the timeout to 120 seconds to see if its due to any delay in loading the page. but no luck.

Any other suggestions to try.

mtsonline commented 4 years ago

yes this is the line - great that you could look it up. and your html code includes the <span tag with a class ...success... :-/ so I do not understand why it does not find that. I am not very familiar with selenium so could you search the net/docs if we will have to change this line to something else for better compatibility? maybe success or instead of contains something else? ... but this was the most fitting command I found and for us it was working well ...

odairmario commented 4 years ago

@mtsonline the error is in these lines, I believe here we are waiting for the page to load. element = EC.presence_of_element_located((By.XPATH, '//span[contains(@class,"success")]')) WebDriverWait(browser, selelnium_timeout).until(element)

I have increased the timeout to 120 seconds to see if its due to any delay in loading the page. but no luck.

Any other suggestions to try.

hi I did a workaround to solve the problem, basically I dotwo request to bbb, my function bbb_browser is:


def bbb_browser():
    global browser
    logging.info('Open BBB and hide elements!!')
    if args.startMeeting is True:
        try:
            logging.info("create_meeting...")
            create_meeting()
        except exception.bbbexception.BBBException as ERR:
            logging.info(ERR)
    logging.info("get_join_url...")
    browser.get(get_join_url())
    browser.get(get_join_url()) # here the solution
    element = EC.presence_of_element_located((By.CSS_SELECTOR, '[aria-label="Listen only"]'))
    WebDriverWait(browser, selelnium_timeout).until(element)
    browser.find_elements_by_css_selector('[aria-label="Listen only"]')[0].click()

    element = EC.invisibility_of_element((By.CSS_SELECTOR, '.ReactModal__Overlay'))
    WebDriverWait(browser, selelnium_timeout).until(element)
    browser.find_element_by_id('message-input').send_keys("This meeting is streamed to: %s" % args.target)
    browser.find_elements_by_css_selector('[aria-label="Send message"]')[0].click()

    if args.chat:
        browser.execute_script("document.querySelector('[aria-label=\"User list\"]').parentElement.style.display='none';")
    else:
        browser.find_elements_by_id('chat-toggle-button')[0].click()
        browser.find_elements_by_css_selector('button[aria-label="Users and messages toggle"]')[0].click()

    browser.execute_script("document.querySelector('[aria-label=\"Users and messages toggle\"]').style.display='none';")
    browser.execute_script("document.querySelector('[aria-label=\"Options\"]').style.display='none';")
    browser.execute_script("document.querySelector('[aria-label=\"Actions bar\"]').style.display='none';")
    browser.execute_script("document.getElementById('container').setAttribute('style','margin-bottom:30px');")

First requisition go to first page and need do a second request to open html5 client and start stream.

mtsonline commented 4 years ago

hm. a second

    browser.get(get_join_url()) # here the solution

should not be necessary :-/

what do you mean with "first page" ? For me the first page loaded is the html5 client I guess.

odairmario commented 4 years ago

open the url in private mode and u see, for me the first page in private mode is greenlight, i needed do two request in private mode to open html5.

mtsonline commented 4 years ago

greenlight has nothing to do with bigbluebutton api ... so I cannot see why the greenlight page should pop up on your api call. Which page of greenlight do you see? What did you change in your greenlight/nginx config so this happens?

snehgin commented 4 years ago

@mtsonline @odairmario after taking away few parameters from the join URL, I got the 'Listen Only & Microphone' option popup. But when I simulate the ListenOnly click, I get an error "Error 1007 ICE. Failed joining audio". But when I join from browser directly using the join URL everything works fine.

mtsonline commented 4 years ago

@snehgin what parameters did you remove? and where do you see the error then?

this looks as if your liveSTreaming server cannot reach the necessary ports on the bbb server. Did you open the browser page on the same host or another?

snehgin commented 4 years ago

@mtsonline This is my current parameter list `joinParams = {} joinParams['meetingID'] = args.id joinParams['fullName'] = args.user joinParams['password'] = pwd joinParams['userdata-bbb_auto_join_audio'] = "true"

joinParams['userdata-bbb_enable_video'] = 'false'

#joinParams['userdata-bbb_listen_only_mode'] = "true" 
#joinParams['userdata-bbb_force_listen_only'] = "true" 
#joinParams['userdata-bbb_skip_check_audio'] = 'true' 
joinParams['joinViaHtml5'] = 'true'

`

I have removed these 4 #joinParams['userdata-bbb_enable_video'] = 'false' #joinParams['userdata-bbb_listen_only_mode'] = "true" #joinParams['userdata-bbb_force_listen_only'] = "true" #joinParams['userdata-bbb_skip_check_audio'] = 'true'

This is the audio error I see when streaming audio_error

I opened the browser page on a different machine only.

snehgin commented 4 years ago

@mtsonline I always see these loading/refresh arrows even though content is being shared.

snehgin commented 4 years ago

@mtsonline I also get this error connecting pulse audio after restarting docker. Any idea on the root cause?

liveStreaming | ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused liveStreaming | liveStreaming | [alsa @ 0x55bc0e474100] cannot open audio device pulse (Connection refused) liveStreaming | pulse: Input/output error liveStreaming exited with code 0

mtsonline commented 4 years ago

the parameters you disabled should not interfear. the video should be enabled as it seems, so it is good to comment this. Although we should test what it does in reality.

the listen only parameters are enabled so the correct popup is shown and selenium can find the right button. If you disable them you will have to search for another string - we did change this because people had issues with non english setups.

the skip echo does not affect listen only.

if you have pulse / alsa problems have a look at the open pull requests - they should help in this case.

snehgin commented 4 years ago

@mtsonline tried switching to default audio as mentioned in open Pull Request. ALSA error is gone, but the ICE 1007 connection failed error still exists and unable to join audio. Anything specific to host OS or docker ports, firewalls, etc.

mtsonline commented 4 years ago

no nothing specific. just make sure all ports of bbb can be reached as needed for any other client. This error is not related to docker or the liveStreaming.

snehgin commented 4 years ago

@mtsonline I was able to get everything working when I run the streaming tool on a Ubuntu Desktop OS, but audio and video does not work from a Ubuntu server. Any specific applications to be installed on Ubuntu server to get it working?

Also, could you please list what all ports are required for streaming?

mtsonline commented 4 years ago

the liveStreaming runs in a docker, so it should not matter on which system (supporting docker) you run, as in the docker the operating system for the stream is set up actualy.

But please let us know if you find the cause / missing packages / tools on the server OS.

dimitrihof commented 4 years ago

I am facing the same issue and came across these two issues in the bigbluebutton google group. https://groups.google.com/g/bigbluebutton-dev/c/bUeHOo4Yu6o/m/EpMaGqKbAQAJ https://groups.google.com/g/bigbluebutton-dev/c/CCCObMNin0s As @snehgin I can connect with my browser after the container failed to connect, but if i try to use the link created by the streaming.py while my container is connecting to the conference i get a 401 Error Authentication failed due to missing credentials. So it might be connected with some kind of cookie policy in the newer versions of chrome.

I will try that and report back.

mtsonline commented 4 years ago

as it works for us and everyone has the same chrome version in the docker I cannot imagine that this is the problem. you can try to set the video parameter in the stream.py to true - this seems to be causing an issue if no webcam is running and also places the video wrong.

otherwise some settings in your bbb or other parameters might be interfearing. the issue you linked was refering to iframes being used though. cheers

snehgin commented 4 years ago

@d3hof I was using an AWS virtual machine to run the streaming application where I got the audio connection error (Also BBB was also installed on the same machine). I tried running the same on a new GCP compute engine and everything worked fine there. The AWS instance is managed by my organization, so there is a high chance that some firewall/port restrictions might be imposed on it.

dimitrihof commented 4 years ago

I solved the problem. Is was due to some customisations we made to the html5-client. Using it on a standard instance was possible without a problem.

faust64 commented 4 years ago

I've been hitting with the very same issue. In my case, this is related to a custom PKI I would use, signing BBB certificate. Even though the corresponding CA was trusted in the livestream container (I can curl bbb without any error, nor -k).

Trying out with another BBB setup I have available, using LE certs, then the stream starts properly. I've been using the same playbooks deploying both BBB. That custom PKI is pretty much the only difference.

Shouldn't chrome trust whichever CA was installed in /etc/ssl/certs?

mtsonline commented 4 years ago

I do not think that this is the very same issue.

"Even though the corresponding CA was trusted" how did you trust that? Did you add your root cert to the store in the container?

"Ican curl bbb without any error, nor -k" what does that mean?

Why should the lifeStreaming accept more certs than other systems would? In my opinion it is okay that it does only trust valid certs from authorized CAs for security reasons.

faust64 commented 4 years ago

I do not think that this is the very same issue.

Sure. Yet I have the same error output. The person before me had troubles with custom html templates, .... Let's be realistic: those error messages don't mean much, we're likely to see several issues behind them.

I first arrived here because of a timeout loading the intro, exactly as in the first post. Despite having set BBB_INTRO=false. I removed the variable, as suggested here. I was still hitting with timeouts, with error messages still matching those reported here: selenium timing out, waiting for the browser to open the conference.

how did you trust that? Did you add your root cert to the store in the container?

I would install my CA chain on the Docker host, in /usr/local/share/ca-certificates, and update-ca-certificates, which links it into /etc/ssl/certs Then, in my docker-compose, I would bind-mount both /usr/local/share/ca-certificates & /etc/ssl/certs, installing my host CA trust store into the container.

From the container, or on the Docker host, I can query BBB, the certificate is valid. I've been using those same mount binds with greenlight or scalelite, as they would check BBB certificates as well. So far, this worked perfectly. Most customers I deploy BBB for would use their own CA, they generate proper certificates for me, and I would deploy their BBB from there. In most corporate environments, custom CAs are trusted on all workstations, servers, .... users won't see the difference.

can curl bbb without any error, nor -k" / what does that mean?

That curl, and system utilities in general, do trust my custom CA, I do not need to ignore TLS verification ('-k'). I can openssl s_client -connect to my bbb webserver, and confirm verification succeeds.

Why should the lifeStreaming accept more certs than other systems would

It shouldn't. However it should trust all system CAs, which is not the case right now.

Not all BBB deployments can rely on LetsEncrypt, or commercial certificates. And there would be a lot to say about public authorities trustworthyness, legitimacy, .... PKIs are nothing new and quite commons, in corporate environments.

In my opinion it is okay that it does only trust valid certs from authorized CAs for security reasons

Exactly. Though, authorized by whom? When I deploy a server, I would sure hope I am the one to have the final word on what's authorized or not.

Apparently, chrome doesn't use the system trust store. There would be some extra steps to automate, such as: https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md

mtsonline commented 4 years ago

yeah, I am completely with you, when you added the CA root cert to the store this should be accepted. Chrome not using the host trust store should be changed - hopefully someone finds the time to dive into this.

faust64 commented 4 years ago

I've been trying out to import my own CA during image startup, with no luck so far.

I managed to get it working, by turning off certificate verification, using an additional environment variable / defaults would still work as your master currently does: https://github.com/Worteks/BigBlueButton-liveStreaming/tree/custom-ca

I wouldn't recommend this. If one can manage to load certs in the right place, that would surely be better. Then again, we're not connecting to paypal here, ... I can create a PR, if you wish to keep it.