开发者

Ejabberd and Strophe problem: "terminate: Deleting session"

I'm "fighting" with this problem for more than 3 days and have googled just everything related that can come to my mind.

So, I want to setup Strophe and Ejabberd in order to create a basic chat application. The problem I'm facing is that whenever I try to connect with Strophe to the XMPP server - it stays with status CONNECTING. In case that I use Apache/Nginx proxy - I get a 502 Proxy error.

upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "POST /http-bind HTTP/1.1", upstream: "http://127.0.0.1:5280/http-bind"

In case that I use a direct connection to http-bind with the help of flXHR - nothing happens in the browser. Just stays in the CONECTING state.

The machine I'm facing this problem has Fedora 12 and Ejabberd 2.1.4

In the ejabberd.log I have this:

=INFO REPORT==== 2010-07-15 14:41:55 ===
D(<0.831.0>:ejabberd_http_bind:1105) : --- incoming data --- 
<body rid='2423401616' xmlns='http://jabber.org/protocol/httpbind' to='localhost' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
 --- END --- 

=INFO REPORT==== 2010-07-15 14:41:55 ===
D(<0.831.0>:ejabberd_http_bind:117) : Starting session

=INFO REPORT==== 2010-07-15 14:41:55 ===
D(<0.832.0>:ejabberd_http_bind:294) : started: {"2e62ed526291d8b55024cbaa9698164715e70026",
                                                [],
                                                {{127,0,0,1},45679}}

=INFO REPORT==== 2010-07-15 14:41:55 ===
I(<0.833.0>:ejabberd_net:25) : gethostname {socket_state,ejabberd_http_bind,
                                            {开发者_如何转开发http_bind,<0.832.0>,
                                             {{127,0,0,1},45679}},
                                            ejabberd_http_bind}


=INFO REPORT==== 2010-07-15 14:41:58 ===
D(<0.369.0>:ejabberd_receiver:320) : Received XML on stream = " "

=INFO REPORT==== 2010-07-15 14:42:00 ===
D(<0.832.0>:ejabberd_http_bind:531) : terminate: Deleting session 2e62ed526291d8b55024cbaa9698164715e70026

=INFO REPORT==== 2010-07-15 14:42:00 ===
D(<0.832.0>:ejabberd_http_bind:532) : terminate: _Reason normal

=INFO REPORT==== 2010-07-15 14:42:00 ===
D(<0.831.0>:ejabberd_http_bind:237) : got pid: <0.832.0>

=INFO REPORT==== 2010-07-15 14:42:00 ===
D(<0.831.0>:ejabberd_http_bind:267) : Create session: "2e62ed526291d8b55024cbaa9698164715e70026"

=INFO REPORT==== 2010-07-15 14:42:00 ===
D(<0.831.0>:ejabberd_http_bind:789) : Looking for session: "2e62ed526291d8b55024cbaa9698164715e70026"

In fact there are no problems with the same setup (same javascript/html and same ejabberd.cfg) on Ubuntu 10.4. I've found two differences between the working and not working setups. First, on the Ubuntu machine I have ejabberd 2.1.2-2 , while it is 2.1.3 (I tried and 2.1.4) on the problematic Fedora machine. Second, on the machine where it works there are no "gethostname" and "terminate: Deleting session" in the logs. So I guess the problem is with the "deleting of the session" and is related with the "gethostname", however I'm not experience enough to solve this problem.

Any help or clue about how to debug further this will be appreciated. Thank you in advance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