Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
bilalkhan #1
Member since Oct 2016 · 81 posts · Location: Pakistan
Group memberships: Members
Show profile · Link to this post
Subject: exception occurs during load testing
am using JMeter for load testing of xmpp server, it throws exception org.jivesoftware.smack.SmackException$ResourceBindingNotOfferedException

and the load is up to 25, some of the login action get failed and this exception occurs
org.jivesoftware.smack.SmackException$ResourceBindingNotOfferedException
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
looks like you server is not XMPP comp0liant and does not offer resource binding in the stream features.
Avatar
bilalkhan #3
Member since Oct 2016 · 81 posts · Location: Pakistan
Group memberships: Members
Show profile · Link to this post
if the server does not offer resource binding why 50 out of 70 get connected and 3 or 4 get not successfully login.

during login our server cross verify, the user from database, whether the user is authentic or not using plain text mechanism username and password. When i connect 70 user at a time it takes time, and does not send bind stream in specific interval of time, that's why this exception occurs.
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I don't know how Smack works internal.
Maybe it waits only a certain amount of time for resource binding and your server responds to slow.
Avatar
bilalkhan #5
Member since Oct 2016 · 81 posts · Location: Pakistan
Group memberships: Members
Show profile · Link to this post
Below is the code on which our server listen the incoming request ? can you identify from  the code our server is slow? 


  1. private void Listen()
  2. {
  3.     //IPHostEntry ipHostInfo = Dns.Resolve(XmppSeverConnection.XmppDomain);
  4.     //IPAddress ipAddress = ipHostInfo.AddressList[0];
  5.  
  6.     IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Parse(ConnectionManager.XmppDomain), Convert.ToInt32(ConnectionManager.XmppPort));
  7.     //IPEndPoint localEndPoint = new IPEndPoint(ipAddress, Convert.ToInt32(XmppSeverConnection.XmppPort));
  8.     socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
  9.     socket.Bind(localEndPoint);
  10.     socket.Listen(10000); //what if i increase it's value
  11.     isListening = true;
  12.     while (isListening)
  13.     {
  14.         allDone.Reset();
  15.         socket.BeginAccept(new AsyncCallback(AcceptCallBack), socket);
  16.         allDone.WaitOne();
  17.     }
  18.     //msg.Body
  19. }
  20.  
  21. private void AcceptCallBack(IAsyncResult arg)
  22. {
  23.     allDone.Set();
  24.     Socket newSocket = socket.EndAccept(arg);
  25.     Task.Factory.StartNew(() =>
  26.     {
  27.         ConnectionManager con = new ConnectionManager(newSocket);
  28.     });
  29.  
  30. }
This post was edited on 2016-12-19, 12:44 by Alex.
Avatar
Alex #6
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no I can't.
Writing a XMPP server is pretty complex, and there are many different ways to handle connection and multi threading.
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