Armando Di Cianno
2010-06-21 14:37:05 UTC
I'm having some issues using the form of Client connect() where an
"alternative" (i.e. non-JID based server), and port are used.
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
$ gem list --remote |grep -i xmpp4r
xmpp4r (0.5)
Passing in server, when the JID matches seems to work (using jabber.org):
require 'rubygems'
require 'xmpp4r/client'
include Jabber
jid = JID::new('agoratest1-/eSpBmjxGS4dnm+***@public.gmane.org/ruby')
password = 'XXXXXXXXX'
cl = Client::new(jid)
cl.connect("jabber.org", 5222)
cl.auth(password)
While using an SSH-based proxy seems to fail (this server is also an
anonymous server):
require 'rubygems'
require 'xmpp4r/client'
include Jabber
Jabber::debug = true
jid = JID::new('anon2-***@public.gmane.org/ruby')
cl = Client::new(jid)
cl.connect("localhost", 5222)
cl.auth_anonymous
... and I get output like the following in debug mode:
D, [2010-06-21T10:29:47.325225 #18636] DEBUG -- : CONNECTING:
localhost:5222
D, [2010-06-21T10:29:47.326015 #18636] DEBUG -- : SENDING:
<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
xmlns='jabber:client' to='my.xmpp.agoragames.com' xml:lang='en'
version='1.0' >
W, [2010-06-21T10:29:47.326314 #18636] WARN -- : EXCEPTION:
NoMethodError
undefined method `[]' for nil:NilClass
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:149:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in `new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in
`create_from'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in
`stream='
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:110:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`parse'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:75:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:119:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:87:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:77:in
`connect'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:70:in
`connect'
(irb):7:in `irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52:in
`irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52
W, [2010-06-21T10:29:47.326403 #18636] WARN -- : Exception caught in
Parser thread! (NoMethodError)
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:149:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in `new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in
`create_from'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in
`stream='
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:110:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`parse'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:75:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:119:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:87:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:77:in
`connect'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:70:in
`connect'
(irb):7:in `irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52:in
`irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52
... I also attempted to connect to my company's xmpp service (with
xmpp4r), which uses talk.google.com, and it fails similarly --
although, I've only managed to get it to connect to talk.google.com
from Emapthy on Ubuntu using old-SSL and port 5223 -- which I'm not
sure if xmpp4r supports any longer.
The SSH tunnel/proxy is creating thusly:
ssh -D 522 my.server.net -N
... which creates a SOCKS-type proxy. Could this be the issue?
I'm just getting started with xmpp4r, so if someone could eyeball a
real problem in the error output, or just let me know if I'm doin' it
wrong, that would be fantastic.
Thanks,
__Armando Di Cianno
Agora Games, Inc.
"alternative" (i.e. non-JID based server), and port are used.
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
$ gem list --remote |grep -i xmpp4r
xmpp4r (0.5)
Passing in server, when the JID matches seems to work (using jabber.org):
require 'rubygems'
require 'xmpp4r/client'
include Jabber
jid = JID::new('agoratest1-/eSpBmjxGS4dnm+***@public.gmane.org/ruby')
password = 'XXXXXXXXX'
cl = Client::new(jid)
cl.connect("jabber.org", 5222)
cl.auth(password)
While using an SSH-based proxy seems to fail (this server is also an
anonymous server):
require 'rubygems'
require 'xmpp4r/client'
include Jabber
Jabber::debug = true
jid = JID::new('anon2-***@public.gmane.org/ruby')
cl = Client::new(jid)
cl.connect("localhost", 5222)
cl.auth_anonymous
... and I get output like the following in debug mode:
D, [2010-06-21T10:29:47.325225 #18636] DEBUG -- : CONNECTING:
localhost:5222
D, [2010-06-21T10:29:47.326015 #18636] DEBUG -- : SENDING:
<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
xmlns='jabber:client' to='my.xmpp.agoragames.com' xml:lang='en'
version='1.0' >
W, [2010-06-21T10:29:47.326314 #18636] WARN -- : EXCEPTION:
NoMethodError
undefined method `[]' for nil:NilClass
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:149:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in `new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in
`create_from'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in
`stream='
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:110:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`parse'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:75:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:119:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:87:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:77:in
`connect'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:70:in
`connect'
(irb):7:in `irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52:in
`irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52
W, [2010-06-21T10:29:47.326403 #18636] WARN -- : Exception caught in
Parser thread! (NoMethodError)
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:149:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in `new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/source.rb:16:in
`create_from'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in
`stream='
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/baseparser.rb:110:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/rexml/parsers/sax2parser.rb:11:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/streamparser.rb:39:in
`parse'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:75:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`initialize'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`new'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/stream.rb:72:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:119:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:87:in
`start'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/connection.rb:77:in
`connect'
/home/fafhrd/Projects/ruby/install/lib/ruby/gems/1.8/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:70:in
`connect'
(irb):7:in `irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52:in
`irb_binding'
/home/fafhrd/Projects/ruby/install/lib/ruby/1.8/irb/workspace.rb:52
... I also attempted to connect to my company's xmpp service (with
xmpp4r), which uses talk.google.com, and it fails similarly --
although, I've only managed to get it to connect to talk.google.com
from Emapthy on Ubuntu using old-SSL and port 5223 -- which I'm not
sure if xmpp4r supports any longer.
The SSH tunnel/proxy is creating thusly:
ssh -D 522 my.server.net -N
... which creates a SOCKS-type proxy. Could this be the issue?
I'm just getting started with xmpp4r, so if someone could eyeball a
real problem in the error output, or just let me know if I'm doin' it
wrong, that would be fantastic.
Thanks,
__Armando Di Cianno
Agora Games, Inc.