Unable to get websocket working

319 views
Skip to first unread message

Pouya Emami

unread,
Apr 26, 2012, 2:46:25 AM4/26/12
to ape-p...@googlegroups.com
Hello,

I have an ape server running on ape-cml.uwaterloo.ca. When I run the check tool in the ape jsf, everything checks out for all transports except for 6 which is websockets. I have no idea how debug this as chrome is not throwing any errors in the console. Any insight would be greatly appreciated!

You can see for yourself here: http://ape-cml.uwaterloo.ca/APE_JSF/Tools/Check/

Thank you all in advance

Michele Vezzoli

unread,
Apr 26, 2012, 4:12:27 AM4/26/12
to ape-p...@googlegroups.com
Hi Pouya,

Your ape server is bind on 443 in cleartext wuthout ssl layer (but I
don't think this is the real problem ),
perhaps only for test you can change the port (default 6969), or try
upgrade your server version Server 1.1.1 to 1.1.2-dev

Bye

:)


2012/4/26 Pouya Emami <pouya...@gmail.com>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-p...@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/




--
________________________________
Michele Vezzoli   IT Manager

TEL: +39.030.5230600  MOB: +39.328.0555322   FAX: +39.030.5230600
SKYPE: michele.vezzoli.vardump
VarDump S.r.l. - www.var-dump.it

This e-mail message does not imply or cause any obligation, unless it
is provided by a previous written agreement. This message is
confidential: if you have received it by mistake, please advise
immediately the sender by e-mail and destroy the message and its
attachments. You are hereby notified that any unauthorized use of the
content of this message could constitute a criminal offence. Thank
you.

Pouya Emami

unread,
Apr 28, 2012, 3:11:35 AM4/28/12
to ape-p...@googlegroups.com
Hi Michele,

I went ahead and changed the port to 6969 like you asked and it seems to work in Firefox now but still no luck with Chrome. I am beginning to think that there is something I am not seeing here.

I have also tried to compile ape-server 1.1.2-dev from the git repo but I get the following error when I try to compile:

libape-spidermonkey.c:28:19: error: jsapi.h: No such file or directory

and after that, I get a whole stream of errors before the compiler tells me this:

make: *** [modules] Error 1

So if you know what I'm doing wrong, I'm more than willing to listen to your advice!

Ask me anything you need to know and thanks again for all your help.

Cheers

On Thursday, April 26, 2012 4:12:27 AM UTC-4, Michele Vezzoli wrote:
Hi Pouya,

Your ape server is bind on 443 in cleartext wuthout ssl layer (but I
don't think this is the real problem ),
perhaps only for test you can change the port (default 6969), or try
upgrade your server version Server 1.1.1 to 1.1.2-dev

Bye

:)


2012/4/26 Pouya Emami <pouya...@gmail.com>
>
> Hello,
>
> I have an ape server running on ape-cml.uwaterloo.ca. When I run the check tool in the ape jsf, everything checks out for all transports except for 6 which is websockets. I have no idea how debug this as chrome is not throwing any errors in the console. Any insight would be greatly appreciated!
>
> You can see for yourself here: http://ape-cml.uwaterloo.ca/APE_JSF/Tools/Check/
>
> Thank you all in advance
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-p...@googlegroups.com
> To unsubscribe from this group, send email to

Michele Vezzoli

unread,
Apr 28, 2012, 1:46:25 PM4/28/12
to ape-p...@googlegroups.com
Hi Pouya,

your compile don't found the file : jsapi.h (
https://github.com/APE-Project/APE_Server/blob/master/deps/js/src/jsapi.h)

download the master @ https://github.com/APE-Project/APE_Server/zipball/master

unzip , check the permission's file and directory, and if your
enviroment is gnu/linux type:

chmod +x build.sh
./build.sh

Bye :)

