aerokube / cm

Configuration manager for Aerokube products
https://aerokube.com/cm/latest/
Apache License 2.0
120 stars 31 forks source link

CM start selenoid does not enable vnc, even I have enable the parameter --vnc #135

Closed liulirun closed 6 years ago

liulirun commented 6 years ago

I am using docker. Ubuntu LTS latest version on a VM

host machine: Win7, IP: 172.22.9.113 ( this is important, because the logs below will show this ip, instead of VM ip). VM: Ubuntu LTS latest version, IP : 172.22.8.221 . using bridge mode connect to host machine Win7

  1. install cm by curl -s aerokube.com/cm/bash | bash on
  2. start ./cm selenoid start --vnc

when the container is running: [{"id":"57f93dc1ba5da28df6c67de47ab3a9c8","container":"5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c","containerInfo":{"id":"5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c","ip":"172.17.0.4"},"vnc":false,"screen":"1920x1080x24","caps":{"browserName":"chrome","version":"","screenResolution":"1920x1080x24","enableVNC":false,"enableVideo":false,"videoName":"","videoScreenSize":"1920x1080","videoFrameRate":0,"name":"","timeZone":"","containerHostname":"","applicationContainers":"","hostsEntries":"","labels":"","selenoid:options":null}},

the value of vnc is false, which I think it should be true.

images I have in local: REPOSITORY TAG IMAGE ID CREATED SIZE aerokube/selenoid 1.5.1 854ce629f441 29 hours ago 11.1 MB aerokube/ggr latest-release 546a0f52b1fe 35 hours ago 10.2 MB selenoid/video-recorder latest 25d89b69064d 13 days ago 30.4 MB selenoid/vnc opera_51.0 da08e90f170c 13 days ago 884 MB selenoid/vnc firefox_58.0 1394311f2acb 3 weeks ago 896 MB selenoid/vnc chrome_64.0 02b8a04ad1f1 3 weeks ago 886 MB selenoid/vnc firefox_57.0 7b58367c4cdd 5 weeks ago 820 MB selenoid/vnc opera_50.0 a4c9bab6f3bb 6 weeks ago 889 MB aerokube/selenoid-ui 1.5.3 4f02dd7051db 8 weeks ago 7.53 MB selenoid/vnc chrome_63.0 ace77ff4348c 2 months ago 811 MB

I run docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 71c0a9ced8a5 aerokube/selenoid-ui:1.5.3 "/selenoid-ui --se..." 2 hours ago Up 2 hours 0.0.0.0:8080->8080/tcp selenoid-ui 024d534f965f aerokube/selenoid:1.5.1 "/usr/bin/selenoid..." 2 hours ago Up 2 hours 0.0.0.0:4444->4444/tcp selenoid

how i could override the value to selenoid/vnc , using cm? Since we have bunch of selenoid/vnc containers in local

Also this is the docker logs host machine: Win7, IP: 172.22.9.113 ( this is important, because the logs below will show this ip, instead of VM ip). VM: Ubuntu LTS latest version, IP : 172.22.8.221 . using bridge mode connect to host machine Win7

grid_user@ubuntu2:~$ docker logs 024d534f965f 2018/02/21 22:26:39 [-] [INIT] [Loading configuration files...] 2018/02/21 22:26:39 [-] [INIT] [Loaded configuration from /etc/selenoid/browsers.json] 2018/02/21 22:26:39 [-] [INIT] [Using default containers log configuration because of: read error: open config/container-logs.json: no such file or directory] 2018/02/21 22:26:39 [-] [INIT] [Timezone: Local] 2018/02/21 22:26:39 [-] [INIT] [Video Dir: /opt/selenoid/video] 2018/02/21 22:26:39 [-] [INIT] [Listening on :4444] 2018/02/21 22:27:09 [-] [NEW_REQUEST] [unknown] [172.22.9.113] <-- this is quite odd, should not this be 172.22.8.221? I am not sure if problem is caused by this 2018/02/21 22:27:09 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.22.9.113] 2018/02/21 22:27:09 [0] [LOCATING_SERVICE] [chrome] [] 2018/02/21 22:27:09 [-] [DEFAULT_VERSION] [Using default version: 64.0] 2018/02/21 22:27:09 [0] [USING_DOCKER] [chrome] [64.0] 2018/02/21 22:27:09 [0] [CREATING_CONTAINER] [selenoid/vnc:chrome_64.0] 2018/02/21 22:27:09 [-] [NEW_REQUEST] [unknown] [172.22.9.113] 2018/02/21 22:27:09 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.22.9.113] 2018/02/21 22:27:09 [1] [LOCATING_SERVICE] [chrome] [] 2018/02/21 22:27:09 [-] [DEFAULT_VERSION] [Using default version: 64.0] 2018/02/21 22:27:09 [1] [USING_DOCKER] [chrome] [64.0] 2018/02/21 22:27:09 [1] [CREATING_CONTAINER] [selenoid/vnc:chrome_64.0] 2018/02/21 22:27:09 [1] [STARTING_CONTAINER] [selenoid/vnc:chrome_64.0] [5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c] 2018/02/21 22:27:09 [0] [STARTING_CONTAINER] [selenoid/vnc:chrome_64.0] [50080437cbae5750c10b518911c6cf0bb8ea1ff47d302a03e431d28ed5ccba7a] 2018/02/21 22:27:10 [1] [CONTAINER_STARTED] [selenoid/vnc:chrome_64.0] [5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c] [0.64s] 2018/02/21 22:27:10 [0] [CONTAINER_STARTED] [selenoid/vnc:chrome_64.0] [50080437cbae5750c10b518911c6cf0bb8ea1ff47d302a03e431d28ed5ccba7a] [0.64s] 2018/02/21 22:27:15 [0] [SERVICE_STARTED] [selenoid/vnc:chrome_64.0] [50080437cbae5750c10b518911c6cf0bb8ea1ff47d302a03e431d28ed5ccba7a] [5.43s] 2018/02/21 22:27:15 [0] [PROXY_TO] [50080437cbae5750c10b518911c6cf0bb8ea1ff47d302a03e431d28ed5ccba7a] [http://172.17.0.3:4444/] 2018/02/21 22:27:15 [0] [SESSION_ATTEMPTED] [http://172.17.0.3:4444/] [1] 2018/02/21 22:27:15 [1] [SERVICE_STARTED] [selenoid/vnc:chrome_64.0] [5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c] [5.46s] 2018/02/21 22:27:15 [1] [PROXY_TO] [5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c] [http://172.17.0.4:4444/] 2018/02/21 22:27:15 [1] [SESSION_ATTEMPTED] [http://172.17.0.4:4444/] [1] 2018/02/21 22:27:30 [0] [SESSION_CREATED] [6b9b2ae61eefe27a0300b94ac082eb8d] [1] [20.98s] 2018/02/21 22:27:30 [1] [SESSION_CREATED] [57f93dc1ba5da28df6c67de47ab3a9c8] [1] [20.96s] 2018/02/21 22:27:42 [6] [CONTAINER_LOGS] [&{5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c 172.17.0.4}] 2018/02/21 22:29:00 [2136] [SESSION_DELETED] [57f93dc1ba5da28df6c67de47ab3a9c8] 2018/02/21 22:29:00 [1] [REMOVING_CONTAINER] [5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c] 2018/02/21 22:29:01 [6] [CONTAINER_LOGS_DISCONNECTED] [57f93dc1ba5da28df6c67de47ab3a9c8] 2018/02/21 22:29:02 [2137] [SESSION_NOT_FOUND] [57f93dc1ba5da28df6c67de47ab3a9c8] 2018/02/21 22:29:02 [1] [CONTAINER_REMOVED] [5172a9b726799e649b8ad9a73113e81bea461a178306276f29fa8d2848697d2c] 2018/02/21 22:29:25 [2165] [SESSION_DELETED] [6b9b2ae61eefe27a0300b94ac082eb8d] 2018/02/21 22:29:25 [0] [REMOVING_CONTAINER] [50080437cbae5750c10b518911c6cf0bb8ea1ff47d302a03e431d28ed5ccba7a] 2018/02/21 22:29:26 [0] [CONTAINER_REMOVED] [50080437cbae5750c10b518911c6cf0bb8ea1ff47d302a03e431d28ed5ccba7a]

=======================================================

Another question I have is actually about selenoid -- not sure if I should post it here:

I am running selenoid ( not CM) like this: docker run -d --name selenoid --vnc -e DOCKER_API_VERSION=1.35 -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /home/grid_user/config/:/etc/selenoid/:ro aerokube/selenoid:latest-release -conf /etc/selenoid/browsers.json -limit 10 -retry-count 3 -session-attempt-timeout 1800s -session-delete-timeout 1800s -timeout 15m

then the parameter --vnc is problematic and flag is not supported. How I could start selenoid with VNC enabled, if I do not want to specify in the capability, only want to match the "vnc":true in CM

Thank you for the kind reply

vania-pooh commented 6 years ago

To work with VNC you have to: 1) Have VNC images (this is delivered via cm with --vnc flag). That's ok according to your logs. 2) Actually enable VNC by adding enableVNC: true capability to the test. I think this is missing now. Do you have this capability in tests?

New request log entries always contain remote user IP (e.g. yours) - not browser container IP.

liulirun commented 6 years ago

Actually enable VNC by adding enableVNC: true capability to the test. I think this is missing now. Do you have this capability in tests?

--no, I do not have them. Will add it.

Thank you, I will close the bug