This is confusing, but websockify opened different ports than you think. The 5961 is I believe destination port, it is listening on different one most likely. Check with lsof, the port range is hardcoded in our codebase I believe. Yeah:
lib/ws_proxy.rb 12: PORTS = 5910..5930 So it will be listening on one of these. LZ On Mon, May 1, 2017 at 9:27 PM, laxman veeturi <[email protected]> wrote: > I added vmware vsphere 6.5 cluster as compute resource in foreman. I could > create VM and destroy them through foreman. But when I tried to open Novnc > console in foreman I got below error.Please help me > > I'm using self signed certificates came from foreman installation. > > I configured firewall setting in esxi 6.5 host same a described in foreman > 1.14.3 documentation > > > <https://lh3.googleusercontent.com/-l0h4-S4o2YE/WQeL8BIgAWI/AAAAAAAADoQ/6Kpb7tuvo-0z0oaOSL3a9REbztqAb-pOwCLcB/s1600/foreman_novnc_error.PNG> > > I got confuse that do i need to check telnet from foreman server to esxi > host. please help me. > I attached error picture. > > esxi host fonfiguration as below: > > [root@esxi00:~] cat /etc/vmware/firewall/vnc.xml > <ConfigRoot> > <service id='0032'> > <id>VNC</id> > <rule id = '0000'> > <direction>inbound</direction> > <protocol>tcp</protocol> > <porttype>dst</porttype> > <port> > <begin>5901</begin> > <end>5964</end> > </port> > </rule> > <enabled>true</enabled> > </service> > </ConfigRoot> > [root@esxi00:~] cat /etc/rc.local.d/local.sh > #!/bin/sh > > 1. local configuration options > > > 1. Note: modify at your own risk! If you do/use anything in this > 2. script that is not part of a stable API (relying on files to be in > 3. specific places, specific tools, specific output, etc) there is a > 4. possibility you will end up with a broken system after patching or > 5. upgrading. Changes are not supported unless under direction of > 6. VMware support. > > > 1. Note: This script will not be run when UEFI secure boot is enabled. > cp /vmfs/volumes/esxi00/vnc.xml /etc/vmware/firewall/ > esxcli network firewall refresh > > exit 0 > [root@esxi00:~] esxcli network firewall ruleset list | grep VNC > VNC true > > [root@ol07frm00 ~]# ps -ef | grep web > foreman 35142 1 0 19:40 ? 00:00:00 /usr/bin/python > /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 > --timeout=120 5923 192.168.1.16:5961 --cert > /etc/puppetlabs/puppet/ssl/certs/ol07frm00.lax.com.pem > --key /etc/puppetlabs/puppet/ssl/private_keys/ol07frm00.lax.com.pem > foreman 35166 1 0 19:41 ? 00:00:00 /usr/bin/python > /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 > --timeout=120 5911 192.168.1.16:5905 --cert > /etc/puppetlabs/puppet/ssl/certs/ol07frm00.lax.com.pem > --key /etc/puppetlabs/puppet/ssl/private_keys/ol07frm00.lax.com.pem > > [root@ol07frm00 ~]# telnet 192.168.1.16 5911 > Trying 192.168.1.16... > telnet: connect to address 192.168.1.16: Connection refused > [root@ol07frm00 ~]# telnet 192.168.1.16 5905 > Trying 192.168.1.16... > telnet: connect to address 192.168.1.16: Connection refused > > foreman_production log file as below: > > [root@ol07frm00 ~]# tail -f /var/log/foreman/production.log > 2017-04-24 20:04:03 823217eb [app] [I] Started GET "/hosts/ > ol07bkp00.lax.com/console" for 192.168.1.161 at 2017-04-24 20:04:03 -0400 > 2017-04-24 20:04:03 823217eb [app] [I] Processing by > HostsController#console as HTML > 2017-04-24 20:04:03 823217eb [app] [I] Parameters: {"id"=>" > ol07bkp00.lax.com"} > 2017-04-24 20:04:06 823217eb [app] [I] Rendered hosts/console/vnc.html.erb > within layouts/application (11.3ms) > 2017-04-24 20:04:06 823217eb [app] [I] Rendered > layouts/_application_content.html.erb (1.0ms) > 2017-04-24 20:04:06 823217eb [app] [I] Rendered > home/_user_dropdown.html.erb (6.5ms) > 2017-04-24 20:04:06 823217eb [app] [I] Read fragment > views/tabs_and_title_records-3 (1.8ms) > 2017-04-24 20:04:06 823217eb [app] [I] Rendered home/_topbar.html.erb > (31.6ms) > 2017-04-24 20:04:06 823217eb [app] [I] Rendered layouts/base.html.erb > (35.9ms) > 2017-04-24 20:04:06 823217eb [app] [I] Completed 200 OK in 3116ms (Views: > 53.3ms | ActiveRecord: 2.7ms) > 2017-04-24 20:04:33 823217eb [app] [I] Started GET "/hosts/ > ol07bkp00.lax.com/console" for 192.168.1.161 at 2017-04-24 20:04:33 -0400 > 2017-04-24 20:04:33 823217eb [app] [I] Processing by > HostsController#console as HTML > 2017-04-24 20:04:33 823217eb [app] [I] Parameters: {"id"=>" > ol07bkp00.lax.com"} > 2017-04-24 20:04:36 823217eb [app] [I] Rendered hosts/console/vnc.html.erb > within layouts/application (7.6ms) > 2017-04-24 20:04:36 823217eb [app] [I] Rendered > layouts/_application_content.html.erb (0.8ms) > 2017-04-24 20:04:36 823217eb [app] [I] Rendered > home/_user_dropdown.html.erb (6.5ms) > 2017-04-24 20:04:36 823217eb [app] [I] Read fragment > views/tabs_and_title_records-3 (1.3ms) > 2017-04-24 20:04:36 823217eb [app] [I] Rendered home/_topbar.html.erb > (22.4ms) > 2017-04-24 20:04:36 823217eb [app] [I] Rendered layouts/base.html.erb > (28.3ms) > 2017-04-24 20:04:36 823217eb [app] [I] Completed 200 OK in 2988ms (Views: > 40.4ms | ActiveRecord: 2.8ms > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > -- Later, Lukas @lzap Zapletal -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
