-
Notifications
You must be signed in to change notification settings - Fork 37
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
Docker image needs to support https #9
Comments
Did you pass cert and key files in to server.py script? The best add those parameters in this line KaldiWebrtcServer/docker/web/Dockerfile Line 13 in 1572211
|
I've tried to implement this with no luck. I'm a newb to Docker-Compose, and I may be doing something incorrectly. I changed the DockerFile line 13 to I also tried iterations with "--key-file" instead of "-key-file" and iterations that omitted the /server/ part of the path to the files. (The two domain.* files are in the same folder as server.py and servers.json, and also copied into the folder with the copy of the docker-compose.yml I am using) None of them seem to enable https. Do I need to do something to the docker-compose.yml to make it recognize the change? |
"-key-file" was typo, should be "--key-file". You need rebuild docker container after modify Dockerfile file. Thus, try to use |
Using docker-compose up --build hasn't seemed to change anything. The output when I run docker-compose up (with or without --build and with or without passing the extra two parameters) may be relevant: Does this final error message give any clues to why this isn't working? |
Has anyone gotten a Docker image to successfully serve HTTPS? |
This is another problem, seems to be not related with previous. Your kaldi container exited during application initialization because of some memory problem (exception bad_alloc). I will give you more accurate recipe for adding cert and key:
After that test if the web page is available via https. |
I have made all those changes now, and am still not getting https to function. It did, however, change the error. Here is the new error: Also, the only thing I hadn't already done was adding the two lines to docker-compose.yml, if that helps. |
This is the reason why https server does not work, cert file was not passed correctly. |
I found an error in the docker compose, fixed it, but now have a new error: NOTE: The cert used was created with the exact command that you posted above. docker directory: docker-compose.yml: web/Dockerfile: |
Now I see that I gave you recipe for generating CSR file. It's error. You need certificate file. You can generate self-signed CRT and key by command: Remove old domain.csr and domain.key and replace by new domain.crt and domain.key. Change also file name in and in |
The docker image does not support HTTPS. Without HTTPS, chrome will not allow use of navigator.mediaDevices.getUserMedia, and thus the script errors out and the demo fails.
The error that shows up in to logs if the website is called with HTTPS is:
[2020-10-09 13:48:19,546] aiohttp.server Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/aiohttp/web_protocol.py", line 275, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
The text was updated successfully, but these errors were encountered: