Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
rameshkasi #1
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: Login failed in windows 8 / IPV4 IPV6
Dear Alex,

I'm using agsxmpp library in C# Projects on windows xp & 7 with openfire for couple of years. Its working properly.
But I have login issue with windows 8 by using the same agsxmpp library.

Observation:
1. In windows 8 system , Both IPv4 and IPv6 are identified and ipv4 is active.
2. I don't find any major differences in wireshark packet capture.

Queries:
1. Is login issue identified in windows 8 and available any patch?
2. Login issue may be raised because of ipv4/v6?

Kindly share your valuable inputs to proceed further..

Thanks
This post was edited on 2014-06-12, 20:36 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You probably run into the ipv6/ipv4 problem like many others did before. The forums search should help you there.
eg: http://forum.ag-software.net/thread/1510-Could-not-connect…
Avatar
rameshkasi #3
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Alex,

I have downloaded the agsXMPP.dll(1.3.1.0) from http://www.ag-software.net/download-directory/.

Then i added agsXMPP dll into project by using add reference. But login issue does not resolved.

Please find the connection status in debug output as follows.,
Connection ChangedConnecting
Connection ChangedConnected
Connection ChangedSecuring

There is no progress after that.

I have done the packet capture by using wireshark.
please guide me any other details need to be verified with packet capture to resolve the login issue.

Thanks
Avatar
Alex #4
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please post your Xml log.
When you get the status Connected and Securing this is no ip problem. You are already connected to the server.

Alex
Avatar
rameshkasi #5
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Thanks Alex.

Please find the xml as below.,

Connection ChangedConnecting
Connection ChangedConnected

  1. Write Xml : <stream:stream to='testdev.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. Read Xml: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="testdev.org" xml:lang="en" version="1.0" id="6db3039b" >
  3. Read Xml: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
  4. Connection ChangedSecuring
  5. Write Xml : <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. Read Xml: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />


Even i have observed that auth request is not triggered.

Thanks
This post was edited on 2014-06-13, 14:37 by Alex.
Avatar
Alex #6
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there is a problem with TLS negotiation. Either on the server, or in your software.
Check if you get the certificate validation callback and if you accept the cert. And check your server logs for Tls issues.
Avatar
rameshkasi #7
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Please find the openfire server log for further debugging.,

2014.06.13 18:52:29 NIOConnection: startTLS: using c2s
2014.06.13 18:52:29 ConnectionHandler:
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:416)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived(AbstractIoFilterChain.java:499)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:293)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
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)
Caused by: javax.net.ssl.SSLException: Unexpected end of handshake data
at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(Unknown Source)
at javax.net.ssl.SSLEngine.unwrap(Unknown Source)
at org.apache.mina.filter.support.SSLHandler.unwrap0(SSLHandler.java:658)
at org.apache.mina.filter.support.SSLHandler.unwrapHandshake(SSLHandler.java:614)
at org.apache.mina.filter.support.SSLHandler.handshake(SSLHandler.java:493)
at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:306)
at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:392)
... 14 more
Caused by: javax.net.ssl.SSLException: Unexpected end of handshake data
at com.sun.net.ssl.internal.ssl.HandshakeInStream.read(Unknown Source)
at java.io.InputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.UnknownExtension.<init>(Unknown Source)
at com.sun.net.ssl.internal.ssl.HelloExtensions.<init>(Unknown Source)
at com.sun.net.ssl.internal.ssl.HandshakeMessage$ClientHello.<init>(Unknown Source)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask.run(Unknown Source)
at org.apache.mina.filter.support.SSLHandler.doTasks(SSLHandler.java:686)
at org.apache.mina.filter.support.SSLHandler.handshake(SSLHandler.java:486)
... 16 more


Thanks
Avatar
Alex #8
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
have you looked at the certificate call back as I suggested?
Have you tried the MiniClient example?
Have you tried the MiniClient example from MatriX?

Alex
This post was edited on 2014-06-13, 21:25 by Alex.
Avatar
rameshkasi #9
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Sorry for the delay. i was busy with other issues.

I have tried MiniClient sample from MatriX which you suggested. But the result of MiniClient is same request and response which already i have shared the xml. I don't find any other request and response.

i need some more clarity about certificate call back. So that i can go through and share the results.

Thanks
This post was edited on 2014-06-18, 13:16 by Alex.
Avatar
Alex #10
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
when you look at the MiniClient example you can see the following function:

  1. private void xmppClient_OnValidateCertificate(object sender, CertificateEventArgs e)
  2. {
  3.    // some code here.
  4. }

There the Tls certificate from your server gets validated.

If you add the following code in this function then it will just will accept your certificate, whether its valid or not.

  1. private void xmppClient_OnValidateCertificate(object sender, CertificateEventArgs e)
  2. {
  3.    // always accept cert
  4.    e.AcceptCertificate = true;      
  5. }

If this also does not work then there must a problem with TLS on your server. In this case try to connect without TLS.

  1. xmppClient.StartTls = false;

Alex
Avatar
rameshkasi #11
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
I have done the changes as suggested in MiniClient like

  1. private void xmppClient_OnValidateCertificate(object sender, CertificateEventArgs e)
  2. {
  3.     // always accept cert
  4.     e.AcceptCertificate = true;
  5.  
  6.     // or let the user validate the certificate
  7.     //ValidateCertificate(e);
  8. }

and
  1. this.xmppClient.StartTls = false;


Result:
  1. SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="testdev.org" version="1.0" >
  2. RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="testdev.org" id="fc358f0f" xml:lang="en" version="1.0" >
  3. RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  4.  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5.  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  6.     <mechanism>PLAIN</mechanism>
  7.     <mechanism>ANONYMOUS</mechanism>
  8.  </mechanisms>
  9.  <compression xmlns="http://jabber.org/features/compress">
  10.     <method>zlib</method>
  11.  </compression>
  12.  <auth xmlns="http://jabber.org/features/iq-auth" />
  13.  <register xmlns="http://jabber.org/features/iq-register" />
  14. </stream:features>
  15. SEND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXXXX</auth>
  16. RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  17.  <not-authorized />
  18. </failure>
  19. SEND: </stream:stream>
  20. RECV: </stream:stream>


But received failed auth response even without TLS. Any idea?

Let check the server settings in mean while.

Thanks
This post was edited 2 times, last on 2014-06-18, 14:33 by Alex.
Avatar
Alex #12
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this is an authentication error now.

Username or Password is wrong.

Alex
Avatar
rameshkasi #13
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
I tried user name without domain. Now Its connected .!!!
Let me implement this call back to resolve the login issue.

Thanks for your great support.

Thanks
- Ramesh Kasi
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS