Closed odairmario closed 3 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
@odairmario @mtsonline I am also seeing the same error.
Do I need to enable any specific ports??
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)
@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.
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?
@mtsonline this is the prompt I get when log-in from browser. Streaming does not start the user gets removed before that. Docker without -d gives the below output
could you please post the results as code block / text not image - tks
@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
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.
@mtsonline
`version: '3.3' services: bbb-streamer: image: aauzid/bigbluebutton-livestreaming container_name: liveStreaming environment:
- 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
`
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
@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:
- 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
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.
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
@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>
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.
@mtsonline @aguerson my BigBlueButton Server is 2.2.22 (2105). will it be an issue?
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.
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.
@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.
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 ...
@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.
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.
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.
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?
@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.
@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?
@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_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
I opened the browser page on a different machine only.
@mtsonline I always see these loading/refresh arrows even though content is being shared.
@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
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.
@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.
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.
@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?
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.
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.
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
@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.
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.
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?
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.
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
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.
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.
Describe the bug When I try start a livestream I receive this error:
To Reproduce Steps to reproduce the behavior: 1 Change docker-compose 2.run
docker-compose up