Unable to run https://<hostname>. Browser not shows anything. Using docker swarm
ShriprasadM opened this issue · 28 comments
- able to up the dockers using make command
- started docker swarm with init command
- Launched the browser..
Do you replace in https://<< hostname >> with your docker swarm master hostname?
Do you see a security warning from the browser?
Yes. I did that.
- I have set up this on another machine
- Trying to access
https://<< hostname >>
from my local machine - Following services are installed
- As it was not working, I did the following,
Here I ran docker instance of ssai_content_provider_frontend , but exposed internal port 8080 to outer port 80
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1b3f067fa5ed ssai_content_provider_frontend:latest "/bin/bash -c /home/…" 10 hours ago Up 10 hours 0.0.0.0:80->8080/tcp laughing_williamson
which resulted in n showing the UI as mentioned in README.md. But, Video URL is empty. Also I can not edit that. I could see some errors in the debug window.
Your service list showed that CDN was not up and running. Could you check what was the log message?
The CDN service is internally configured as https. Thus mapping it to port 80 will not work as is. Is it possible that your machine port 443 is occupied? In that case, please map the port to 8443 in the deployment script. Try to access it via https://<< hostname >>:8443.
I have taken down custom installed docker instance as mentined in step#4. This was an extra step i did because, the thing as mentioned as per documentation is not showing anything in the browser.
Now there is
- docker swarm instance is running
- docker stack contains all adi services
I am new to the docker swarm. So not familiar with its architecture. sorry for that, but can you help me here. Following can be silly questions
Question
- Why I still can't access it?
- how https://<< hostname >>, docker swarm master node and adiservices are related. who tells to render ad insertion landing page and how?
- Do I need to start httpd instance?
- As per https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/doc/cmake.md - start/stop_docker_compose not found.
Here are the steps for browsers to see the URL:
(1) The CDN deployment script maps the external 443 port to an internal 8443 port. https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/deployment/docker-swarm/cdn.m4. This port talks https.
(2) The CDN nginx instance forwards the web request to the AD insertion service, which is at internal port 8080: https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/cdn/nginx.conf
(3) The AD insertion service forwards the web request to the content provider service, which is at internal port 8080: https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/ad-insertion/frontend/nginx.conf
(4) The content provider nginx instance handles the web request and returns the web pages: https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/content-provider/frontend/nginx.conf.
For now, it's not clear why you don't see the web pages. Please do two experiments as follows. Please report the results:
(1) Change 443:8443 in this script to be "8443:8443": https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/deployment/docker-swarm/cdn.m4. Restart the app. See if you can see the web page at https://hostname:8443
(2) If you still cannot see it, please in addition, change: "listen 8443 ssl" to "listen 8443". https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/cdn/nginx.conf. Rebuild and restart the app. See if you can access the content via http://_hostname:8443.
Any update?
Thanks, @xwu2git, I will check today and update you
- Did the following changes
- rebuild application using https://github.com/OpenVisualCloud/Ad-Insertion-Sample#build
- started docker swarm using https://github.com/OpenVisualCloud/Ad-Insertion-Sample#startstop-services
- Accessed http://:8443 . still getting an error, can not connect to the server
Ad-Insertion-Sample]$ curl "http://localhost:8443" curl: (7) Failed connect to localhost:8443; Connection refused
when tried from command line on same machine. getting connection refused error
diff --git a/cdn/nginx.conf b/cdn/nginx.conf
index de0806c..044a5d5 100644
--- a/cdn/nginx.conf
+++ b/cdn/nginx.conf
@@ -17,7 +17,7 @@ http {
limit_conn_zone $binary_remote_addr zone=addr2:10m;
server {
-
listen 8443 ssl;
-
listen 8443; server_name _; client_body_timeout 5s; client_header_timeout 5s;
diff --git a/deployment/docker-swarm/cdn.m4 b/deployment/docker-swarm/cdn.m4
index 4fd3250..c4dbc57 100644
--- a/deployment/docker-swarm/cdn.m4
+++ b/deployment/docker-swarm/cdn.m4
@@ -2,7 +2,7 @@
cdn-service:
image: defn(`REGISTRY_PREFIX')ssai_cdn_service:latest
ports:
-
- "443:8443"
-
- "8443:8443" environment: NO_PROXY: "*" no_proxy: "*"`
Hello @xwu2git ,
I am now able the issue page not loading. But now facing the same issue (see above browser screen with firebug) .. getting 404 for js and map files
0/1 replica issue was occurring because was getting this error "Err": "starting container failed: linux spec user: unable to find user docker: no matching entries in passwd file", in case of adi_cdn-service. The reason mostly is this file https://github.com/OpenVisualCloud/Ad-Insertion-Sample/blob/master/cdn/Dockerfile
. it searches for the user docker
, which is missing i gues in base image ssai_common
. Not sure how it works with other services
Please, guide me around that path mapping issue
I think I found the issue. Did you build as root? Could you try to build it as a regular user instead?
The root cause is "USER ${USER}" in the Dockerfile. If build as root, the user "docker" is not added during the build stage thus cannot be found during runtime. It will be fine if you build as a regular user.
I will fix this issue. Stay tuned.
@xwu2git , yes I am building this using sudo access for enabling setting up this application docker images.
As discussed above, I am facing now another issue of path mapping in case of js and map files (see screenshot as pasted earlier #236 (comment))
Sorry, can we start from the beginning? The issues are compounded together.
After applying #240, do you see the homepage? The CDN instance is now running? Not 0/1 in docker stack services adi. Is the video list showing up?
Also, how many nodes are there in your docker swarm? If it's more than 1, you need to share the volume folder on all worker nodes as described in deployment/docker-swarm/README.md. If it's a single node, then there is no specific setup needed other than docker swarm init.
- I haven't taken the latest pull including #240 yet as I an see the homepage now.
- Yes CDN instance is now running, showing 1/1 in docker stack services ad
- On the homepage, I can see the playlist. But still now getting video URL and video played. Here is screenshot
- As you can see above screenshot, I am now facing the path mapping issues. Right now it is for some of the js and .map files. It is returning 404 errors. Looking for help around it! Thanks!
There is no map file in the repo. The error does not impact playing back.
Did you double click on the videos?
Checking
Oh... it is playing the video after selecting from the playlist. Better if we can mention it in documentation
It's working now! Thanks!
One question
- Is this code Open source.
- Is it production-ready? we are working on some POC using it
Good.
One question
Is this code Open source ?
Is it production-ready? we are working on some POC using it ?
Yes, it's fully open sourced.
The ad-insertion feature is validated. However, this is a sample. Certain features are intentionally simplified, such as user account management, AD content management, AD decision making, as well as security designs. You might want to enhance those in a product.
Thanks @xwu2git for update !
Hello @xwu2git , can we stitch multiple ads within single cue point here
Yes, it is possible. In practice, you need to pay attention to resolution change during serving multiple ads. All ads of all resolutions of a cue point must be prepared as an atomic operation, or ad-falling back may kick in.
Is this supports VAST capabilities
We followed similar concept as VAST but did not follow the exact syntax, which is a bit overkill for this small sample. You can easily modify the code to use VAST.
thanks !
closed.