This thread is archived
9 Replies Last post: Aug 25, 2005 8:33 AM by Alex Wenckus  
Yossi   3 posts since
Aug 17, 2005
Currently Being Moderated

Aug 17, 2005 8:22 AM

Problem with domains

I have a problem with connecting to an intranet Jabberd server with Smack.

The server''s local name is X.local, its external name and hostname are X.com.

When I try to login using X.local I see the following transcript:

 

Sent:

+ yossi + Received: + Disconnected]]>+

 

And in the Jabberd error log the message:

bouncing a routed packet to yossi@X.local from 16@c2s/A162BD8: Internal Delivery Error

 

When I add a /etc/hosts entry for X.com on the client and try to connect using X.com, everything works.

Alex Wenckus Jiver 1,029 posts since
Jan 13, 2005
Currently Being Moderated
Aug 17, 2005 8:53 AM in response to: Yossi
Re: Problem with domains

so then what is the issue?

Alex Wenckus Jiver 1,029 posts since
Jan 13, 2005
Currently Being Moderated
Aug 17, 2005 9:10 AM in response to: Yossi
Re: Problem with domains

It probably would be a good thing in your situation if you could specify the hostname seperatly from the jabber server name. I have the same network setup as you but dont experience the same issue with Jive Messenger.

Matt Tucker Jiver 3,151 posts since
Jun 28, 2001
Currently Being Moderated
Aug 17, 2005 10:44 AM in response to: Yossi
Re: Problem with domains

It sounds like Jabberd is not acting the way it perhaps should. The code in PacketReader of Smack does:

 

// Use the server name that the server says that it is.

connection.host = parser.getAttributeValue(i);

 

So, the server won''t report back it''s proper name and instead just throws an error.

Any chance you could use a different server like Jive Messenger?

 

-Matt

Alex Wenckus Jiver 1,029 posts since
Jan 13, 2005
Currently Being Moderated
Aug 17, 2005 9:20 AM in response to: Yossi
Re: Problem with domains

my recommendation to you is to overwrite XMPPConnection(host, port) make it something like XMPPConnection(serverName, host, port) which really wouldn''t work though now that I look at it because init() is private so you wouldn''t be able to access it from your created class. You can go through init if you like and see if there are any private method''s called but any protected methods you would have to override also with a call to super so this hack might get complicated rather quickly Maybe its quicker to just hope for a fix.

Matt Tucker Jiver 3,151 posts since
Jun 28, 2001
Currently Being Moderated
Aug 17, 2005 11:00 AM in response to: Yossi
Re: Problem with domains

I knew that Smack was supposed to do this, but it

doesn''t seem to work, at least in my case.

 

It doesn''t work because the server doesn''t let it. Maybe there''s a config change in Jabberd that would let it work. Otherwise, you''d have to change Smack as suggested above.

 

Seems to

me Jabberd is one of the most commenly used XMPP

servers, isn''t it?

 

Definitely true, but it''s not the best server anymore IMHO.

 

The reason I am not using Jive is that I need

transport support, how far along is Jive there?

Anyway, I will need to support customers with

Jabberd...

 

Transports are working well with Jive Messenger now (the Py* transports).

 

Regards,

Matt

Heath Abelson   1 posts since
Aug 25, 2005
Currently Being Moderated
Aug 25, 2005 8:25 AM in response to: Yossi
Re: Problem with domains

I am new to using smack, and for that matter, Jabber. I am having similar problems where I am trying to create a client to connect to Google''s jabber server. The server name is talk.google.com but the user domain is user@gmail.com

 

There doesn''t appear to be a way in smack to get around this. The workaround I tried was to pass a SocketFactory to XMPPConnection that will create a socket to the servername, but still use the domain name as the host parameter. That doesn''t seem to get around it. Does anyone have any suggestions?

Alex Wenckus Jiver 1,029 posts since
Jan 13, 2005
Currently Being Moderated
Aug 25, 2005 8:33 AM in response to: Heath Abelson
Re: Problem with domains

The progress of getting smack to connect to google will be updated here:

 

http://www.jivesoftware.org/forums/thread.jspa?threadID=15578&tstart=0

More Like This

  • Retrieving data ...