Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
gdahilig #1
Member since Jun 2006 · 19 posts · Location: Pasadena,CA
Group memberships: Members
Show profile · Link to this post
Subject: MiniClient doesn't login
Greetings,

I'm working with the MiniClient in C# using dev studio 2003.  I have gotten everything to comple clean, but when I try to connect to jabber.org, the client doesn't seem to successfully log in.  I'm connecting to Jabber.org with no ssl or tls. Here's my debug stream:

SEND: <stream:stream to='jabber.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="jabber.org" id="4067435098" xml:lang="en" >
SEND: <iq xmlns="jabber:client" id="agsXMPP_2" type="get" to="jabber.org"><query xmlns="jabber:iq:auth"><username>rockorox</username></query></iq>

Nothing else happens, it just sits there.

IM clients (GAIM, GTalk, Pandion) all connect just fine.  So, I don't think it's a firewall or internet connect problem.  I have also tried connecting to different server and I get the same issue.  I figured jabber.org would be a could test.

I have only been looking at the code base for a week now so I'm still getting familiar with it.    Is there something that I'm not doing correctly or a library that I should look at?   Any help would be greatly appreciated.

Gene
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

did you try the binary versions of the MiniClient?
Could you please also try the binary versions of the VS-2005 MiniClient?
I am traveling at the moment and don't have VS 2003 on my laptop. So i will not be able to test and debug it before the end of the next week. Jabber.org switched the server to ejabberd which is a fully XMPP compliant server. I think we did not try the 2003 samples with the new server yet.

Alex
Avatar
gdahilig #3
Member since Jun 2006 · 19 posts · Location: Pasadena,CA
Group memberships: Members
Show profile · Link to this post
I'll try the 2005 binaries right now.  thx...
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Could you please also post the socket log from the 2003 client. From the debug log it looks like the jabber.org server doesnt send a response when you request the login information. You could also try setting xmppCOn.streamversion = "1.0";

Alex
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
i just tried the binary of the VS2003 MiniClient i have here and had no problems at all. The binary version which works for me with my jabber.org account is attached with this post.

Alex
The author has attached one file to this post:
MiniClient2003.zip 111.3 kBytes
You have no permission to open this file.
Avatar
gdahilig #6
Member since Jun 2006 · 19 posts · Location: Pasadena,CA
Group memberships: Members
Show profile · Link to this post
Alex,

I just tried the your attached binaries and I get the following from Socket Debug:

SEND: <stream:stream to='jabber.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4019774856' from='jabber.org' version='1.0' xml:lang='en'>

Oh, and I also tried setting the streamversion to "1.0" in my build of 2003 miniclient, but got the same results as above:

SEND: <stream:stream to='jabber.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2591068261' from='jabber.org' version='1.0' xml:lang='en'

It's slightly different from my posted results earlier, but my compiled versions (and the 2005 version) are now getting this same result.  There must be something wrong with my system.  I checked the windows firewall on my system and I made sure that I added the miniclient to the exception list.  I get the same result.  I also turned the windows firewall OFF and I still get the same results.

I don't understand the issues with it, but is it possible that this could be issue with mono.security.dll has been referenced here? 

Gene Dahilig
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
i don't think it is related to the Mono.Security.dll. Because this dll is only used in the 2003 Version because .Net 1.1 has no SSL support. The 2005 versions don't use/need the Mono.Security.dll and also don't work on your system as you said. So there must be another issue. I don't think it's firewall related because you sent data and received data. You could try to debug the MiniClient and agsXMPP and perhaps see where and why it stops.
Are you running all service packs of .NET 1.1?

Alex
Avatar
gdahilig #8
Member since Jun 2006 · 19 posts · Location: Pasadena,CA
Group memberships: Members
Show profile · Link to this post
I will debug it some more and see if I can narrow it down.  but from what I can tell it is as if both the client *and* the server are waiting on each other.  But, since I'm still learning the Jabber protocol and how the libraries work, I have yet to spot anything specific.  I will re-post additional info as soon find anything.  Thanks!

