Discussion:
Not able to send to chatrooms using xmpp4r
David Vildebrand
2010-10-02 20:22:25 UTC
Permalink
I was trying implement a relay between an irc-channel and a xmpp-chatroom
using xmpp-irc-relay from http://github.com/sophsec/xmpp-irc-relay which
uses libxmpp4r-ruby1.8 0.5-1 for its xmpp-component. It can join rooms,
receive presences, send presences just fine, but sending messages appears
not to function. I currently can't figure out how to fix this, although I am
getting the feeling that it may be related to the ID of the messages? I
attached a logfile from running debug, where one message is being received
okay and one is being sent with an error as the reply. When the script is
halted using ^C afterwards "DEBUG -- : TRYING TO CLOSE, STILL PROCESSING 2
STANZAS" is being repated a lot. Any insight into this matter would be
highly appreciated, I hope someone can figure this out, I've run out of
ideas.

I also tried several other jabber-clients to establish if that was a problem
on my part, clients not based on xmpp4r seemed to work fine on that
praticular server which clients based on xmpp4r all have shown the same
behaviour, logs in fine, joins the room, receives message but is unable to
send to mucs.
Erik Elmore
2010-10-02 22:44:26 UTC
Permalink
Are you trying to send these messages in the event handler thread?

+=
Erik Elmore
Post by David Vildebrand
I was trying implement a relay between an irc-channel and a xmpp-chatroom
using xmpp-irc-relay from http://github.com/sophsec/xmpp-irc-relay which
uses libxmpp4r-ruby1.8 0.5-1 for its xmpp-component. It can join rooms,
receive presences, send presences just fine, but sending messages appears
not to function. I currently can't figure out how to fix this, although I am
getting the feeling that it may be related to the ID of the messages? I
attached a logfile from running debug, where one message is being received
okay and one is being sent with an error as the reply. When the script is
halted using ^C afterwards "DEBUG -- : TRYING TO CLOSE, STILL PROCESSING 2
STANZAS" is being repated a lot. Any insight into this matter would be
highly appreciated, I hope someone can figure this out, I've run out of
ideas.
I also tried several other jabber-clients to establish if that was a
problem on my part, clients not based on xmpp4r seemed to work fine on that
praticular server which clients based on xmpp4r all have shown the same
behaviour, logs in fine, joins the room, receives message but is unable to
send to mucs.
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
David Vildebrand
2010-10-02 23:12:40 UTC
Permalink
I won't ask you to fix their code, but I'm not very good with ruby so I'll just go ahead and link this: http://github.com/sophsec/xmpp-irc-relay/blob/master//relay.rb
The sending seems to be happening in to_xmpp which is triggered from inside on :channel events.
Does this help to answer the question?

-------- Original-Nachricht --------
Datum: Sat, 2 Oct 2010 18:44:26 -0400
Betreff: Re: [XMPP4R] Not able to send to chatrooms using xmpp4r
Are you trying to send these messages in the event handler thread?
+=
Erik Elmore
Post by David Vildebrand
I was trying implement a relay between an irc-channel and a
xmpp-chatroom
Post by David Vildebrand
using xmpp-irc-relay from http://github.com/sophsec/xmpp-irc-relay which
uses libxmpp4r-ruby1.8 0.5-1 for its xmpp-component. It can join rooms,
receive presences, send presences just fine, but sending messages
appears
Post by David Vildebrand
not to function. I currently can't figure out how to fix this, although
I am
Post by David Vildebrand
getting the feeling that it may be related to the ID of the messages? I
attached a logfile from running debug, where one message is being
received
Post by David Vildebrand
okay and one is being sent with an error as the reply. When the script
is
Post by David Vildebrand
halted using ^C afterwards "DEBUG -- : TRYING TO CLOSE, STILL PROCESSING
2
Post by David Vildebrand
STANZAS" is being repated a lot. Any insight into this matter would be
highly appreciated, I hope someone can figure this out, I've run out of
ideas.
I also tried several other jabber-clients to establish if that was a
problem on my part, clients not based on xmpp4r seemed to work fine on
that
Post by David Vildebrand
praticular server which clients based on xmpp4r all have shown the same
behaviour, logs in fine, joins the room, receives message but is unable
to
Post by David Vildebrand
send to mucs.
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
--
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
Erik Elmore
2010-10-03 02:22:24 UTC
Permalink
I'm less than familiar with whatever this Isaac::Bot class is. It seems to
be spawning a separate thread for dequeing relay actions to IRC, but it
doesn't seem to be doing so for sending messages to XMPP. You may want to
spawn separate threads to execute the lines that start with "@muc.say".

+=
Erik Elmore
Post by David Vildebrand
I won't ask you to fix their code, but I'm not very good with ruby so I'll
http://github.com/sophsec/xmpp-irc-relay/blob/master//relay.rb
The sending seems to be happening in to_xmpp which is triggered from inside
on :channel events.
Does this help to answer the question?
-------- Original-Nachricht --------
Datum: Sat, 2 Oct 2010 18:44:26 -0400
Betreff: Re: [XMPP4R] Not able to send to chatrooms using xmpp4r
Are you trying to send these messages in the event handler thread?
+=
Erik Elmore
Post by David Vildebrand
I was trying implement a relay between an irc-channel and a
xmpp-chatroom
Post by David Vildebrand
using xmpp-irc-relay from http://github.com/sophsec/xmpp-irc-relaywhich
uses libxmpp4r-ruby1.8 0.5-1 for its xmpp-component. It can join rooms,
receive presences, send presences just fine, but sending messages
appears
Post by David Vildebrand
not to function. I currently can't figure out how to fix this, although
I am
Post by David Vildebrand
getting the feeling that it may be related to the ID of the messages? I
attached a logfile from running debug, where one message is being
received
Post by David Vildebrand
okay and one is being sent with an error as the reply. When the script
is
Post by David Vildebrand
halted using ^C afterwards "DEBUG -- : TRYING TO CLOSE, STILL
PROCESSING
2
Post by David Vildebrand
STANZAS" is being repated a lot. Any insight into this matter would be
highly appreciated, I hope someone can figure this out, I've run out of
ideas.
I also tried several other jabber-clients to establish if that was a
problem on my part, clients not based on xmpp4r seemed to work fine on
that
Post by David Vildebrand
praticular server which clients based on xmpp4r all have shown the same
behaviour, logs in fine, joins the room, receives message but is unable
to
Post by David Vildebrand
send to mucs.
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
--
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
David Vildebrand
2010-10-03 22:08:29 UTC
Permalink
Thank you for your input, but I don't see how putting that into a thread
will work to resolve the bad-format reply..?

To avoid confusion, I just threw something together into irb, this works
perfectly fine on two other xmpp-compatible servers, so this particular
server may be doing something non-standard.
I don't know how to debug this further, so all I can provide is the code I
was using in irb and the log output (attachments). All I would need to
figure out is how to be able to send something to the channel.
How would the threaded approach look for that snippet? Do you think that
would help to solve it?
Thank you for your input, but I don't see how putting that into a thread
will work to resolve the bad-format reply..?
To avoid confusion, I just threw something together into irb, this works
perfectly fine on two other xmpp-compatible servers, so this particular
server may be doing something non-standard.
I don't know how to debug this further, so all I can provide is the code I
was using in irb and the log output (attachments). All I would need to
figure out is how to be able to send something to the channel.
How would the threaded approach look for that snippet? Do you think that
would help to solve it?
I'm less than familiar with whatever this Isaac::Bot class is. It seems to
Post by Erik Elmore
be spawning a separate thread for dequeing relay actions to IRC, but it
doesn't seem to be doing so for sending messages to XMPP. You may want to
+=
Erik Elmore
Post by David Vildebrand
I won't ask you to fix their code, but I'm not very good with ruby so
http://github.com/sophsec/xmpp-irc-relay/blob/master//relay.rb
The sending seems to be happening in to_xmpp which is triggered from
inside on :channel events.
Does this help to answer the question?
-------- Original-Nachricht --------
Datum: Sat, 2 Oct 2010 18:44:26 -0400
Betreff: Re: [XMPP4R] Not able to send to chatrooms using xmpp4r
Are you trying to send these messages in the event handler thread?
+=
Erik Elmore
Post by David Vildebrand
I was trying implement a relay between an irc-channel and a
xmpp-chatroom
Post by David Vildebrand
using xmpp-irc-relay from http://github.com/sophsec/xmpp-irc-relaywhich
uses libxmpp4r-ruby1.8 0.5-1 for its xmpp-component. It can join
rooms,
Post by David Vildebrand
receive presences, send presences just fine, but sending messages
appears
Post by David Vildebrand
not to function. I currently can't figure out how to fix this,
although
I am
Post by David Vildebrand
getting the feeling that it may be related to the ID of the messages?
I
Post by David Vildebrand
attached a logfile from running debug, where one message is being
received
Post by David Vildebrand
okay and one is being sent with an error as the reply. When the
script
is
Post by David Vildebrand
halted using ^C afterwards "DEBUG -- : TRYING TO CLOSE, STILL
PROCESSING
2
Post by David Vildebrand
STANZAS" is being repated a lot. Any insight into this matter would
be
Post by David Vildebrand
highly appreciated, I hope someone can figure this out, I've run out
of
Post by David Vildebrand
ideas.
I also tried several other jabber-clients to establish if that was a
problem on my part, clients not based on xmpp4r seemed to work fine
on
that
Post by David Vildebrand
praticular server which clients based on xmpp4r all have shown the
same
Post by David Vildebrand
behaviour, logs in fine, joins the room, receives message but is
unable
to
Post by David Vildebrand
send to mucs.
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
--
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
_______________________________________________
Xmpp4r-devel mailing list
https://mail.gna.org/listinfo/xmpp4r-devel
Loading...