2012/4/28 Pouya Emami <pouya...@gmail.com>:
>> > ape-project...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/ape-project?hl=en
>> > ---
>> > APE Project (Ajax Push Engine)
>> > Official website : http://www.ape-project.org/
>> > Git Hub : http://github.com/APE-Project/
>>
>>
>>
>>
>> --
>> ________________________________
>> Michele Vezzoli   IT Manager
>>
>> TEL: +39.030.5230600  MOB: +39.328.0555322   FAX: +39.030.5230600
>> SKYPE: michele.vezzoli.vardump
>> VarDump S.r.l. - www.var-dump.it
>>
>> This e-mail message does not imply or cause any obligation, unless it
>> is provided by a previous written agreement. This message is
>> confidential: if you have received it by mistake, please advise
>> immediately the sender by e-mail and destroy the message and its
>> attachments. You are hereby notified that any unauthorized use of the
>> content of this message could constitute a criminal offence. Thank
>> you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-p...@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project...@googlegroups.com

Pouya Emami

unread,
Apr 28, 2012, 4:28:15 PM4/28/12
to ape-p...@googlegroups.com
Hi Michele,

I tried that and I still get the same error, I have copied the master repo and I can see that the file is in the correct place. :S

Any other suggestions?

Thanks!

Pablo Tejada

unread,
Apr 28, 2012, 5:56:01 PM4/28/12
to ape-p...@googlegroups.com
Try to check and debug your headers, and the handshake process. For example as you may know the websocket technology relies on HTTP 1.1, anything below that wont work. 

For example in my setup im unable to use websockets because all the front end requests are proxied through a nginx server, even the APE server. This might not be your case, just be aware of the headers you are getting from the requests and any errors from the browser.

Good Luck!

Sent from my iPhone

Pouya Emami

unread,
Apr 30, 2012, 7:12:56 PM4/30/12
to ape-p...@googlegroups.com
Hi Pablo,

Pardon my ignorance but exactly how to check the headers on the server? This is what I get from Chrome:

Request Header:
GET ws://1.ape-cml.uwaterloo.ca:6969/6/ HTTP/1.1 Origin: http://1.ape-cml.uwaterloo.ca:6969 Connection: Upgrade Host: 1.ape-cml.uwaterloo.ca:6969 Sec-WebSocket-Key: E6/ctNVBh10GB4g8CaO6+Q== Upgrade: websocket Sec-WebSocket-Version: 13

Response Header:
HTTP/1.1 101 Switching Protocols Connection: Upgrade Upgrade: WebSocket Sec-WebSocket-Accept: OqObUlga0K5OieTfqpb1rWnkwe0=

If this is what you wanted me to check, I think everything is in check here.

Any more tricks up your sleeves? I really appreciate all the help!

Thanks again,
Pouya

Pablo Tejada

unread,
Apr 30, 2012, 7:17:05 PM4/30/12
to ape-p...@googlegroups.com
Yeah they look good alright, do you get any errors in the console? You know what point the framework stops working?

Sent from my iPhone

Pouya Emami

unread,
Apr 30, 2012, 7:28:49 PM4/30/12
to ape-p...@googlegroups.com
Well I sometimes get this error:

Unrecognized frame opcode: 4

And as far as I can tell, it stops at this line:

client.core.join(['leftScreen', 'centreScreen', 'rightScreen']);

Pouya

Pablo

unread,
Apr 30, 2012, 7:31:53 PM4/30/12
to ape-p...@googlegroups.com
Sorry, im out of ideas...

Pouya Emami

unread,
Apr 30, 2012, 7:32:39 PM4/30/12
to ape-p...@googlegroups.com
Okay well thanks for all your help :)

On 30 April 2012 19:31, Pablo <ptej...@gmail.com> wrote:
Sorry, im out of ideas...

Pouya Emami

unread,
May 1, 2012, 1:48:27 AM5/1/12
to ape-p...@googlegroups.com
Thought I'd come back and let everyone know that I fixed it and to show you all how I did (those who care anyway).

I was having trouble because the version 1.1.1 wouldn't allow connections from the clients through websocket. I found this out by testing each step of the connection sequence.

I wanted to upgrade to 1.1.2-dev but for some reason, I would get this message when I tried to compile:

libape-spidermonkey.c:29:19: error: jsapi.h: No such file or directory

The answer to this problem was found here.

I basically ran sudo ./configure inside ./deps/js/src/ and found out that I was missing zip.

I installed that and ran make on ./deps/js/src/
Followed by make on ./modules/
And finally a make on ./

(These are all respective to the root of the source folder for APE)

Next I followed this guide here to do a proper upgrade from version 1.1.1

Hope this helps those who come across is and thank you again Pablo for all your help!

