<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">Dňa 07.11.2012 08:18, Hector Sanjuan
wrote / napísal(a):<br>
</div>
<blockquote
cite="mid:op.wnd6lefo6p7o46@hecturchi.intranet.convivencial.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">body { font-family:'DejaVu Sans Mono'; font-size:12px}</style>
<div>Any chance the "Use Secure WSS" is checked in sunstone
config? Can you check/uncheck and retry with it unchecked just
in case?</div>
</blockquote>
<br>
Secure WSS wasn't checked, but I tried to check/uncheck and run once
again with unchecked - nothing changed :-(<br>
<blockquote
cite="mid:op.wnd6lefo6p7o46@hecturchi.intranet.convivencial.org"
type="cite">
<div><br>
</div>
<div>Otherwise, kill your sunstone proxy and restart it manually:</div>
<div><br>
</div>
<div><small>python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876</small><small><br>
</small></div>
</blockquote>
1. sunstone stopped, occi stopped<br>
oneadmin@myto-node:~$ ps aux|grep py<br>
oneadmin 12456 0.0 0.0 9516 904 pts/2 S+ 09:56 0:00
grep py<br>
<br>
2. <br>
oneadmin@myto-node:/etc/one$ python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
WebSocket server settings:<br>
- Listen on :29876<br>
- Flash security policy server<br>
- No SSL/TLS support (no cert file)<br>
- proxying from :29876 to targets in
/var/lib/one/sunstone_vnc_tokens<br>
<br>
oneadmin@myto-node:~$ ps aux|grep py<br>
oneadmin 12457 0.5 0.1 93056 16800 pts/1 S+ 09:57 0:00
python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 12460 0.0 0.0 9516 908 pts/2 S+ 09:57 0:00
grep py<br>
<br>
<br>
3. oneadmin@myto-node:~$ sunstone-server start<br>
sunstone-server started<br>
<br>
oneadmin@myto-node:~$ ps aux|grep py<br>
oneadmin 12457 0.1 0.1 93056 16800 pts/1 S+ 09:57 0:00
python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 12481 0.9 0.0 0 0 pts/2 Z 09:58 0:00
[python] <defunct><br>
oneadmin 12484 0.0 0.0 9516 908 pts/2 S+ 09:58 0:00
grep py<br>
<br>
<b>Here seems to be an issue - if websockify process runs in time of
sunstone is starting - python process is defunct</b><b>.</b> If a
defunct python proces exist in system, VNC server is disconnected
immediately and 10 lines is added to websockify console:<br>
<br>
<small>oneadmin@myto-node:~$ python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
WebSocket server settings:<br>
- Listen on :29876<br>
- Flash security policy server<br>
- No SSL/TLS support (no cert file)<br>
- proxying from :29876 to targets in
/var/lib/one/sunstone_vnc_tokens<br>
</small><br>
<small> 1: 10.0.1.125: SSL connection but '/var/lib/one/self.pem'
not found<br>
2: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
3: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
4: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
5: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
6: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
7: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
8: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
9: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
10: 10.0.1.125: SSL connection but '/var/lib/one/self.pem' not
found<br>
</small><b><br>
</b><b>In /etc/one/sunstone-server there is:</b><br>
:vnc_proxy_base_port: 29876<br>
:vnc_proxy_path: /usr/share/opennebula/websockify/websocketproxy.py<br>
:vnc_proxy_support_wss: no<br>
:vnc_proxy_cert:<br>
:vnc_proxy_key:<br>
<b><br>
</b><b>-rwxr-xr-x 1 root root 3691 okt 26 18:13 sunstone-server</b><br>
<br>
<small>if [ -z "$ONE_LOCATION" ]; then<br>
SUNSTONE_PID=/var/run/one/sunstone.pid<br>
SUNSTONE_SERVER=/usr/share/opennebula/sunstone/sunstone-server.rb<br>
SUNSTONE_LOCK_FILE=/var/lock/one/.sunstone.lock<br>
SUNSTONE_LOG=/var/log/one/sunstone.log<br>
SUNSTONE_LOG_ERROR=/var/log/one/sunstone.error<br>
SUNSTONE_CONF=/etc/one/sunstone-server.conf<br>
else<br>
SUNSTONE_PID=$ONE_LOCATION/var/sunstone.pid<br>
SUNSTONE_SERVER=$ONE_LOCATION/lib/sunstone/sunstone-server.rb<br>
SUNSTONE_LOCK_FILE=$ONE_LOCATION/var/.sunstone.lock<br>
SUNSTONE_LOG=$ONE_LOCATION/var/sunstone.log<br>
SUNSTONE_LOG_ERROR=$ONE_LOCATION/var/sunstone.error<br>
SUNSTONE_CONF=$ONE_LOCATION/etc/sunstone-server.conf<br>
fi<br>
<br>
setup()<br>
{<br>
TMPDIR=$(grep ^:tmpdir: $SUNSTONE_CONF|awk '{print $2}')<br>
<br>
if [ -n "$TMPDIR" ]; then<br>
export TMPDIR<br>
mkdir -p $TMPDIR<br>
fi<br>
<br>
if [ -f $SUNSTONE_LOCK_FILE ]; then<br>
if [ -f $SUNSTONE_PID ]; then<br>
SUNSTONEPID=`cat $SUNSTONE_PID`<br>
ps $SUNSTONEPID &> /dev/null<br>
if [ $? -eq 0 ]; then<br>
echo -n "Sunstone Server is still running
(PID:$SUNSTONEPID). Please "<br>
echo "try 'sunstone-server stop' first."<br>
exit 1<br>
fi<br>
fi<br>
echo "Stale .lock detected. Erasing it."<br>
rm $SUNSTONE_LOCK_FILE<br>
fi<br>
}<br>
<br>
start()<br>
{<br>
if [ ! -f "$SUNSTONE_SERVER" ]; then<br>
echo "Cannot find $SUNSTONE_SERVER."<br>
exit 1<br>
fi<br>
<br>
# Start the sunstone daemon<br>
touch $SUNSTONE_LOCK_FILE<br>
ruby $SUNSTONE_SERVER > $SUNSTONE_LOG
2>$SUNSTONE_LOG_ERROR &<br>
LASTPID=$!<br>
<br>
if [ $? -ne 0 ]; then<br>
echo "Error executing sunstone-server."<br>
echo "Check $SUNSTONE_LOG_ERROR and $SUNSTONE_LOG for more
information"<br>
exit 1<br>
else<br>
echo $LASTPID > $SUNSTONE_PID<br>
fi<br>
<br>
sleep 1<br>
ps $LASTPID &> /dev/null<br>
<br>
if [ $? -ne 0 ]; then<br>
echo "Error executing sunstone-server."<br>
echo "Check $SUNSTONE_LOG_ERROR and $SUNSTONE_LOG for more
information"<br>
exit 1<br>
fi<br>
<br>
echo "sunstone-server started"<br>
}<br>
#<br>
# Function that stops the daemon/service<br>
#<br>
stop()<br>
{<br>
if [ ! -f $SUNSTONE_PID ]; then<br>
echo "Couldn't find sunstone-server process pid."<br>
exit 1<br>
fi<br>
<br>
# Kill the sunstone daemon<br>
kill -INT `cat $SUNSTONE_PID` &> /dev/null<br>
<br>
# Remove pid files<br>
rm -f $SUNSTONE_LOCK_FILE &> /dev/null<br>
rm -f $SUNSTONE_PID &> /dev/null<br>
<br>
echo "sunstone-server stopped"<br>
}<br>
<br>
case "$1" in<br>
start)<br>
setup<br>
start<br>
;;<br>
stop)<br>
stop<br>
;;<br>
restart)<br>
stop<br>
setup<br>
start<br>
;;<br>
*)<br>
echo "Usage: sunstone-server {start|stop|restart}" >&2<br>
exit 3<br>
;;<br>
esac</small><br>
<br>
<br>
<br>
Jan<br>
<br>
<blockquote
cite="mid:op.wnd6lefo6p7o46@hecturchi.intranet.convivencial.org"
type="cite">
<div><br>
</div>
<div>and see if it says something interesting to the console when
you are trying to connect to the VM.<small><br>
</small></div>
<div><br>
</div>
<div>Hector</div>
<div><br>
</div>
<div><br>
</div>
<div>On Wed, 07 Nov 2012 08:01:52 +0100, Jan Benadik
<a class="moz-txt-link-rfc2396E" href="mailto:jan.benadik@atos.net"><jan.benadik@atos.net></a> wrote:<br>
</div>
<br>
<blockquote style="margin: 0 0 0.80ex; border-left: #0000FF 2px
solid; padding-left: 1ex"> Hi, <br>
here are my python processes in different situations:<br>
<br>
<b>1. sunstone and OCCI server stopped</b><br>
<small>oneadmin@myto-node:~$ ps aux|grep python<br>
oneadmin 1395 0.0 0.0 9516 912 pts/0 S+ 07:48
0:00 grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S Nov06
0:02 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/<br>
</small><br>
<b>2. sunstone started, OCCI stopped</b><br>
<small>oneadmin@myto-node:~$ ps aux|grep python<br>
oneadmin 1412 6.5 0.1 93060 16808 pts/0 S 07:49
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 1415 0.0 0.0 9516 908 pts/0 S+ 07:49
0:00 grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S Nov06
0:02 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/<br>
</small><br>
<b>3. sunstone and OCCI started</b><br>
<small>oneadmin@myto-node:~$ ps aux|grep python<br>
oneadmin 1412 0.2 0.1 93060 16808 pts/0 S 07:49
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 1434 4.6 0.1 93056 16808 pts/0 S 07:50
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/selfservice_vnc_tokens 33876<br>
oneadmin 1437 0.0 0.0 9520 908 pts/0 S+ 07:50
0:00 grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S Nov06
0:02 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/<br>
</small><b><br>
</b><b>4. sunstone and OCCI started, VNC session via OCCI
established</b><br>
<small>oneadmin@myto-node:~$ ps aux|grep python<br>
oneadmin 1412 0.0 0.1 93060 16808 pts/0 S 07:49
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 1434 0.1 0.1 93056 16912 pts/0 S 07:50
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/selfservice_vnc_tokens 33876<br>
oneadmin 1833 0.0 0.1 95288 14456 pts/0 S 07:52
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/selfservice_vnc_tokens 33876<br>
oneadmin 1835 0.0 0.0 9520 912 pts/0 S+ 07:52
0:00 grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S Nov06
0:02 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/</small><br>
<br>
<b>5. sunstone and OCCI started, VNC session via sunstone try to
establish (with error message :Server disconnected (code:
1006) displayed</b><b>)</b><br>
<small>oneadmin 1833 0.0 0.0 0 0 pts/0 Z
07:52 0:00 [python] <defunct><br>
oneadmin 1927 0.0 0.0 0 0 pts/0 Z 07:53
0:00 [python] <defunct><br>
oneadmin 1938 0.0 0.0 9520 912 pts/0 S+ 07:53
0:00 grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S Nov06
0:02 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/</small><br>
<br>
<b>6. the same as 5., but after error message closing</b><br>
<small>oneadmin@myto-node:~$ ps aux|grep python<br>
oneadmin 1412 0.0 0.1 93060 16912 pts/0 S 07:49
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 1434 0.0 0.1 93056 16912 pts/0 S 07:50
0:00 python /usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/selfservice_vnc_tokens 33876<br>
oneadmin 1833 0.0 0.0 0 0 pts/0 Z 07:52
0:00 [python] <defunct><br>
oneadmin 1927 0.0 0.0 0 0 pts/0 Z 07:53
0:00 [python] <defunct><br>
oneadmin 2016 0.0 0.0 9520 908 pts/0 S+ 07:55
0:00 grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S Nov06
0:02 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/<br>
</small><br>
<br>
<b>File /var/log/one/sunstone.error is still empty</b><b>.</b><br>
<br>
Jan<br>
<br>
<br>
<div class="moz-cite-prefix">Dňa 06.11.2012 19:53, Hector
Sanjuan wrote / napísal(a):<br>
</div>
<blockquote
cite="mid:op.wnc727cr6p7o46@hecturchi.intranet.convivencial.org"
type="cite">
<style type="text/css">body { font-family:'DejaVu Sans Mono'; font-size:12px}</style>
<div>Is there any suspicious python process still running
after stopping sunstone that might be taking the 33876 port?</div>
<div><br>
</div>
<div>(im seeing oneadmin 6942 0.0 0.0 0 0 pts/1 Z 10:10 0:00
[python] <defunct>)</div>
<div><br>
</div>
<div>Anything in sunstone.error maybe?</div>
<div><br>
</div>
<div>Hector</div>
<div><br>
</div>
<div>On Tue, 06 Nov 2012 10:43:30 +0100, Jan Benadik <a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:jan.benadik@atos.net"><jan.benadik@atos.net></a>
wrote:<br>
</div>
<br>
<blockquote style="margin: 0 0 0.80ex; border-left: #0000FF
2px solid; padding-left: 1ex"> Hi all,<br>
<br>
I have a problem to start VNC session from Sunstone
interface.<br>
<br>
I have Ubuntu 12.04 Server with Opennebula 3.8.1 installed,
the newest version of noVNC (no error message), restarted
oned, sunstone-server and occi-server too. <br>
<br>
After restarting, the python processes are:<br>
<tt><small>oneadmin@myto-node:/usr/share/opennebula$ ps
aux|grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S
09:56 0:00 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/<br>
oneadmin 6835 0.4 0.1 93068 16816 pts/1 S
10:09 0:00 python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 6857 0.7 0.1 93064 16820 pts/1 S
10:09 0:00 python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/selfservice_vnc_tokens
33876<br>
oneadmin 6869 0.0 0.0 9516 908 pts/1 S+
10:10 0:00 grep python</small></tt><br>
<br>
When I try to start VNC session <b>from OCCI interface -
everything works, VNC session is established</b>.<br>
If I try to start VNC session to the same VM from SUNSTONE
interface, a message "Server disconnected (code: 1006)"
occurs immediately and python processes are changed:<br>
<tt><small>oneadmin@myto-node:/usr/share/opennebula$ ps
aux|grep python<br>
nova 5838 0.0 0.2 118608 23796 ? S
09:56 0:00 python /usr/bin/nova-novncproxy
--flagfile=/etc/nova/nova.conf --web /usr/share/novnc/<br>
oneadmin 6835 0.2 0.1 93068 16920 pts/1 S
10:09 0:00 python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876<br>
oneadmin 6857 0.3 0.1 93064 16820 pts/1 S
10:09 0:00 python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/selfservice_vnc_tokens
33876<br>
oneadmin 6942 0.0 0.0 0 0 pts/1 Z
10:10 0:00 [python] <defunct><br>
oneadmin 6944 0.0 0.0 9516 912 pts/1 S+
10:10 0:00 grep python<br>
</small></tt><br>
File /var/log/one/sunstone.error is empty, <br>
the file /var/log/one/sunstone.log starts with:<br>
<tt><small>--------------------------------------<br>
Server configuration<br>
--------------------------------------<br>
{:vnc_proxy_cert=>nil,<br>
:vnc_proxy_support_wss=>false,<br>
:vnc_proxy_path=>"/usr/share/opennebula/websockify/websocketproxy.py",<br>
:one_xmlrpc=><a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="http://localhost:2633/RPC2">"http://localhost:2633/RPC2"</a>,<br>
:vnc_proxy_base_port=>29876,<br>
:vnc_proxy_key=>nil,<br>
:core_auth=>"cipher",<br>
:host=>"0.0.0.0",<br>
:tmpdir=>"/var/tmp/one",<br>
:marketplace_url=><a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="https://marketplace.c12g.com/appliance">"https://marketplace.c12g.com/appliance"</a>,<br>
:debug_level=>3,<br>
:port=>9869,<br>
:lang=>"en_US",<br>
:auth=>"sunstone"}<br>
Tue Nov 06 10:09:42 2012 [I]: Starting VNC proxy: python
/usr/share/opennebula/websockify/websocketproxy.py
--target-config=/var/lib/one/sunstone_vnc_tokens 29876</small></tt><br>
<br>
and ends with:<br>
<tt><small>Tue Nov 06 10:27:12 2012 [I]: 10.0.1.125 - -
[06/Nov/2012 10:27:12] "POST /vm/88/startvnc HTTP/1.1"
200 48 0.0068<br>
Tue Nov 06 10:27:12 2012 [I]: 10.0.1.125 - -
[06/Nov/2012 10:27:12] "GET /user?timeout=true HTTP/1.1"
200 3416 0.0062<br>
Tue Nov 06 10:27:13 2012 [I]: 10.0.1.125 - -
[06/Nov/2012 10:27:13] "GET /vm?timeout=true HTTP/1.1"
200 24160 0.0203<br>
Tue Nov 06 10:27:15 2012 [I]: 10.0.1.125 - -
[06/Nov/2012 10:27:15] "GET /cluster?timeout=true
HTTP/1.1" 200 338 0.0038<br>
Tue Nov 06 10:27:26 2012 [I]: 10.0.1.125 - -
[06/Nov/2012 10:27:26] "GET /image?timeout=true
HTTP/1.1" 200 14143 0.0757<br>
</small></tt><br>
Paths to files looks to be correct - which could be an
issue?<br>
<br>
Jan<br>
<br>
<div class="moz-signature">-- <br>
<font size="3" face="Helvetica"> <img alt=""
src="cid:part4.03040206.09080106@atos.net" width="252"
height="15"><br>
<b>Ján Beňadik</b><br>
<font size="2" face="Helvetica"> Managed Services -
Solution Design Architect<br>
mobile: +421 903 691 634<br>
fax: +421 2 6852 8380<br>
<a moz-do-not-send="true"
href="mailto://jan.benadik@atos.net">jan.benadik@atos.net</a><br>
Vinohradnicka 6, 971 01 Prievidza<br>
<a moz-do-not-send="true"
href="http://www.sk.atos.net">www.sk.atos.net</a><br>
__________________________________<br>
<br>
<img alt="" src="cid:part7.04040307.08050303@atos.net"
width="261" height="58"><br>
</font> </font></div>
</blockquote>
<br>
<br>
<br>
<div id="M2Signature">
<div>-- </div>
<div>Hector Sanjuan<br>
@hecsanjuan</div>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font size="3" face="Helvetica"> <img alt=""
src="cid:part8.08070100.03090404@atos.net" width="252"
height="15"><br>
<b>Ján Beňadik</b><br>
<font size="2" face="Helvetica"> Managed Services - Solution
Design Architect<br>
mobile: +421 903 691 634<br>
fax: +421 2 6852 8380<br>
<a moz-do-not-send="true"
href="mailto://jan.benadik@atos.net">jan.benadik@atos.net</a><br>
Vinohradnicka 6, 971 01 Prievidza<br>
<a moz-do-not-send="true" href="http://www.sk.atos.net">www.sk.atos.net</a><br>
__________________________________<br>
<br>
<img alt="" src="cid:part11.03070507.03080404@atos.net"
width="261" height="58"><br>
</font> </font></div>
</blockquote>
<br>
<br>
<br>
<div id="M2Signature">
<div>-- </div>
<div>Hector Sanjuan<br>
@hecsanjuan</div>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<font size="3" face="Helvetica"> <img alt=""
src="cid:part12.02000808.03060508@atos.net" width="252"
height="15"><br>
<b>Ján Beňadik</b><br>
<font size="2" face="Helvetica"> Managed Services - Solution
Design Architect<br>
mobile: +421 903 691 634<br>
fax: +421 2 6852 8380<br>
<a href="mailto://jan.benadik@atos.net">jan.benadik@atos.net</a><br>
Vinohradnicka 6, 971 01 Prievidza<br>
<a href="http://www.sk.atos.net">www.sk.atos.net</a><br>
__________________________________<br>
<br>
<img alt="" src="cid:part15.07070900.08040804@atos.net"
width="261" height="58"><br>
</font> </font></div>
</body>
</html>