Closed explanar closed 9 years ago
Can you check:
Thank you for your very fast reply CyrilPeponnet!
$ netstat -a | egrep 'Proto|LISTEN' | grep 6900
tcp 0 0 *:6900 *:* LISTEN
$ netstat -a | egrep 'Proto|LISTEN' | grep 5900
tcp 0 0 localhost:5900 *:* LISTEN
You're right. What have i configured wrong?
Best regards.
On hypervisor itself try to telnet localhost:6900
$ telnet localhost 6900
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
duration: ca. 1-2 seconds.
stop the agent, set vnc_enable_websocket_debug = True in configuration file, launch the agent with runarchipel -n, retry the telnet and post all outputs
Maybe the fault is in the hosts file /etc/hosts with commented
# 127.0.1.1 hostname
192.168.2.103 hostname
?
Here what i did as you adviced:
$ cd /etc/archipel
$ sudo grep -R 'vnc_enable_websocket_debug'
modules.d/virtualmachine-vnc.conf:vnc_enable_websocket_debug = False
changed to "True".
$ sudo service archipel stop
* Stopping Archipel: [OK]
$ sudo runarchipel -n
WebSocket server settings:
- Listen on 0.0.0.0:6900
- Flash security policy server
- SSL/TLS support
- proxying from 0.0.0.0:6900 to 127.0.0.1:5900
1: 127.0.0.1: new handler Process
1: 127.0.0.1: ignoring socket not ready
[in the meantime from another tty:]
$ telnet localhost 6900
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
Duration ca. 4 seconds.
Try to type something like HELLO in your telnet session it should respond with 400 HTML retour code.
And one last thing, if you get connexion refused from the UI be sure that the machine displaying the UI (your client machine with the browser) can reach your hypervisor directly.
Try to telnet from this machine to your hypervisor.
Hi,
Thank you again for your excellent support!
The "Hello" Test worked from localhost as well as from 1nother IP to 192.168.2.103:
$ telnet localhost 6900
$ telnet 192.168.2.103 6900
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HELLO
<head>
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code 400.
<p>Message: Bad request syntax ('HELLO').
<p>Error code explanation: 400 = Bad request syntax or unsupported method.
</body>
Connection closed by foreign host.
The machine with running UI in browser can reach hypervisor directly if you mean e.g. ping by that (?)
Sorry, forgot the internal output of runarchipel -n: First i did the "hello" test as described and after that i tried to open VNCviewer from UI (localhost) once:
1: 127.0.0.1: new handler Process
1: 127.0.0.1: ignoring socket not ready
2: 127.0.0.1: new handler Process
2: 127.0.0.1: "HELLO" 400 -
3: 192.168.2.105: new handler Process
3: 192.168.2.105: "HELLO" 400 -
4: 192.168.2.103: new handler Process
4: handler exception: WSRequestHandler instance has no attribute 'last_code'
4: Traceback (most recent call last):
File "/opt/ArchipelAgent/archipel-agent-virtualmachine-vnc/archipelagentvirtualmachinevnc/websocket.py", line 775, in top_new_client
self.client = self.do_handshake(startsock, address)
File "/opt/ArchipelAgent/archipel-agent-virtualmachine-vnc/archipelagentvirtualmachinevnc/websocket.py", line 707, in do_handshake
if wsh.last_code == 101:
AttributeError: WSRequestHandler instance has no attribute 'last_code'
Bildschirmfoto gespeichert [=screenshot saved] in /tmp/tmpEhkUJe, mit Typ image/x-portable-pixmap
May the problem be that a new handler process comes from UI as "192.168.2.103" while in /etc/hosts is configured
192.168.2.103 hostname
?
I mean the machine running the browser with UI must have access to 192.168.2.103:6900
It has access:
via
$ telnet 192.168.3.103 6900
It produces the html 400 Message after e.g. "hello".
And using UI what is the message you get in javascript error console?
You can find more details here: https://github.com/ArchipelProject/Archipel/issues/467
I get the same error in UI when trying with firefox 33.0 (installed on 12.04 elementary_64)
Hum:
# vnc_certificate_file = None
# vnc_only_ssl = False
Try uncomment the lines...
I am Sorry. Forgot to validate obviously "non-secure ssl cert" via https://192.168.2.103:6900 from Client-UI Browser. Now works.
That'll never happen to me now ... :-\
:) Good have fun!
I just want to add comment for readers:
Use Firefox to browse https://hypervisor:690**0, but then only the first VM is SSL-confirmed. For 2nd, 3rd VM they have to be running while you browse https://hypervisor:6901, https://hypervisor:6902** etc....
telnet 192.168.2.103 6900
archipel.conf: machine_ip=192.168.2.103 HTTP-Server: lighthttpd Client-Access: via http:80
archipel.log says Virtual machine vnc proxy accepts only SSL connection False.
ejabberd.conf
archipel.conf:
As you can see i already tried vnc_certificate_file = None vnc_only_ssl = False
Any suggestion?
Thank you in advance.