The issue is that login to the server fails, and the work around of adding the /etc/hosts line is not acceptable because this is not the “real” address of X.com.
Using clients such as Gaim I have no problem to connect to the server, by using the “Connect Server” property to set the internal name of host. This should be possible using Smack too, and from what I saw it is supposed to work (Smack uses the JID it gets back from the server), but it does not work in my case.
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.
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.
I knew that Smack was supposed to do this, but it doesn’‘t seem to work, at least in my case. Seems to me Jabberd is one of the most commenly used XMPP servers, isn’'t it?
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…
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).
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?