powered by Jive Software

JabberNet on OpenFire - can't authenticate

Hi,

I am developing a solution based on a OpenFire server and custom client app that is using JabberNet library (developed in VB.NET). Unfortunately I couln’t even get as far as to authenticating the client to the server. I wonder if anyone who experienced a similar problems can help me out?

Here are some fact:

  • OpenFire server installed properly, with all default options.

  • few user accounts created

  • login of these users works OK, confirmed by separately installed Spark client (on a remote machine)

  • in my custom client app, the JabberClient class is used for XMPP communication.

  • here are some basic settings for the instance of this class (jc):

AutoLogin: True
AutoPresence: True
AutoReconnect: 0.0
AutoStartTLS: False
Connection: Socket
KeepAlive: 30.0
PlaintextAuth: False
Port: 5222
RequiresSASL: False
SSL: False
SSLon: False

  • when I execute jc.Connect( ) , I expect the client to be authenticated within seconds (because of AutoLogin=True setting). That doesn’t happen. I let the program wait in a 90 seconds loop, regularly checking the jc.IsAuthenticated flag. But that one remains False all the time.

  • I also tried with AutoLogin=False, and putting the jc.Login( ) within the waiting loop. But still no success. The client remains not logged in.

Can anyone advise what setting to adjust whether on OpenFire or the JabberClient, so I can pass this apparently simple step?

There is one very strange and interesting fact: when I run the program in debug mode, sometimes I manage to login (!) . If you are familiar with Visual Studio, you know you can put a brakpoint within the code, while running in debug mode… and then execute the commands in “Immediate” window, while the program is waiting. So I put the breakpoint within a waiting loop, program stops there, I doublecheck the jc.IsAuthenticated flag - still False… then I execute this in the Immediate widow: jc.Login ( ) . After that the I step-through the code again, and on the next jc.IsAuthenticated check - it miracleously turns to TRUE (!) . The component appear logged in, which I can also confirm if I go to the server’s admin console.

That is the ONLY way I managed to get my client authenticated - only in debug mode, only when I execute jc.Login( ) in Immediate window. Maybe that gives any cleu to what is going on, but not to me; I tried several other combinations, increasing the wait time, repeating the jc.Login( ) outside or inside the loop - nothing helps.

Thank you.

Nenad

Oh, about 4 days ago I began work on same problem.

This is JabberNet problem, I haven’t solution for ovveride this yet, but we can cooperate to solve this problem.

In my situation Spark works normal too.

At next week i will debug Kerberos authentication in JabberNet. I found problems:

  1. JabberNet dont get Kerberos principal name (xmpp/server.domain.local/DOMAIN.LOCAL)
  2. Even if I hardcoded it into library, Kerberos authentication don’t work

It is not OpenFire problem, because JabberNet can authenticate with username&password on OpenFire.

P.S. It is fun, but Matrix XMPP SDK (cost > 1000 EUR) cannot authenticate to OpenFire. You can handle OnError exception in XmppClient on both libraries, and exceptions are same

fyi, I resolved the problem…

I made a mistake during the initial server setup. I put just “xmpp” for the Server Name, while it should have been “xmpp.maindomain.com”. I don’t know why I thought that the main domain of the network the server resides on would be added by default.

So now it works just fine.

Nenad

If you have solved your issue, then mark your thread as Answered