Hi,
i’'m not able to log into my ejabberd server (sphene.net) using smack any more. I guess this is because of the added TLS support… I have no problem logging into e.g. jabber.org using TLS with my client … the backtrace is:
java.io.EOFException: no more data available - expected end tag
any idea why this happens ? an error in ejabberd’'s TLS support ? Is there a possibility to deactivate TLS in smack ?
cu & tia
Herbert Poul
Hello,
For J-EAI, I have been integrating Smack with Open Adaptor and ejabberd and all is working very well.
Are you using the class XMPPConnection in your code or SSLXMPPConnection ?
You could check what I have done in J-EAI if you like (See: http://www.process-one.net/en/projects/j-eai/)
I hope this helps,
–
Mickaël Rémond
i’‘m using the normal XMPPConnection class … and … have you also tried it with smack 2.0.0 which introduces TLS support ? imo this is where ejabberd is somehow incompatible with smack … (i guess i’'ll try disabling TLS support in ejabberd to see if it works then)
cu
Herbert Poul
i have now disabled TLS in ejabberd … and it’'s even stranger . since i now only get a no response from server error … (i can still log in using psi)
the code i’'m using is:
public static void main(String[] args) {
String jid = args[0];
String password = args[1];
XMPPConnection.DEBUG_ENABLED = true;
XMPPConnection conn;
try {
conn = new XMPPConnection(StringUtils.parseServer(jid));
conn.login(StringUtils.parseName(jid),password);
System.out.println(“Logged In.”);
conn.close();
} catch (XMPPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
(with args[0] = "anothertest@sphene.net" … args[1] = … )
Sent Packets:
(XMPPConnection.java:130)
at net.sphene.goim.rcp.test.SmackTest.main(SmackTest.java:21)
Hey Herbert,
I created SMACK-80 for this problem. I’'m still trying to set up an ejabberd server with TLS enabled. Will let you know when a fix is available.
Regards,
– Gato
Hey Herbert,
AFAIK, if the server is not using TLS then the opening stream shouldn’'t be including a 1.0 version.
“When a receiving entity that complies with this specification receives an initial stream header that includes the ‘‘version’’ attribute set to a value of at least “1.0”, after sending a stream header in reply (including the version flag), it MUST include a element (qualified by the ‘‘urn:ietf:params:xml:ns:xmpp-tls’’ namespace) along with the list of other stream features it supports” (http://www.xmpp.org/specs/rfc3920.html#tls. Section 5.1.3)
You may want to report this issue to ejabberd developers.
Regards,
– Gato
hi,
ok … thanks … i guess this is my fault then since i just disabled the starttls in the config file … which is by default enabled… it just doesn’'t change the version attribute …
no idea if it is removed when ejabberd is compiled without tls support (i somehow doubt that … and … i see no configuration option to change it …)
i guess i’'ll look into the ejabberd forums if this is known …
cu
Herbert Poul
Hey Herbert,
I tried to reproduce the parsing problem using ejabberd 0.9.1 and Smack 2.0.0 and it worked fine. Are you still having the SMACK-80 issue? Could you post your Smack code or a test case?
Regards,
– Gato
hi,
ok, sorry to have bothered you … it was an error in my ejabberd server shame… i guess because i’'ve used the version from the subversion repository or something … anyway … it works now with tls … thx …
cu
Herbert Poul