Autobahna and Amazon AWS

#1

Hello Everyone,

I have a web socket server running on an Ubuntu 12.04 EC2 Instance. My web socket server is written in Python, I am using Autobahn WebSockets.

I have a JavaScript client that uses WebRTC to capture webcam frames and send them to the web socket server.

My webserver (where the JavaScript is hosted) is not deployed on EC2. The python web socket server only do video frame processing and is running over TCP and port 9000.

My Problem:

The JS client can connect to the web socket and the server receives and processes the webcam frames. However, after 5 or 6 minutes the client stops sending the frames and displaying the following message:

WebSocket connection to ‘ws://x.x.x.x:9000/’ failed: Failed to send WebSocket frame.

When I print the error data I got “undefined”.

I am not sure what is the source of the problem. It is not a timeout problem.

Of course, this never happens when I run the server on my local testing environment.

Thanks,

Sherif

0 Likes

#2

I am not sure what is the source of the problem. It is not a timeout
problem.

How do you know it's not a timeout issue?

Try using TLS and send a WS message every 20s or so ..

/Tobias

0 Likes

#3

I am not sure what is the source of the problem. It is not a timeout

problem.

How do you know it’s not a timeout issue?

Try using TLS and send a WS message every 20s or so …

/Tobias

···

On Saturday, September 7, 2013 4:26:26 AM UTC-7, Tobias Oberstein wrote:

0 Likes

#4

The connection is active, every one second the client send video frames to the server I can see the server is receiving messages and processing the frames. But, suddenly, the client show the error message I posted before and immediately no new messages show up at the server side.

I do not think there is a timeout for inactive websocket connection, is there any?

I know since this always happen after 280 to 350 seconds, it seems it has something to do with the timeout.

Thanks,

Sherif

···

On Saturday, September 7, 2013 4:26:26 AM UTC-7, Tobias Oberstein wrote:

I am not sure what is the source of the problem. It is not a timeout

problem.

How do you know it’s not a timeout issue?

Try using TLS and send a WS message every 20s or so …

/Tobias

0 Likes

#5

Do you know any cloud computing services, that support Autobahn. I need
to decide which cloud service we will use for our commercial product.

We are using Amazon EC2 .. works fine.

Again: use TLS and send WebSocket pings every 10s.

/Tobias

0 Likes

#6

Hello,

Thanks for your suggestions. I found more information.

The problem I have in my application seems to be not related to Amazon EC2. I found during the testing that this problem happen when I am using Google Chrome. For some reason I got this strange error message. However, if the JS client run from FireFox the problem doesn’t appear. The client keep sending the data as expected. Not sure yet what is the reason. The JS client use WebRTC.

Thanks,

sherif

···

On Sunday, September 8, 2013 4:57:02 AM UTC-7, Tobias Oberstein wrote:

Do you know any cloud computing services, that support Autobahn. I need

to decide which cloud service we will use for our commercial product.

We are using Amazon EC2 … works fine.

Again: use TLS and send WebSocket pings every 10s.

/Tobias

0 Likes

#7

Hello,

I am trying to run WebSocket over TLS. I followed your example on GitHub, this one

https://github.com/tavendo/AutobahnPython/tree/master/examples/websocket/echo_tls

But when I run the client I got:

Connection closed (wasClean = false, code = 1006, reason = ‘’)

Am I doing something wrong?

Thanks,

Sherif

···

On Sunday, September 8, 2013 4:57:02 AM UTC-7, Tobias Oberstein wrote:

Do you know any cloud computing services, that support Autobahn. I need

to decide which cloud service we will use for our commercial product.

We are using Amazon EC2 … works fine.

Again: use TLS and send WebSocket pings every 10s.

/Tobias

0 Likes

#8

Hi,

works for me (current Github master):

Shell 1:

···

=======

oberstet@THINKPAD-T410S /f/scm/AutobahnPython/examples/websocket/echo_tls (master)
$ python server.py

Shell 2:

oberstet@THINKPAD-T410S /f/scm/AutobahnPython/examples/websocket/echo_tls (master)
$ python client.py
2013-09-11 12:09:11+0200 [-] Log opened.
2013-09-11 12:09:11+0200 [-] Starting factory <autobahn.websocket.WebSocketClientFactory instance at 0x0357EBE8>
2013-09-11 12:09:11+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:12+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:13+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:14+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:15+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:16+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:17+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!
2013-09-11 12:09:18+0200 [EchoClientProtocol (TLSMemoryBIOProtocol),client] Got echo: Hello, world!

==

for checking you can do the following (with Autobahn as WS server).

say your secure WS server runs under URL

wss://myip.com:9999/

then open the following URL in your browser:

https://myipcom:9999/

Autobahn will recongize that it talks to a non-WS consumer and renders a HTML status page. This allows you to check reachability and certificate in the browser ..

/Tobias

Am 11.09.2013 01:21, schrieb Sherif Saad:

Hello,

I am trying to run WebSocket over TLS. I followed your example on
GitHub, this one
https://github.com/tavendo/AutobahnPython/tree/master/examples/websocket/echo_tls

But when I run the client I got:
          Connection closed (wasClean = false, code = 1006, reason = '')

Am I doing something wrong?

Thanks,
Sherif

On Sunday, September 8, 2013 4:57:02 AM UTC-7, Tobias Oberstein wrote:

     > Do you know any cloud computing services, that support Autobahn.
    I need
     > to decide which cloud service we will use for our commercial
    product.

    We are using Amazon EC2 .. works fine.

    Again: use TLS and send WebSocket pings every 10s.

    /Tobias

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes