Unsuccessful Login with JMeter

Unsuccessful Login with JMeter

by Andi Sugandi -
Number of replies: 15
Glad that someone gets the fix.

Which codes (or lines) in the original JMX file that need to be modified to solve the issue?

Thank you in advance.
Average of ratings: -
In reply to Andi Sugandi

Re: Unsuccessful Login with JMeter

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

What is your problem exactly? "Unsuccessful Login" may have different causes. The original problem of Julius Saputra was that JMeter has http as default but his site was https. Although his server redirects, the POST information got lost: https://moodle.org/mod/forum/discuss.php?d=402193#p1623270.

The cause of your problem may be different. I was checking the documentation https://docs.moodle.org/dev/JMeter the other day https://moodle.org/mod/forum/discuss.php?d=423923 and it works as documented, at least for the http (not https) site I was testing.
In reply to Visvanath Ratnaweera

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
Hi,

Thank you for the reply, really appreciated it.

The issue still persists (displayed on JMeter Dashboard):

https://paste.opensuse.org/view/simple/45009091

Altough all the part (in JMX file) that has this line: POST
has been modified as Julius Saputra does:

*snipped:
443 ... HTTPS
---

My Moodle site also using HTTPS.

I'm also using JMeter latest version (5.4.1) and 5.2.1 as well.

What do you suggest?
In reply to Visvanath Ratnaweera

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
Hi,

Actually, my failed result happens when using the size of course: "L" (2.05% FAILED), using "M" resulting 100% PASS.

And still, using the modified JMX version like Julius Saputra did:

https://paste.opensuse.org/view/simple/27428894

Thank you, and best regards.
In reply to Andi Sugandi

Re: Unsuccessful Login with JMeter

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
So it looks like your problem is with the 'S' in HTTPS. The site I am testing now is HTTP only. I am more concerned on checking and updating the documentation https://docs.moodle.org/dev/JMeter and less keen on switching to HTTPS. Hope somebody else will come to help.

BTW, I know, it is almost impossible to quote code in the HTML editor here. Why don't you attach them to the forum post. You can open this and other features by clicking on 'Advanced' link when you are writing. The "pastebin" type of links will break sooner or later. Moodle.org is a site where its very first post is still intact https://moodle.org/mod/forum/discuss.php?d=1.
smile

In reply to Andi Sugandi

Re: Unsuccessful Login with JMeter

by Julius Saputra -

Hi Andi

Not 100% sure 

but if that happened probably the problem was on your web server. And you probably need to tweak your apache or server setting for the amount of concurrent users. 


Regards, Julius

In reply to Julius Saputra

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
Hi Julius and all,

Thank you for the hints, really appreciate it.

BTW. Does "concurrent users" setting relate to `max-connections`?

If so, I will try to increase `max-connections` both on the web and database server sides:

https://ubiq.co/tech-blog/increase-max-connections-apache/

https://tecadmin.net/check-update-max-connections-value-mysql/

Best regards.
In reply to Julius Saputra

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
Hi Julius and all,

I'm counting the "Login" words/lines in my "result12.csv" file (see screenshot attached): 451 PASS (true), and 6549 FAILED (false). Those values came by using these commands respectively:

grep 'Login,200,OK' path/to/results/result12.csv | grep 'true'  | wc -l
grep 'Login,200,OK' path/to/results/result12.csv | grep 'false'  | wc -l

In the end, resulting: 97.95% OK and 2.05% KO/FAILED.

Just curious why the failure only happens in the "Login" test, where other tests are PASS (true)?

Thank you in advance.

Best regards, Andi.
Attachment result12.csv file by JMeter (marked).png
In reply to Andi Sugandi

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
[UPDATED]

I'm counting the "Login" words/lines in my "result12.csv" file (see screenshot attached): 451 PASS (true), and 6549 FAILED (false), AND the "Logout" words/lines: 6230 PASS (true), and 770 FAILED (false).

...

Just curious why the failure only happens in the "Login" and "Logout" tests, where other tests are PASS (true)?

--
Thank you and best regards, Andi.
In reply to Andi Sugandi

Re: Unsuccessful Login with JMeter

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> grep 'Login,200,OK' path/to/results/result12.csv | grep 'true' | wc -l

So your JMeter script does log in? The subject line says "Unsuccessful Login with JMeter". Are talking about a new problem? As I understand, your problem is some percentage of JMeter logins fail. This is a different problem than what OP https://moodle.org/mod/forum/discuss.php?d=402193#p1622872 had.
In reply to Visvanath Ratnaweera

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
Hi,

I just figured out that my issue related to failed in expecting strings* response from the web server (but does login).

*)
/<div class="logininfo">You are logged in as/

I thought it failed to log in (in a number of samples) so it didn't get what was expected. 

---

So I'd rather fill a new post, right?

Really sorry for hijacking this post.
In reply to Andi Sugandi

Re: Unsuccessful Login with JMeter

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You say 'using the size of course: "L" (2.05% FAILED), using "M" resulting 100% PASS'. Isn't that how load testing is supposed to work, or specifically stress testing?

Of course you have to monitor relevant system parameters like CPU load, RAM utilization, network traffic, to see which one hits its limits. See for example the discussion How do you monitor your Moodle server? (linked to https://docs.moodle.org/en/Performance_FAQ).
In reply to Visvanath Ratnaweera

Re: Unsuccessful Login with JMeter

by Andi Sugandi -
Hi,

That would be interesting to have real-time monitoring applications (maybe) like ELK stacks provides, to see the details on how much JMeter is consuming the resources it's testing on.

BTW, I am running this Moodle site via Docker Swarm cluster (although it is still running in a single node), and see that the computer resources are still enough (please see the image attached) to load the testing coming from JMeter.

What do you think?

Thank you, and best regards. Andi.
Attachment docker stats.png