Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i use docker for deploy? #1126

Open
nrtpkim opened this issue Nov 11, 2022 · 4 comments
Open

How can i use docker for deploy? #1126

nrtpkim opened this issue Nov 11, 2022 · 4 comments

Comments

@nrtpkim
Copy link

nrtpkim commented Nov 11, 2022

when I start docker I cannot open the camera and then I open the camera, error show below

`/usr/local/lib/python3.9/site-packages/aiortc/rtcdtlstransport.py:211: CryptographyDeprecationWarning: This version of cryptography contains a temporary pyOpenSSL fallback path. Upgrade pyOpenSSL now.
_openssl_assert(lib.SSL_CTX_use_certificate(ctx, self._cert._x509) == 1) # type: ignore
2022-11-11 10:59:02.255 Track video received
2022-11-11 10:59:02.255 Set <aiortc.rtcrtpreceiver.RemoteStreamTrack object at 0x7f7cb2a4dd00> as an input video track with video_processor <class 'streamlit_webrtc.process.AsyncVideoProcessTrack'>
2022-11-11 10:59:02.255 Add a track <streamlit_webrtc.process.AsyncVideoProcessTrack object at 0x7f7cb2a51730> of kind video to <aiortc.rtcpeerconnection.RTCPeerConnection object at 0x7f7cb3af6cd0>
/usr/local/lib/python3.9/site-packages/aiortc/rtcdtlstransport.py:186: CryptographyDeprecationWarning: This version of cryptography contains a temporary pyOpenSSL fallback path. Upgrade pyOpenSSL now.
value=certificate_digest(self._cert._x509), # type: ignore
2022-11-11 10:59:02.292 Connection(0) Check CandidatePair(('172.24.0.3', 37908) -> ('192.168.0.117', 65137)) State.FROZEN -> State.WAITING
2022-11-11 10:59:02.293 ICE connection state is checking
2022-11-11 10:59:02.293 Connection(0) Check CandidatePair(('172.24.0.3', 37908) -> ('192.168.0.117', 65137)) State.WAITING -> State.IN_PROGRESS
2022-11-11 10:59:17.594 ICE connection state is closed
2022-11-11 10:59:17.899 Exception in callback Transaction.__retry()
handle: <TimerHandle when=16114.24134038 Transaction.__retry()>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 1054, in sendto
self._sock.sendto(data, addr)
AttributeError: 'NoneType' object has no attribute 'sendto'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.9/site-packages/aioice/stun.py", line 309, in __retry
self.__protocol.send_stun(self.__request, self.__addr)
File "/usr/local/lib/python3.9/site-packages/aioice/ice.py", line 243, in send_stun
self.transport.sendto(bytes(message), addr)
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 1064, in sendto
self._fatal_error(
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 711, in _fatal_error
self._loop.call_exception_handler({
AttributeError: 'NoneType' object has no attribute 'call_exception_handler'`

@whitphx
Copy link
Owner

whitphx commented Nov 24, 2022

I cannot open the camera and then I open the camera

Please elaborate it.
What does "I cannot open the camera" and "then I open the camera" mean?


Note:
A large part of the error message is about an exception subsequently raised after the main problem like the case at #552 (comment)

@nrtpkim
Copy link
Author

nrtpkim commented Dec 31, 2022

Sorry for my miscommunication.

  • "I cannot open the camera" mean when I click the "START" button to start video and audio streaming, The software show loaded until a timeout and return to the initial session.

  • "Open the camera" mean clicking the "START" button to start video and audio streaming.

@moono
Copy link

moono commented Jan 5, 2023

You should first check if your client PC has allowed UDP ports.

I had similar problem like OP and installed coturn (turn/stun server) and everything but nothing worked.
My problem was that I was using Windows 10 as client (which tries to connect stream_webrtc installed docker container on company's cloud infrastructure),
I had to allow UDP ports range: 49152 - 65535 to get it working.
No turn / stun server needed.

And yes if you deployed your application in some public cloud than you need a turn/stun server.

Another note is that if the your first attempt didn't worked, than try again, than it works.
Every time I test with chrome's incognito tab, I had to press start twice to get it working.

@yusuf-jkhan1
Copy link

@whitphx can you provide a dockerfile example for deployment? I am also getting this error. I went down a google spiral trying to figure out how to install a sound card server inside the docker container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants