Hi everybody…
I’m having problems adding users to rosters.
We use PSI, when we add users the user who adds them gets an “Agent/transport” in his roster with the surname of the person he added. And must Resend the authorization in order to appear online in their roster (although it has already authorized it).
I’m getting this error:
2008.07.23 08:40:32 [org.jivesoftware.openfire.session.LocalOutgoingServerSession.createOutgoingSes sion(LocalOutgoingServerSession.java:259)
] Error trying to connect to remote server: delgado(DNS lookup: delgado:5269) java.net.UnknownHostException: delgado at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source)at org.jivesoftware.openfire.session.LocalOutgoingServerSession.createOutgoingSess ion(LocalOutgoingServerSession.java:254)at org.jivesoftware.openfire.session.LocalOutgoingServerSession.authenticateDomain (LocalOutgoingServerSession.java:144)at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.sendPa cket(OutgoingSessionPromise.java:215)at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(Ou tgoingSessionPromise.java:194)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
and this Warning:
2008.07.23 08:38:32 Error returning error to sender. Original packet:
<presence from="jcasarini@mydomian.com" to="delgado" type="unsubscribed"/><span class="hilite">org.jivesoftware.openfire.PacketException: Cannot route packet of type IQ or Presence to bare JID:
<presence to="jcasarini@mydomain.com" from="delgado" type="error"> <error code="404" type="cancel"> <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> </error> </presence><span class="hilite">at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:216)<span class="hilite">at
org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsPr ocessor.returnErrorToSender(OutgoingSessionPromise.java:261)at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(Ou tgoingSessionPromise.java:197)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
(I, jcasarini, added gdelgado)
This thing is bugging me, and I don’t know what I’ve done wrong…
Thanks,
Joaquin
This thing is bugging me, and I don’t know what I’ve done wrong…
As I said in the other thread: You simply can not add users in that way. You always have to specify a full JabberID, otherwise the server does not know if you mean delgado@mydomain.com or delgado@some.other.domain.com. However, its possible that there are some clients out there which add the local domain name automatically if no domain is specified. But this would be done on the client side.
Psi belongs not to this clients, because JabberIDs without an @ are usually components, e.g. a transport like icq.mydomain.com. Just adding something could lead into confusing problems when adding an transport…
The thing is that I added them as "gdelgado@mydomain.com", not just “gdeldado”… I used a full JID.
Other thing…
“delgado” is a surname, is not a username nor a jid, i have no idea where it’s getting it from.
I used a full JID.
Ok…thats indeed a problem
Which version of Psi are you using? Psi is able to generate an XML log. Could you provide a log of the packets send/received by your client while adding an user?
I’m sorry I can’t find it…
Psi main-window -> right click on your account -> XML console -> enable
Ok, he it goes, I marked in red whatI think could bethe problem. BTW,I really appreciate your help CoolCat
What it shows is what happens when I (jcasarini@mydomain.com) add VAZQUEZ, Paulo Rodrigo (prvazquez@mydomain.com).
PSI Log:
<iq type=“set” id=“ab52a” >
<query xmlns=“jabber:iq:roster”>
<item name=“VAZQUEZ, Paulo Rodrigo (Mesa de Ayuda)” jid="prvazquez@mydomain.com" />
</query>
</iq>
<presence type=“subscribe” to="prvazquez@mydomain.com" >
<nick xmlns=“http://jabber.org/protocol/nick”>jcasarini</nick>
</presence>
<iq type=“set” id=“635-472” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“none” name=“VAZQUEZ, Paulo Rodrigo (Mesa de Ayuda)” jid="prvazquez@mydomain.com" />
</query>
</iq>
<iq type=“result” id=“635-472” />
<iq type=“result” id=“ab52a” to="jcasarini@mydomain.com/AVMINFOJCG" />
<iq type=“set” id=“740-473” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“none” ask=“subscribe” name=“VAZQUEZ, Paulo Rodrigo (Mesa de Ayuda)” jid="prvazquez@mydomain.com" />
</query>
</iq>
<iq type=“result” id=“740-473” />
<presence from="gdelgado@mydomain.com/DDCST9F1" type=“unavailable” to="jcasarini@mydomain.com/AVMINFOJCG" />
<presence from="prvazquez@mydomain.com" type=“subscribe” to="jcasarini@mydomain.com" >
<nick xmlns=“http://jabber.org/protocol/nick”>prvazquez</nick>
</presence>
<iq type=“set” id=“292-476” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“to” name=“VAZQUEZ, Paulo Rodrigo (Mesa de Ayuda)” jid="prvazquez@mydomain.com" />
</query>
</iq>
<iq type=“result” id=“292-476” />
<presence from="prvazquez@mydomain.com" type=“subscribed” to="jcasarini@mydomain.com" />
<presence from="prvazquez@mydomain.com/D2XD0BF1" to="jcasarini@mydomain.com/AVMINFOJCG" >
<priority>5</priority>
<c xmlns=“http://jabber.org/protocol/caps” node=“http://psi-im.org/caps” ver=“0.11-dev-rev8” ext=“cs ep-notify html” />
</presence>
<iq type=“set” id=“ab54a” >
<query xmlns=“jabber:iq:roster”>
<item jid=“vazquez” />
</query>
</iq>
<presence type=“subscribe” to=“vazquez” >
<nick xmlns=“http://jabber.org/protocol/nick”>jcasarini</nick>
</presence>
<presence type=“subscribed” to=“vazquez” />
<iq type=“set” id=“291-478” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“none” jid=“vazquez” />
</query>
</iq>
<iq type=“result” id=“291-478” />
<iq type=“result” id=“ab54a” to="jcasarini@mydomain.com/AVMINFOJCG" />
<iq type=“set” id=“308-479” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“none” ask=“subscribe” jid=“vazquez” />
</query>
</iq>
<iq type=“result” id=“308-479” />
<iq type=“set” id=“695-480” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“from” ask=“subscribe” jid=“vazquez” />
</query>
</iq>
<iq type=“result” id=“695-480” />
RESEND AUTHORIZATION -
<presence from=“vazquez” type=“error” to="jcasarini@mydomain.com/AVMINFOJCG" >
<error type=“cancel” code=“404” >
<remote-server-not-found xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>
</error>
</presence>
<presence type=“subscribed” to="prvazquez@mydomain.com" />
<iq type=“set” id=“189-481” to="jcasarini@mydomain.com/AVMINFOJCG" >
<query xmlns=“jabber:iq:roster”>
<item subscription=“both” name=“VAZQUEZ, Paulo Rodrigo (Mesa de Ayuda)” jid="prvazquez@mydomain.com" />
</query>
</iq>
This seams to be an problem of Psi. Which version are you using? Something from SVN? If this does happen with an up-to-date version too, you should make a bug report at Psi forums.
Edit: You should use {code:xml}…your code here… for posting XML in this forum and … for openfire logfiles.
Message was edited by: Coolcat
We are using PSI 0.11 (lastest version).
Sorry about the code, first time posting that kinda thing…
Well, finally I was able to solve it.
It was a problem with PSI.
I quote infiniti from PSI forum:
"In the window that handles authorization events (which also handles regular messages), the to/from field uses commas in order to specify multiple addresses. Probably this is a bug in Psi, not escaping nicknames before setting the to/from field."
The way I found to skip this is to change the LDAP fields mapping. PSI supports LDAP fields concatenation, Openfire does not. But both PSI and Openfire read different fields, Openfire uses “Name” to get the name of the user and PSI uses “Nickname”. So, I mapped “Name” to “{CN}” (has a comma), wich Openfire uses to get the names of users added by default to roster and mapped “Nickname” to “{sn} {givenName}” so PSI can get the name with out the comma.
This fixed all our problems.
I hope this is usefull you those running this kind of enviroment.
See you around,
Joaquin