Hi,
I made the above config changes i.e.
Code:
--------------------
{s2s_use_starttls, true}.
{s2s_certfile, "C:\\Program Files\\ejabberd-2.0.3\\conf\\server.pem"}.
{s2s_default_policy, allow}.
{{s2s_host, "gmail.com"}, allow}.
--------------------
Then I opened up the C:\Program Files\ejabberd-2.0.3\conf\inetrc and it
now looks like this:
Code:
--------------------
{nameserver, {208,67,222,222}}.
{nameserver, {208,67,220,220}}.
{registry, win32}.
--------------------
And finally I opened the C:\WINDOWS\system32\drivers\etc\hosts and it
looks like this:
Code:
--------------------
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
66.249.91.83 gmail.com
--------------------
Now when I try to connect to gmail servers using bosh client library, I
see following streams being transfered:
Code:
--------------------
2009-02-13 19:58:41
Sending Body>>
<body content='text/xml; charset=utf-8' hold='1'
xmlns='http://jabber.org/protocol/httpbind' to='gmail.com' wait='300'
rid='3824' route='xmpp:talk.google.com:5222' secure='true' ver='1.6'
newkey='495cf36f55dc030209e79164a69f297a5c7ccd10' xmlns:xmpp='urn:xmpp:xbosh'
xmpp:version='1.0'/>
2009-02-13 19:58:41
Received Body<<
<body type='terminate' xmlns='http://jabber.org/protocol/httpbind'/>
--------------------
And the ejabberd log file show the following, which suggest it gets an
unknown-host error:
Code:
--------------------
=INFO REPORT==== 2009-02-14 01:28:41 ===
I(<0.268.0>:ejabberd_listener:116) : (#Port<0.403>) Accepted connection
{{127,0,0,1},51098} -> {{127,0,0,1},5280}
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.261.0>:ejabberd_http:121) : S: [{["admin"],ejabberd_web_admin},
{["http-bind"],mod_http_bind},
{["http-poll"],ejabberd_http_poll}]
=INFO REPORT==== 2009-02-14 01:28:41 ===
I(<0.261.0>:ejabberd_http:123) : started: {gen_tcp,#Port<0.403>}
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:ejabberd_http:224) : (#Port<0.403>) http query: 'POST' /http-bind
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:ejabberd_http:338) : client data: "<body content='text/xml;
charset=utf-8' hold='1' xmlns='http://jabber.org/protocol/httpbind'
to='gmail.com' wait='300' rid='3824' route='xmpp:talk.google.com:5222'
secure='true' ver='1.6' newkey='495cf36f55dc030209e79164a69f297a5c7ccd10'
xmlns:xmpp='urn:xmpp:xbosh' xmpp:version='1.0'/>"
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:ejabberd_http:263) : ["http-bind"] matches ["http-bind"]
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:mod_http_bind:47) : Incoming data: <body content='text/xml;
charset=utf-8' hold='1' xmlns='http://jabber.org/protocol/httpbind'
to='gmail.com' wait='300' rid='3824' route='xmpp:talk.google.com:5222'
secure='true' ver='1.6' newkey='495cf36f55dc030209e79164a69f297a5c7ccd10'
xmlns:xmpp='urn:xmpp:xbosh' xmpp:version='1.0'/>
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:ejabberd_http_bind:1007) : --- incoming data ---
<body content='text/xml; charset=utf-8' hold='1'
xmlns='http://jabber.org/protocol/httpbind' to='gmail.com' wait='300'
rid='3824' route='xmpp:talk.google.com:5222' secure='true' ver='1.6'
newkey='495cf36f55dc030209e79164a69f297a5c7ccd10' xmlns:xmpp='urn:xmpp:xbosh'
xmpp:version='1.0'/>
--- END ---
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.351.0>:ejabberd_http_bind:220) : started:
{"a11ab7a65c446e7fcde634a63af818212d49515a",
[],
{{127,0,0,1},51098}}
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:ejabberd_http_bind:138) : got pid: <0.351.0>
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.349.0>:ejabberd_http_bind:752) : http-put
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.351.0>:ejabberd_http_bind:638) : -- SaveKey:
495cf36f55dc030209e79164a69f297a5c7ccd10
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.351.0>:ejabberd_http_bind:699) : really sending now: <stream:stream
to='gmail.com' xmlns='jabber:client' version='1.0'
xmlns:stream='http://etherx.jabber.org/streams'>
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.352.0>:ejabberd_receiver:306) : Received XML on stream = "<stream:stream
to='gmail.com' xmlns='jabber:client' version='1.0'
xmlns:stream='http://etherx.jabber.org/streams'>"
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.353.0>:ejabberd_c2s:1346) : Send XML on stream = "<?xml
version='1.0'?><stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' id='2313733615'
from='localhost' xml:lang='en'><stream:error><host-unknown
xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>"
=INFO REPORT==== 2009-02-14 01:28:41 ===
D(<0.351.0>:ejabberd_http_bind:544) : terminate: deleting session
a11ab7a65c446e7fcde634a63af818212d49515a
--------------------
I am still quite new to bosh, and have little idea of what can i do
next. If someone can please help me achieve this, I will be more than
happy :D
Thanks in advance,
Abhinav
--
imoracle
------------------------------------
JAXL - Jabber XMPP Library in PHP
http://code.google.com/p/jaxl
------------------------------------
------------------------------------------------------------------------
imoracle's Profile: http://www.jabberforum.org/member.php?userid=17412
View this thread: http://www.jabberforum.org/showthread.php?t=1446