aerokube / moon

Browser automation solution for Kubernetes and Openshift supporting Selenium, Playwright, Puppeteer and Cypress

Home Page:http://aerokube.com/moon/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Openshift - VNC DISCONNECTED

muratme opened this issue · comments

Couldn't find the root cause of the following;

VNC Disconnected on Browser Screen and Pods have the following error logs.

Moon 2.5.0
RedHat Openshift
Kubernetes v1.23.5+012e945

Chrome Network

  • HTTP 101 : ws://moon.aerokube.local.apps.company.com/ws/vnc/chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76
  • HTTP 101 : ws://moon.aerokube.local.apps.company.com/ws/logs/chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76
2023/05/16 12:14:51 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: creating config map
2023/05/16 12:14:51 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: config map created
2023/05/16 12:14:51 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: creating pod
2023/05/16 12:14:51 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: pod created
2023/05/16 12:14:51 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: waiting pod
2023/05/16 12:14:55 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: pod is up
2023/05/16 12:14:55 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: waiting driver
2023/05/16 12:14:55 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: driver is up
2023/05/16 12:14:56 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: session created: 5.103s
2023/05/16 12:15:00 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: proxy from vnc: <nil>
2023/05/16 12:15:25 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: connect vnc: dial tcp 10.60.9.99:5900: connect: connection refused
2023/05/16 12:15:41 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: connect vnc: dial tcp 10.60.9.99:5900: connect: connection refused
2023/05/16 12:18:51 moon-6595754c5f-zqbvr: moon: chrome-112-0-5615-165-5-23578b6f-ffc1-4fed-aa18-0064452f8f76: connect vnc: dial tcp 10.60.9.99:5900: connect: connection refused

Config

vnc-server:
      repository: quay.io/aerokube/vnc-server
      resources:
        limits:
          cpu: 200m
          memory: 128Mi
        requests:
          cpu: 100m
          memory: 128Mi

x-server:
      repository: quay.io/aerokube/xvfb-server
      resources:
        limits:
          cpu: 200m
          memory: 128Mi
        requests:
          cpu: 100m
          memory: 128Mi

BrowserSet

apiVersion: moon.aerokube.com/v1
kind: BrowserSet
metadata:
  annotations:
    meta.helm.sh/release-name: moon
    meta.helm.sh/release-namespace: moon-dev
  creationTimestamp: "2023-05-04T07:59:59Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: Helm
  name: default
  namespace: moon-dev
  resourceVersion: "835680657"
  uid: 3d688301-829b-235f-bd68-4as46e76074c
spec:
  cypress:
    chrome:
      repository: quay.io/browsers/cypress-chrome
    chromium:
      repository: quay.io/browsers/cypress-chromium
    edge:
      repository: quay.io/browsers/cypress-edge
    electron:
      repository: quay.io/browsers/cypress-electron
    firefox:
      repository: quay.io/browsers/cypress-firefox
  devtools:
    chrome:
      repository: quay.io/browser/devtools-google-chrome-stable
  playwright:
    chrome:
      repository: quay.io/browser/playwright-chrome
    chromium:
      repository: quay.io/browser/playwright-chromium
    firefox:
      repository: quay.io/browser/playwright-firefox
    webkit:
      repository: quay.io/browser/playwright-webkit
  selenium:
    MicrosoftEdge:
      default: 112.0.1722.58-5
      repository: quay.io/browser/microsoft-edge-stable
    chrome:
      default: 112.0.5615.165-5
      repository: quay.io/browser/google-chrome-stable
    firefox:
      default: 112.0.2-4
      repository: quay.io/browser/firefox-mozilla-build
    opera:
      default: 98.0.4759.15-6
      repository: quay.io/browser/opera-stable
    safari:
      default: 15.0-0
      repository: quay.io/browser/safari

@aandryashin thx for quick response, vnc-server logs

17/05/2023 08:01:59 passing arg to libvncserver: -passwd
17/05/2023 08:01:59 passing arg to libvncserver: -rfbport
17/05/2023 08:01:59 passing arg to libvncserver: 5900
17/05/2023 08:01:59 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 11
17/05/2023 08:01:59
17/05/2023 08:01:59 wait_for_client: WAIT:0
17/05/2023 08:01:59
17/05/2023 08:01:59 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/2560
17/05/2023 08:01:59
17/05/2023 08:01:59 Listening for VNC connections on TCP port 5900
17/05/2023 08:01:59 Listening for VNC connections on TCP6 port 5900
17/05/2023 08:01:59 listen6: bind: Address already in use
17/05/2023 08:01:59 Not listening on IPv6 interface.
17/05/2023 08:01:59
The VNC desktop is: moon-6777d5bd8d-8xg8c:0
PORT=5900

This is how it seems;

oc-selenoid

Problem - Namespace ("moon-dev") is created manually, so moon creates pods on another namespace ("moon").
Solution - Remove existing namespace ("moon-dev") and following the steps so helm can create namespace : ("moon")

@muratme our Helm chart is parameterized by namespace name (all charts actually do), so reinstalling everything from scratch should just work.