Gene
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes for me it also looks like the wait for each other. But from your first log its the server who must send data. The weird thing is that the same code works on my machine. It's possible that a exception occurs in agsXMPP and it stops for this reason. To narrow it down a good start would be to set breakpoints in the data receive handler in ClientSocket.cs. Then we will see if the data is coming from the server or not, because it's possible that it stops before the data is written to the debug windows.

Alex
Avatar
gdahilig #10
Member since Jun 2006 · 19 posts · Location: Pasadena,CA
Group memberships: Members
Show profile · Link to this post
Alex,

When connecting to Jabber.org.  I get the following log from the MiniClient:

SEND: <stream:stream to='jabber.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2071564159' from='jabber.org' version='1.0' xml:lang='en'>

In ClientSocket::Connected:
        public override bool Connected
        {
            get
            {
                //....blah...

                // there is no guarantee that the socket is connected even if the
                // Connected property is true
                try
                {
                    // poll for error to see if socket is connected
                    return !_socket.Poll(1, SelectMode.SelectError);
                }
                catch
                {
                    return false;
                }

Appearently, _socket.Poll() throws an exception and the catch returns false.  From this point, things seem to stop.    I also put break points on every catch with this one being the only one that seems to get hit.  Does this make any  sense?

Also, I have installed Wildfire, but I'm not sure I have it config'd correctly.  I don't seem to be able to connect with *any* client whenever it's running locally.  As soon as I get some reasoable logs, I'll post it. 

Any suggestions on what to check next? 

Gene
Avatar
Alex #11
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello gdahilig,

thanks for debugging this.
I can't remember where i have the Poll stuff from. But it must be there for a reason. As the comment sais Socket.Connected is no guarantee that the socket is connected. I think i read this is some .NET article. Anyway, if this does not work for you and causes problems on some systems then we should fix it.
Could you try it with the following code for the Connected property?
  1. /// <summary>
  2. /// Returns true if the socket is connected to the server. The property
  3. /// Socket.Connected does not always indicate if the socket is currently
  4. /// connected, this polls the socket to determine the latest connection state.
  5. /// </summary>
  6. public override bool Connected
  7. {
  8.     get
  9.     {
  10.         // return right away if have not created socket
  11.         if (_socket == null)
  12.             return false;
  13.  
  14.         return _socket.Connected;      
  15.     }
  16. }

Alex
Avatar
gdahilig #12
Member since Jun 2006 · 19 posts · Location: Pasadena,CA
Group memberships: Members
Show profile · Link to this post
Alex,

That fix seems to work.  I wonder what it is that this happens on 2 or 3 of my machines (one of them got set out for an upgrade so I don't have access to it), but not others.  I had updated to the latest .net libs and XP sp2 patches.  Any thoughts?

In either case,  I'll continue with this fix and let you know how it fares.  So far, it's looking good. 

Thanks!

Gene Dahilig
Avatar
Alex #13
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello gdahilig,

i will read the MSDN docs about the Poll on sockets again. I think there are another 2 posts in the forum with a similar problem. And we have one customer that has a similar problem one 1 machine of several hundreds. If i find nothing in the MSDN docs then i remove the Poll. Another solution would be to ignore only this kind of exception. Could you try to get a trace of the complete exception object? Or the error number if there is one?

Thank for your help
Alex
Avatar
Alex #14
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi gdahilig,

i read all the MSDN docs about the Poll again. I think the first paramater which is the timeout could be a problem. Could you please try it with a value of -1 here?

  1. // there is no guarantee that the socket is connected even if the
  2. // Connected property is true
  3. try
  4. {
  5.     // poll for error to see if socket is connected
  6.     return !_socket.Poll(-1, SelectMode.SelectError);
  7. }
  8. catch
  9. {
  10.     return false;
  11. }

Alex
Avatar
Alex #15
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hm, the -1 timeout causes problems on my machine. I think the best would be to remove the Poll stuff at all.
Any comments?

Alex
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:
Page:  1  2  next
Forum: agsXMPP RSS