Giter VIP home page Giter VIP logo

callisto-chart's Introduction

Callisto

Callisto is an open-source Kubernetes-native implementation of Selenium Grid.

See this repository for the source code.

How to run in Docker for Mac

  1. Install kubectl & helm
  2. Enable Kubernetes in Docker for Mac
  3. Install Ingress Controller
  4. Install callisto:

helm template . | kubectl apply -f -

  1. Add corresponding line to the bottom of /etc/hosts:

localhost callisto.local

How to run in minikube

  1. Install kubectl & helm
  2. Install minikube
  3. Enable Ingress Controller
  4. Install callisto:

helm template . | kubectl apply -f -

  1. Get external minikube ip:

minikube ip

  1. Add corresponding line to the bottom of /etc/hosts:

<minikube.external.ip> callisto.local

How to access callisto features

  1. To open Selenoid UI use:

http://callisto.local

  1. To run your tests use the same url:

http://callisto.local

How to run as helm release

  1. To install the chart with the release name callisto:

kubectl create ns callisto && helm install callisto .

  1. To uninstall the release and clean up all related stuff:

helm delete --no-hooks callisto && kubectl delete ns callisto

callisto-chart's People

Contributors

negashev avatar vpokotilov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

callisto-chart's Issues

help template failed

macOS 13.1

helm version
version.BuildInfo{Version:"v3.10.3", GitCommit:"835b7334cfe2e5e27870ab3ed4135f136eecc704", GitTreeState:"clean", GoVersion:"go1.19.4"}

run: helm template .

and get error:

helm.go:84: [debug] template: callisto/templates/callisto-nginx-configmap.yaml:11:3: executing "callisto/templates/callisto-nginx-configmap.yaml" at <tpl (.Files.Glob "files/callisto-nginx.conf").AsConfig .>: error calling tpl: error during tpl function execution for "callisto-nginx.conf: "upstream callisto {\r\n server {{ template \"callisto.name\"\n . }}:8080;\r\n}\r\nupstream selenoid {\r\n server {{ template \"callisto.name\"\n . }}-selenoid-ui:8000;\r\n}\r\nmap $http_upgrade $connection_upgrade {\r\n default\n upgrade;\r\n '' close;\r\n}\r\n\r\nlog_format custom '$remote_addr [$time_iso8601]\n $scheme \"$request\" $request_time $status \"$http_user_agent\" $upstream_response_time\n \"$host\" $upstream_addr \"{{ .Values.instanceID }}\"';\r\naccess_log off;\r\n\r\nserver\n {\r\n listen 80 default_server;\r\n resolver {{ .Values.nginx.resolver }};\r\n\n \ access_log /var/log/nginx/access.log custom;\r\n\r\n proxy_connect_timeout 600;\r\n\n \ proxy_send_timeout 600;\r\n proxy_read_timeout 600;\r\n send_timeout\n \ 600;\r\n\r\n rewrite ^(.)/se/file$ $1/file break; # selenium\n 4 compatibility\r\n\r\n error_page 504 /504.html;\r\n location /504.html {\r\n\n \ return 504 '{\"error\": \"504\", \"message\": \"Gateway Timeout at Callisto\n nginx. Probably the browser has crashed.\"}';\r\n }\r\n error_page 503 /503.html;\r\n\n \ location /503.html {\r\n return 503 '{\"error\": \"503\", \"message\": \"Service\n Temporarily Unavailable at Callisto nginx. Probably the Kubernetes API is unavailable.\"}';\r\n\n \ }\r\n error_page 502 /502.html;\r\n location /502.html{\r\n return 502\n '{\"error\": \"502\", \"message\": \"Bad Gateway at Callisto nginx. Probably the\n container for the browser is not running.\"}';\r\n }\r\n location ~ /session/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)-(?<session_id>[a-z0-9-]+)/(?<tests_request>.+)\n {\r\n proxy_http_version 1.1;\r\n proxy_connect_timeout 30;\r\n proxy_send_timeout\n \ 30;\r\n proxy_read_timeout 30;\r\n send_timeout 30;\r\n\n \ client_max_body_size 8m;\r\n proxy_request_buffering off; # disable\n request buffering on disk\r\n {{- if eq .Values.callisto.browser.name \"firefox\"\n }}\r\n proxy_pass http://$pod_ip:4444{{ .Values.callisto.browser.firefoxWebdriverPath\n }}/session/$session_id/$tests_request;\r\n {{- else }}\r\n proxy_pass http://$pod_ip:4444/session/$session_id/$tests_request;\r\n\n \ {{- end }}\r\n }\r\n location ~ /session/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)-(?<session_id>[a-z0-9-]+)\n {\r\n proxy_http_version 1.1;\r\n proxy_pass http://callisto/api/v1/session/$pod_name;\\r\\n\n \ }\r\n location /session {\r\n proxy_http_version 1.1;\r\n proxy_pass http://callisto/api/v1/session;\\r\\n\n \ }\r\n location ~ /vnc/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)-(?<session_id>[a-z0-9-]+)\n {\r\n proxy_set_header Upgrade $http_upgrade;\r\n proxy_set_header Connection\n $connection_upgrade;\r\n proxy_set_header Host $host;\r\n proxy_buffering\n off;\r\n proxy_http_version 1.1;\r\n proxy_pass http://$pod_ip:5900;\r\n }\r\n\n \ location ~ /ws/logs/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)-(?<session_id>[a-z0-9-]+)\n {\r\n proxy_set_header Upgrade $http_upgrade;\r\n proxy_set_header Connection\n $connection_upgrade;\r\n proxy_set_header Host $host;\r\n proxy_buffering\n off;\r\n proxy_http_version 1.1;\r\n proxy_pass http://callisto/api/v1/logs/$pod_name;\\r\\n\n \ }\r\n location / {\r\n # selenoid-ui\r\n proxy_set_header Upgrade $http_upgrade;\r\n\n \ proxy_set_header Connection $connection_upgrade;\r\n proxy_set_header Host\n $host;\r\n proxy_buffering off;\r\n proxy_http_version 1.1;\r\n proxy_pass\n http://selenoid/;\\r\\n }\r\n # We don't support video playback in Selenoid-UI\r\n\n \ #location ~ /callisto/video {\r\n # return 200 '{}';\r\n #}\r\n location ~\n /callisto/(.) {\r\n proxy_http_version 1.1;\r\n proxy_pass http://callisto/api/v1/$1;\\r\\n\n \ }\r\n location /stub_status {\r\n stub_status;\r\n access_log off;\r\n\n \ allow all;\r\n }\r\n location /health {\r\n access_log off;\r\n\r\n return\n 200;\r\n }\r\n}\r\n"": parse error at (callisto/templates/callisto-nginx-configmap.yaml:1): unexpected "\" in template clause

Selenoid images with Firefox can't create a new driver instance

Hi!
I decided to use Callisto as API for creating many browsers and use sessionID for tests run.
I deployed 3 Callisto's exemplars with Chrome and all is great.
Although exemplar with Firefox return next error:

--- x11vnc loop: 1 ---
08:23:41.972 INFO - Launching a standalone Selenium Server
08:23:41.996 INFO - Java: Oracle Corporation 25.151-b12
08:23:41.996 INFO - OS: Linux 5.3.18-lp152.23-default amd64
--- x11vnc loop: waiting for: 51
08:23:42.069 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
PORT=5900
08:23:42.273 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
08:23:42.273 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
08:23:42.273 INFO - Driver class not found: com.opera.core.systems.OperaDriver
08:23:42.273 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
08:23:42.274 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
08:23:42.275 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
08:23:42.275 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
08:23:42.387 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
08:23:42.388 INFO - Selenium Server is up and running
08:23:46.639 INFO - Executing: [new session: Capabilities [{browser=Firefox}]])
08:23:46.671 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: The best matching driver provider Firefox/Marionette driver can't create a new driver instance for Capabilities [{browser=Firefox}]
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'browser-qjvqs', ip: '10.42.7.9', os.name: 'Linux', os.arch: 'amd64', os.version: '5.3.18-lp152.23-default', java.version: '1.8.0_151'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:204)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: The best matching driver provider Firefox/Marionette driver can't create a new driver instance for Capabilities [{browser=Firefox}]

Requst example for creating browser:

POST http://callisto.local/session

{
  "desiredCapabilities": {
    "browser": "firefox"
  }
}

I use default images from Helm-chart.
Can you help me find the way to solve this?

Instabilities with browsers under the load (300-600 tests in parallel)

Hi! I have been testing Callisto starting from the last week.

Issue description: there are random containers/browsers freezes -> hanging pods , reproduced for running a lot of tests in parallel

3 types of errors:

  1. WebDriverError: Pod does not have an IP (not critical, happens very seldom)

<center><h1>500 Internal Server Error</h1></center>
 <hr><center>nginx/1.17.2</center>
 </body>

Fixed after increasing resources for nginx

  1. The most critical one, happens quite often but randomly, impacts on pipeline stability. This log was found in hanging browser pods:
[91:124:0417/171003.763223:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 376: Permission denied (13)
[91:124:0417/171004.767769:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 380: Permission denied (13)
[91:124:0417/171005.367275:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 384: Permission denied (13)
[91:124:0417/171005.594971:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 389: Permission denied (13)
[91:124:0417/171006.003322:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 393: Permission denied (13)
[91:124:0417/171006.581433:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 397: Permission denied (13)

Didn't find smth useful for callisto pod

Our configuration:

  1. 300-600 tests in parallel
  2. GCP GKE cluster
    Spec:
initial_node_count = 1

  autoscaling {
    min_node_count = 1
    max_node_count = 200
  }

  node_config {
    preemptible  = true
    machine_type = "n2-highcpu-8"
  1. Callisto setup: values.yaml
# Unique ID of callisto instance
instanceID: 'unknown'

rbac:
  create: true

callisto:
...  
  replicas: 1
  resources:
    limits:
      cpu: "500m"
      memory: "512Mi"
    requests:
      cpu: "250m"
      memory: "128Mi"
  logLevel: "DEBUG"
  service:
    type: "LoadBalancer"
 
  browser:
    name: "chrome"
    chromeImage: "selenoid/chrome:81.0"
    resources:
      limits:
        cpu: "1000m"
        memory: "1024Mi"
      requests:
        cpu: "500m"
        memory: "512Mi"
...
    env:
    - name: TZ
      value: 'UTC'
    - name: ENABLE_VNC
      value: 'true'

nginx:
  image:
    registry:
    repository: nginx
    tag: '1.17.2-alpine'
    pullPolicy: Always

  prometheusExporter:
    image:
      registry:
      repository: nginx/nginx-prometheus-exporter
      tag: '0.4.0'
      pullPolicy: Always
  replicas: 2
  minReadySeconds: 15
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  resources:
    requests:
      cpu: "2000m"
      memory: "1024Mi"
  
...

We also tested Callisto for small suites (30-45) in parallel and it works fine.
Did you face the same issue or any ideas how to fix ?

Thanks in advance!

Host not found when coredns used

In callisto-nginx-65f9c5c9bf-5plk2 logs:

2020/08/11 15:13:24 [emerg] 1#1: host not found in resolver "kube-dns.kube-system.svc.cluster.local" in /etc/nginx/conf.d/callisto-nginx.conf:17
nginx: [emerg] host not found in resolver "kube-dns.kube-system.svc.cluster.local" in /etc/nginx/conf.d/callisto-nginx.conf:17
When coredns used in cluster.

In this case I suggest to parametrize reslover in nginx.conf and get it value outside to values.yaml

diff --git a/files/callisto-nginx.conf b/files/callisto-nginx.conf
index ace2d72..62d4991 100644
--- a/files/callisto-nginx.conf
+++ b/files/callisto-nginx.conf
@@ -14,7 +14,7 @@ access_log off;

server {
listen 80 default_server;
- resolver kube-dns.kube-system.svc.cluster.local;
+ resolver {{ .Values.nginx.resolver }};
access_log /var/log/nginx/access.log custom;

proxy_connect_timeout 600;
diff --git a/values.yaml b/values.yaml
index 5cde516..54ce68b 100644
--- a/values.yaml
+++ b/values.yaml
@@ -66,6 +66,8 @@ nginx:
tag: '1.17.2-alpine'
pullPolicy: Always

+ resolver: coredns.kube-system.svc.cluster.local
+
prometheusExporter:
image:
registry:

diff --git a/files/callisto-nginx.conf b/files/callisto-nginx.conf
index ace2d72..62d4991 100644
--- a/files/callisto-nginx.conf
+++ b/files/callisto-nginx.conf
@@ -14,7 +14,7 @@ access_log off;

server {
listen 80 default_server;
- resolver kube-dns.kube-system.svc.cluster.local;
+ resolver {{ .Values.nginx.resolver }};
access_log /var/log/nginx/access.log custom;

proxy_connect_timeout 600;
diff --git a/values.yaml b/values.yaml
index 5cde516..54ce68b 100644
--- a/values.yaml
+++ b/values.yaml
@@ -66,6 +66,8 @@ nginx:
tag: '1.17.2-alpine'
pullPolicy: Always

+ resolver: coredns.kube-system.svc.cluster.local
+
prometheusExporter:
image:
registry:

No browsers to run from create session

Hello!

I've installed Callisto from this chart and can't create a new session manually. There isn't any browser.
image
Yet the config has

  browser:
    name: "chrome"
    chromeImage: "myregistry/vnc:chrome_119.0"
    firefoxImage: "myregistry/vnc:firefox_118.0"
    edgeImage: "myregistry/edge:119.0"
    firefoxWebdriverPath: "/wd/hub"  # because selenoid runs inside firefox container

Can you please advice how to fix this?

browser pods are not deleting..

We are observing that some browser pods are not deleting... they are stuck in RUNNING state in kubernetes

Is there any configuration available to delete pods after some time?

How to use the available sessionID

hi, @srntqn

I have created a session ID by using
curl -vvv http://callisto.local/session -d '{"desiredCapabilities":{"browserName":"chrome"}}'
and now I have got a session ID which launch a browser in a pod.

How can I send requests to the browser in created pod?
For example, I want to send visit google.com commands to the browser, How Can I do it?
I know that following the below method I can control the browser, but this method will create a new session, I want to use the available session to control the browser, How can I do that?
image

Any configuration available for browsers should wait till instances are available

Currently we deployed callisto in kubernetes. We are facing one issue that
suppose if all the worker node resources are exhausted and still there are some more browser pods are pending for scheduling
then we are observing that by that time of new worker nodes comes up

  1. pods are not waiting in pending state, but expectation is they should be in pending state till new nodes comes up.
  2. they are waiting for 20sec and scheduling in already exhausted nodes, hence those nodes are restarting

note: we are using t3.xlarge instance types for worker nodes but planning to move to c5.xlarge
Is there any configuration for browser pods to wait till new worker nodes comesup?

Can not access browser vnc session

Hey - first of all: great job ๐Ÿ‘
I have a problem with accessing VNC session in selenoid UI.
When I click the unlock button:
Zrzut ekranu 2022-02-21 o 10 46 37

the request to:
https://myCallistoDeployment.com/vnc/browser-h6hjc-100.98.130.158-57ebafae17e4bfeaffc92f1e897f8a03

crashes with 502 Bad Gateway.

My nginx config is as follows:

  server {{ template "callisto.name" . }}:8080;
}
upstream selenoid {
  server {{ template "callisto.name" . }}-selenoid-ui:8000;
}
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

log_format custom '$remote_addr [$time_iso8601] $scheme "$request" $request_time $status "$http_user_agent" $upstream_response_time "$host" $upstream_addr "{{ .Values.instanceID }}"';
access_log off;

server {
  listen 80 default_server;
  resolver {{ .Values.nginx.resolver }};
  access_log /var/log/nginx/access.log custom;

  proxy_connect_timeout       600;
  proxy_send_timeout          600;
  proxy_read_timeout          600;
  send_timeout                600;

  error_page 504 /504.html;
    location /504.html {
    return 504 '{"error": "504", "message": "Gateway Timeout at Callisto nginx. Probably the browser has crashed."}';
  }
  error_page 503 /503.html;
    location /503.html {
    return 503 '{"error": "503", "message": "Service Temporarily Unavailable at Callisto nginx. Probably the Kubernetes API is unavailable."}';
  }
  error_page 502 /502.html;
    location /502.html{
    return 502 '{"error": "502", "message": "Bad Gateway at Callisto nginx. Probably the container for the browser is not running."}';
  }
  location ~ /session/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)-(?<session_id>[a-z0-9-]+)/(?<tests_request>.+) {
    proxy_http_version 1.1;
    proxy_connect_timeout       30;
    proxy_send_timeout          30;
    proxy_read_timeout          30;
    send_timeout                30;
    client_max_body_size        8m;
    proxy_request_buffering off; # disable request buffering on disk
    {{- if eq .Values.callisto.browser.name "firefox" }}
    proxy_pass http://$pod_ip:4444{{ .Values.callisto.browser.firefoxWebdriverPath }}/session/$session_id/$tests_request;
    {{- else }}
    proxy_pass http://$pod_ip:4444/session/$session_id/$tests_request;
    {{- end }}
  }
  location ~ /session/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)-(?<session_id>[a-z0-9-]+) {
    proxy_http_version 1.1;
    proxy_pass http://callisto/api/v1/session/$pod_name;
  }
  location /session {
    proxy_http_version 1.1;
    proxy_pass http://callisto/api/v1/session;
  }
  location ~ /vnc/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)-(?<session_id>[a-z0-9-]+) {
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Host $host;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_pass http://$pod_ip:5900;
  }
  location ~ /ws/logs/(?<pod_name>browser-[a-z0-9]+)-(?<pod_ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)-(?<session_id>[a-z0-9-]+) {
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Host $host;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_pass http://callisto/api/v1/logs/$pod_name;
  }
  location / {
    # selenoid-ui
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Host $host;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_pass http://selenoid/;
  }
  # We don't support video playback in Selenoid-UI
  location ~ /callisto/video {
    return 200 '{}';
  }
  location ~ /callisto/(.*) {
    proxy_http_version 1.1;
    proxy_pass http://callisto/api/v1/$1;
  }
  location /stub_status {
      stub_status;
      access_log off;
      allow all;
  }
  location /health {
    access_log off;

    return 200;
  }
}

webdriver.Remote Ingress 404

Hello.

When we use something like:

driver = webdriver.Remote(
    command_executor="http://callisto-ingress-domain",
)

We get 404 error:

Traceback (most recent call last):
  File "main.py", line 13, in <module>
    driver = webdriver.Remote(
  File "venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 208, in check_response
    raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.19.2</center>
</body>
</html>

This is because of ingress.
When selenium webdriver send request, it does not use HOST header.
Selenium webdriver just resolve hostname to ip and then working with it.
Dump of headers sent by selenium to ingress:

    "headers": {
        "host": "127.0.0.1:8080",
        "accept-encoding": "identity",
        "content-length": "84",
        "accept": "application/json",
        "content-type": "application/json;charset=UTF-8",
        "user-agent": "selenium/3.141.0 (python mac)"
    },

because of this, Ingress will not working. Ingress need a hostname to decide route and destination.
Are you using Ingress in your environment? Or just nodePort?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.