-
I am trying to make the selenium webdriver work but am having some issues:
I have used a (slightly) modified version: '2'
networks:
live_network:
external: true
internal_network:
external: false
services:
change-detection-web:
container_name: "change-detection-web"
image: dgtlmoon/changedetection.io
hostname: change-detection-web
volumes:
- ./data:/datastore
environment:
# - PORT=5000
- PUID=1000
- PGID=1000
# Changed the hostname here to match the updated name for the container below
- WEBDRIVER_URL="http://change-detection-browser-chrome:4444/wd/hub"
# This line is sometimes necessary for my traefik setup, not sure why
# ports:
# - "5000:5000"
networks:
- "live_network"
- "internal_network"
restart: unless-stopped
labels:
- "traefik.enable=true"
# This line is sometimes necessary for my traefik setup, not sure why
# - "traefik.http.services.change-detection-web.loadbalancer.server.port=5000"
- "traefik.http.routers.sitewatcher-websecure.rule=Host(`abc.example.com`)"
- "traefik.http.routers.sitewatcher-websecure.entrypoints=websecure"
- "traefik.http.routers.sitewatcher-websecure.tls=true"
- "traefik.http.routers.sitewatcher-websecure.tls.certresolver=le"
- "traefik.http.routers.sitewatcher-web.rule=Host(`abc.example.com`)"
- "traefik.http.routers.sitewatcher-web.entrypoints=web"
- "traefik.http.routers.sitewatcher-web.middlewares=sitewatcher-http-redirect"
- "traefik.http.middlewares.sitewatcher-http-redirect.redirectscheme.scheme=https"
change-detection-browser-chrome:
container_name: "change-detection-browser-chrome"
image: selenium/standalone-chrome-debug:3.141.59
hostname: change-detection-browser-chrome
# These lines are from a Stack Overflow post to get selenium to run in general
privileged: true
shm_size: 2g
environment:
- VNC_NO_PASSWORD=1
networks:
- "internal_network"
ports:
- "4444:4444"
volumes:
- /dev/shm:/dev/shm
restart: unless-stopped I ran the following to check if the Selenium container was accessible from the web container: ➜ changedetection git:(changedetection) ✗ sudo docker exec -it change-detection-web /bin/bash
root@32391e0e6f88:/app# apt install wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpcre2-8-0 libpsl5 publicsuffix
The following NEW packages will be installed:
libpcre2-8-0 libpsl5 publicsuffix wget
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1285 kB of archives.
After this operation, 4328 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian buster/main amd64 libpcre2-8-0 amd64 10.32-5 [213 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 libpsl5 amd64 0.20.2-2 [53.7 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 wget amd64 1.20.1-1.1 [902 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 publicsuffix all 20190415.1030-1 [116 kB]
Fetched 1285 kB in 1s (2232 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpcre2-8-0:amd64.
(Reading database ... 10485 files and directories currently installed.)
Preparing to unpack .../libpcre2-8-0_10.32-5_amd64.deb ...
Unpacking libpcre2-8-0:amd64 (10.32-5) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../libpsl5_0.20.2-2_amd64.deb ...
Unpacking libpsl5:amd64 (0.20.2-2) ...
Selecting previously unselected package wget.
Preparing to unpack .../wget_1.20.1-1.1_amd64.deb ...
Unpacking wget (1.20.1-1.1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../publicsuffix_20190415.1030-1_all.deb ...
Unpacking publicsuffix (20190415.1030-1) ...
Setting up libpsl5:amd64 (0.20.2-2) ...
Setting up libpcre2-8-0:amd64 (10.32-5) ...
Setting up publicsuffix (20190415.1030-1) ...
Setting up wget (1.20.1-1.1) ...
Processing triggers for libc-bin (2.28-10) ...
root@32391e0e6f88:/app# wget http://change-detection-browser-chrome:4444/wd/hub
--2021-08-18 09:17:06-- http://change-detection-browser-chrome:4444/wd/hub
Resolving change-detection-browser-chrome (change-detection-browser-chrome)... 192.168.64.2
Connecting to change-detection-browser-chrome (change-detection-browser-chrome)|192.168.64.2|:4444... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://change-detection-browser-chrome:4444/wd/hub/static/resource/hub.html [following]
--2021-08-18 09:17:06-- http://change-detection-browser-chrome:4444/wd/hub/static/resource/hub.html
Reusing existing connection to change-detection-browser-chrome:4444.
HTTP request sent, awaiting response... 200 OK
Length: 160 [text/html]
Saving to: ‘hub’
hub 100%[========================>] 160 --.-KB/s in 0s
2021-08-18 09:17:06 (39.8 MB/s) - ‘hub’ saved [160/160]
root@32391e0e6f88:/app# cat hub
<!DOCTYPE html>
<title>WebDriver Hub</title>
<link rel="stylesheet" href="style.css">
<script src="client.js"></script>
<body>
<script>init();</script>
</body>
root@32391e0e6f88:/app# exit So it looks like it's all accessible? From
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Moved to support discussion - this is not a bug/issue try to telnet from inside the changedetection.io container into the selenium container
does that work? |
Beta Was this translation helpful? Give feedback.
-
@conor-f what if you use the stock hostname settings (default settings)
And comment out this line
restart your docker-composer.. paste in the error again for me please |
Beta Was this translation helpful? Give feedback.
-
So here the answer... when I ran $ set
WEBDRIVER_URL='"http://browser-chrome-test:4444/wd/hub"' so it means the Yaml config is broken.. environment:
- - WEBDRIVER_URL="http://browser-chrome:4444/wd/hub"
+ - WEBDRIVER_URL=http://browser-chrome-test:4444/wd/hub The answer is... remove the "'s from the |
Beta Was this translation helpful? Give feedback.
So here the answer... when I ran
set
in the container I sawso it means the Yaml config is broken..
The answer is... remove the "'s from the
environment:
string :) see b99957f