docker-headless-vnc-container
docker-headless-vnc-container copied to clipboard
Running on minikube causes problems
Hi,
I'm trying to run a version of consol/ubuntu-xfce-vnc container locally via minikube, but the container seems to produce some errors. I can connect to it and it asks me for the password, but the screen stays black.

USER_ID: 1000, GROUP_ID: 0
nss_wrapper location: /usr/lib/libnss_wrapper.so
------------------ update chromium-browser.init ------------------
... set window size 1280 x 1024 as chrome window size!
------------------ change VNC password ------------------
Warning: could not find self.pem
Using local websockify at /headless/noVNC/utils/websockify/run
Starting webserver and WebSockets proxy on port 6901
usage: vncserver [:<number>] [-name <desktop-name>] [-depth <depth>]
[-geometry <width>x<height>]
[-pixelformat rgbNNN|bgrNNN]
[-fp <font-path>]
[-fg]
[-autokill]
[-noxstartup]
[-xstartup <file>]
<Xvnc-options>...
vncserver -kill <X-display>
vncserver -list
rm: cannot remove '/tmp/.X11-unix': Operation not permitted
remove old vnc locks to be a reattachable container
xauth: file /headless/.Xauthority does not exist
Navigate to this URL:
WebSocket server settings:
- Listen on :6901
- Flash security policy server
- Web server. Web root: /headless/noVNC
- No SSL/TLS support (no cert file)
- proxying from :6901 to localhost:5901
http://daedalus-6fbc5fc68-vpz8r:6901/vnc.html?host=daedalus-6fbc5fc68-vpz8r&port=6901
Press Ctrl-C to exit
New 'daedalus-6fbc5fc68-vpz8r:1 ()' desktop is daedalus-6fbc5fc68-vpz8r:1
Creating default startup script /headless/.vnc/xstartup
Creating default config /headless/.vnc/config
Starting applications specified in /headless/.vnc/xstartup
Log file is /headless/.vnc/daedalus-6fbc5fc68-vpz8r:1.log
------------------ startup of Xfce4 window manager ------------------
xset: unable to open display ""
xset: unable to open display ""
xset: unable to open display ""
Unrecognized option: --replace
use: X [:<display>] [option]
-a # default pointer acceleration (factor)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
-br create root window with black background
+bs enable any backing store support
-bs disable any backing store support
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-nocursor disable the cursor
-core generate core dump on fatal error
-displayfd fd file descriptor to write display number to when ready to connect
-dpi int screen resolution in dots per inch
-dpms disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fc string cursor font
-fn string default font name
-fp string default font path
-help prints message with these options
+iglx Allow creating indirect GLX contexts
-iglx Prohibit creating indirect GLX contexts (default)
-I ignore all remaining arguments
-ld int limit data space to N Kb
-lf int limit number of open files to N
-ls int limit stack space to N Kb
-nolock disable the locking mechanism
-maxclients n set maximum number of clients (power of two)
-nolisten string don't listen on protocol
-listen string listen on protocol
-noreset don't reset after last client exists
-background [none] create root window with no background
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-retro start with classic stipple and cursor
-s # screen-saver timeout (minutes)
-seat string seat to run on
-t # default pointer threshold (pixels/t)
-terminate terminate at server reset
-to # connection time out
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking
-wm WhenMapped default backing-store
-wr create root window with white background
-maxbigreqsize set maximal bigrequest size
+xinerama Enable XINERAMA extension
-xinerama Disable XINERAMA extension
-dumbSched Disable smart scheduling, enable old behavior
-schedInterval int Set scheduler interval in msec
-sigstop Enable SIGSTOP based startup
+extension name Enable extension
-extension name Disable extension
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
enable/disable accessx key sequences
-ardelay set XKB autorepeat delay
-arinterval set XKB autorepeat interval
Device Dependent Usage
-modulepath paths specify the module search path
-logfile file specify a log file name
-configure probe for devices and write an xorg.conf
-showopts print available options for all installed drivers
-config file specify a configuration file, relative to the
xorg.conf search path, only root can use absolute
-configdir dir specify a configuration directory, relative to the
xorg.conf.d search path, only root can use absolute
-verbose [n] verbose startup messages
-logverbose [n] verbose log messages
-quiet minimal startup messages
-pixmap24 use 24bpp pixmaps for depth 24
-pixmap32 use 32bpp pixmaps for depth 24
-fbbpp n set bpp for the framebuffer. Default: 8
-depth n set colour depth. Default: 8
-gamma f set gamma value (0.1 < f < 10.0) Default: 1.0
-rgamma f set gamma value for red phase
-ggamma f set gamma value for green phase
-bgamma f set gamma value for blue phase
-weight nnn set RGB weighting at 16 bpp. Default: 565
-layout name specify the ServerLayout section name
-screen name specify the Screen section name
-keyboard name specify the core keyboard InputDevice name
-pointer name specify the core pointer InputDevice name
-nosilk disable Silken Mouse
-flipPixels swap default black/white Pixel values
-disableVidMode disable mode adjustments with xvidtune
-allowNonLocalXvidtune allow xvidtune to be run as a non-local client
-allowMouseOpenFail start server even if the mouse can't be initialized
-ignoreABI make module ABI mismatches non-fatal
-isolateDevice bus_id restrict device resets to bus_id (PCI only)
-version show the server version
-showDefaultModulePath show the server default module path
-showDefaultLibPath show the server default library path
-novtswitch don't automatically switch VT at reset & exit
-sharevts share VTs with another X server
vtXX use the specified VT number
-keeptty don't detach controlling tty (for debugging only)
(EE)
Fatal server error:
(EE) Unrecognized option: --replace
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE)
/usr/bin/startxfce4: Starting X server
------------------ VNC environment started ------------------
VNCSERVER started on DISPLAY=
=> connect via VNC viewer with 172.17.0.5:5901
noVNC HTML client started:
=> connect via http://172.17.0.5:6901/?password=...
------------------ /headless/.vnc/*.log ------------------
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension GLX
Fri Mar 23 11:39:37 2018
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
xinit: giving up
xinit: unable to connect to X server: Cannot assign requested address
xinit: server error
Connection logs
172.17.0.1 - - [23/Mar/2018 11:49:10] code 404, message File not found
172.17.0.1 - - [23/Mar/2018 11:49:11] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Mar/2018 11:49:11] 172.17.0.1: Version hybi-13, base64: 'False'
172.17.0.1 - - [23/Mar/2018 11:49:11] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Mar/2018 11:49:11] connecting to: localhost:5901
Fri Mar 23 11:49:11 2018
Connections: accepted: 127.0.0.1::40440
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VncAuth(2)
Fri Mar 23 11:49:52 2018
VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888
VNCSConnST: Client pixel format depth 24 (32bpp) little-endian rgb888
172.17.0.1 - - [23/Mar/2018 11:55:29] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Mar/2018 11:55:29] 172.17.0.1: Version hybi-13, base64: 'False'
172.17.0.1 - - [23/Mar/2018 11:55:29] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Mar/2018 11:55:29] connecting to: localhost:5901
Fri Mar 23 11:55:28 2018
Connections: closed: 127.0.0.1::40440 (Clean disconnection)
EncodeManager: Framebuffer updates: 1
EncodeManager: Tight:
EncodeManager: Solid: 1 rects, 1.31072 Mpixels
EncodeManager: 16 B (1:327681 ratio)
EncodeManager: Total: 1 rects, 1.31072 Mpixels
EncodeManager: 16 B (1:327681 ratio)
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Fri Mar 23 11:55:29 2018
Connections: accepted: 127.0.0.1::41016
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VncAuth(2)
172.17.0.1: ignoring socket not ready
172.17.0.1: ignoring socket not ready
172.17.0.1: ignoring socket not ready
172.17.0.1: ignoring socket not ready
172.17.0.1: ignoring socket not ready
172.17.0.1 - - [23/Mar/2018 11:55:47] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [23/Mar/2018 11:55:47] 172.17.0.1: Version hybi-13, base64: 'False'
172.17.0.1 - - [23/Mar/2018 11:55:47] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [23/Mar/2018 11:55:47] connecting to: localhost:5901
Fri Mar 23 11:55:46 2018
Connections: closed: 127.0.0.1::41016 (Clean disconnection)
EncodeManager: Framebuffer updates: 0
EncodeManager: Total: 0 rects, 0 pixels
EncodeManager: 0 B (1:-nan ratio)
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Here is the link to my Dockerfile: https://github.com/khwerhahn/cardano/blob/master/daedalus/Dockerfile
@khwerhahn is the problem still present?
yes it is.
Logging out $DISPLAY returns different results in docker and running in kubernetes. When launching the container locally with docker the output is:
Display is :1
and in k8s:
Display is
This could be the reason, why the screen is black. If anybody has some tips on how to fix this in k8s pls let me know.
@khwerhahn ok can you send me also the kubernetes config? So that I can reproduce the Problem locally
I'm running latest minikube version. You can find the k8s files here. They all start with "Daedalus" https://github.com/khwerhahn/cardano/tree/master/k8s
Config:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: REDACTED
server: https://192.168.2.200:6443
name: kubernetes
- cluster:
certificate-authority: /Users/khwhahn/.minikube/ca.crt
server: https://192.168.99.100:8443
name: minikube
contexts:
- context:
cluster: kubernetes
user: kubernetes-admin
name: kubernetes-admin@kubernetes
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: kubernetes-admin
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
- name: minikube
user:
client-certificate: /Users/khwhahn/.minikube/client.crt
client-key: /Users/khwhahn/.minikube/client.key
@s1hofmann please follow up here :wink:
I am seeing a similar issue when running this container on single-node kubernetes (through docker desktop for mac). The vnc service fails to start with: xhost: unable to open display ":1"
Update: kubernetes wasn't the issue here, so please disregard this post