Cheers

On Monday, April 30, 2012 7:32:39 PM UTC-4, Pouya Emami wrote:
Okay well thanks for all your help :)

On 30 April 2012 19:31, Pablo <ptej...@gmail.com> wrote:
Sorry, im out of ideas...

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to

Pablo Tejada

unread,
May 1, 2012, 7:45:21 AM5/1/12
to ape-p...@googlegroups.com
Glad you got it working :)

Sent from my iPhone

On May 1, 2012, at 1:48 AM, Pouya Emami <pouya...@gmail.com> wrote:

Thought I'd come back and let everyone know that I fixed it and to show you all how I did (those who care anyway).

I was having trouble because the version 1.1.1 wouldn't allow connections from the clients through websocket. I found this out by testing each step of the connection sequence.

I wanted to upgrade to 1.1.2-dev but for some reason, I would get this message when I tried to compile:

libape-spidermonkey.c:29:19: error: jsapi.h: No such file or directory

The answer to this problem was found here.

I basically ran sudo ./configure inside ./deps/js/src/ and found out that I was missing zip.

I installed that and ran make on ./deps/js/src/
Followed by make on ./modules/
And finally a make on ./

(These are all respective to the root of the source folder for APE)

Next I followed this guide here to do a proper upgrade from version 1.1.1

Hope this helps those who come across is and thank you again Pablo for all your help!

Cheers

On Monday, April 30, 2012 7:32:39 PM UTC-4, Pouya Emami wrote:
Okay well thanks for all your help :)

On 30 April 2012 19:31, Pablo <ptej...@gmail.com> wrote:
Sorry, im out of ideas...

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to

oferbar

unread,
May 17, 2012, 4:25:03 PM5/17/12
to APE Project
Hi,

I am trying to setup a working sample with web sockets, but having
great difficulties.

This is mainly due to the lack of proper documentation or any sample
demo code.
I saw a link to a WebSockets demo in git, but it is not there any
more.

Can you please post some sample client/server code to show how to set
things up?

Thank you very much!

Ofer


On May 1, 2:45 pm, Pablo Tejada <ptejad...@gmail.com> wrote:
> Glad you got it working :)
>
> Sent from my iPhone
>
> On May 1, 2012, at 1:48 AM, Pouya Emami <pouyaem...@gmail.com> wrote:
>
> Thought I'd come back and let everyone know that I fixed it and to show you
> all how I did (those who care anyway).
>
> I was having trouble because the version 1.1.1 wouldn't allow connections
> from the clients through websocket. I found this out by testing each step
> of the connection sequence.
>
> I wanted to upgrade to 1.1.2-dev but for some reason, I would get this
> message when I tried to compile:
>
> libape-spidermonkey.c:29:19: error: jsapi.h: No such file or directory
>
> The answer to this problem was found
> here<https://groups.google.com/d/msg/ape-project/ovCKjFos2Kk/zcByZ_yv5VkJ>
> .
>
> I basically ran sudo ./configure inside ./deps/js/src/ and found out that I
> was missing zip.
>
> I installed that and ran make on ./deps/js/src/
> Followed by make on ./modules/
> And finally a make on ./
>
> (These are all respective to the root of the source folder for APE)
>
> Next I followed this guide
> here<https://groups.google.com/d/msg/ape-project/CW3mInd4oLU/s6g_3SqUXGgJ>
> to
> do a proper upgrade from version 1.1.1
>
> Hope this helps those who come across is and thank you again Pablo for all
> your help!
>
> Cheers
>
>
>
>
>
>
>
>
>
> On Monday, April 30, 2012 7:32:39 PM UTC-4, Pouya Emami wrote:
>
> > Okay well thanks for all your help :)
>
> > On 30 April 2012 19:31, Pablo <ptejad...@gmail.com> wrote:
>
> >> Sorry, im out of ideas...
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "APE Project" group.
> >> To post to this group, send email to ape-p...@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> ape-project...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/ape-project?hl=en
> >> ---
> >> APE Project (Ajax Push Engine)
> >> Official website :http://www.ape-project.org/
> >> Git Hub :http://github.com/APE-Project/
>
> >  --
>
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to ape-p...@googlegroups.com
> To unsubscribe from this group, send email to
> ape-project...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/ape-project?hl=en

Pouya Emami

unread,
May 17, 2012, 11:13:17 PM5/17/12
to ape-p...@googlegroups.com
Hi Ofer,

What stage of the installation process have you reached so far?

Pouya

oferbar

unread,
May 22, 2012, 4:59:07 AM5/22/12
to APE Project
Hi,

I managed to setup everything and wrote a small test client that uses
web sockets against the latest APE from GIT.
The client connects to the web socket, sends a CONNECT message, but
gets a BAD_JSON reply from the server.

After few days of APE server debugging I figured that the new Chrome
(and Firefox) are using the latest WebSocket protocol and sending Sec-
WebSocket-Version=13 in the init message.
APE server doesn't have any knowledge of this version (13) and falls
back to version 06, which is parsing the message incorrectly.
I'm now in the process of adding code to APE to support version 13.

At this point I guess the APE project support does not exist any more.
This is after many attempts to contact the developers.

If this continues, APE will probably not be suitable for anyone who
wishes new features such as web sockets, broken MYSQL support and
other improvements.

We, as a service provider company are now evaluating if we can keep
APE in production or move to some other solution that will fit us
better.

Thanks


On May 18, 6:13 am, Pouya Emami <pouyaem...@gmail.com> wrote:
> Hi Ofer,
>
> What stage of the installation process have you reached so far?
>
> Pouya
>

Pablo Tejada

unread,
May 22, 2012, 8:07:04 AM5/22/12
to ape-p...@googlegroups.com
Well, the developers are definetly not dead. Last thing i heard they
were working hard on APE 2, which will be rebranded to Async Push
Engine. They have some early drafts repos in their personal github
accounts of the new server and the framework.

I'm even using the new js framework draft myself as the base of a
PubSub framework. They definetly not as active in community as must of
us would want then to be.

Sent from my iPhone

Jay Rivers

unread,
May 22, 2012, 8:08:36 AM5/22/12
to ape-p...@googlegroups.com

Just change the transport method to 6. Everything else is the same.

oferbar

unread,
May 22, 2012, 11:16:10 AM5/22/12
to APE Project
Thanks for you response.

I didn't say the developers are dead :)

But there's no response from anyone from the APE team through email or
contact published on the web site.
We were interested in getting paid support for our production but
couldn't get anyone to respond.

It is very encouraging to hear that a new APE version is coming.
However, this fact must have been kept in secret, since I wasn't able
to find any clue to that, nor any roadmap for APE.

Plus, the fact that MySql support has been broken for over a year now,
and prevents us from doing any upgrade without major code rewrite on
the server side.

Thx

On May 22, 3:07 pm, Pablo Tejada <ptejad...@gmail.com> wrote:
> Well, the developers are definetly not dead. Last thing i heard they
> were working hard on APE 2, which will be rebranded to Async Push
> Engine. They have some early drafts repos in their personal github
> accounts of the new server and the framework.
>
> I'm even using the new js framework draft myself as the base of a
> PubSub framework. They definetly not as active in community as must of
> us would want then to be.
>
> Sent from my iPhone
>

Pablo Tejada

unread,
May 22, 2012, 12:21:00 PM5/22/12
to ape-p...@googlegroups.com
Here are a few old information links

http://www.ape-project.org/wiki/index.php/Category:V2
http://www.ape-project.org/wiki/index.php/Ideas


And as for the MySQL issue, I think it is all a dependency issue since the latest binary release v1.1.1 works in my host's server stack. I believe they are running CentOS 6.

Sent from my iPad

oferbar

unread,
May 23, 2012, 1:44:55 AM5/23/12
to APE Project
Great!
Thank you very much!


On May 22, 7:21 pm, Pablo Tejada <ptejad...@gmail.com> wrote:
> Here are a few old information links
>
> -http://www.ape-project.org/wiki/index.php/Category:V2
> -http://www.ape-project.org/wiki/index.php/Ideas
>
> The repohttps://github.com/paraboul/APE-Server-v2
>
> And as for the MySQL issue, I think it is all a dependency issue since the latest binary release v1.1.1 works in my host's server stack. I believe they are running CentOS 6.
>
> Sent from my iPad
>
Reply all
Reply to author
Forward
0 new messages