Summary: | Authorization does not work for JMS Publisher and JMS Subscriber | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Yaroslav <slavko_h> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | p.mouawad, thorsten_krueger |
Priority: | P2 | ||
Version: | 2.5.1 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 51996 | ||
Bug Blocks: | |||
Attachments: |
JMS Subscriber screenshot
Test JMX Fix to the issue jmeter log Test Plan screenshot activemq conf files jmeter test plan |
Description
Yaroslav
2011-08-19 18:37:16 UTC
Hello, Can you post your JMX file. Are you sure you set JNDI properties for user and password ? Regards Philippe Mouawad Created attachment 27496 [details]
JMS Subscriber screenshot
I do not use "JNDI Properties" flag. See attached screenshot. Created attachment 27522 [details]
Test JMX
Scenario that shows the issue.
It works with ActiveMQ:
It requires setting in credentials-enc.properties:
activemq.username=system
activemq.password=ENC(bNDG0WY3R49MCylXtUWfGW1SAy563g6E)
guest.password=ENC(bNDG0WY3R49MCylXtUWfGW1SAy563g6E)
And using activemq-security.xml and changing:
<authenticationUser username="system" password="${activemq.password}"
groups="users,admins"/>
And starting it with:
export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
/activemq start xbean:conf/activemq-security.xml
Created attachment 27523 [details]
Fix to the issue
Hello,
Here is the fix, it fixes the following issues related to this:
1) Issue in JMS Subscriber and JMS Publisher with the checkbox, when "Use Authorization" is checked User name and password are disabled (which is wrong) => I fixed it
2) Issue in Utils where createConnection was not called with user/password => That's why it didn't work
3) Issue if you have a mix of Authenticated connection and not
Regards
Philippe Mouawad
Thanks again! Fix applied: URL: http://svn.apache.org/viewvc?rev=1172077&view=rev Log: Bug 51691 - Authorization does not work for JMS Publisher and JMS Subscriber Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPublisherGui.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSubscriberGui.java jakarta/jmeter/trunk/xdocs/changes.xml *** Bug 51667 has been marked as a duplicate of this bug. *** Jmeter 2.5.1 (r1177103) Simple TP - just one "JMS Subscriber" sample (see YH1168.jpg attached). Run from GUI produces "NullPoinerException" error - see jmeter.log attached; I'm using activemq-all-5.3.1.jar (attached). The file has to be placed into "lib\ext" directory. So, the issue is reopened. Question: why activemq-all-5.3.1.jar has to be placed into "lib\ext" rather than just into "lib" directory? Created attachment 27734 [details]
jmeter log
Created attachment 27735 [details]
Test Plan screenshot
Sorry cannot attach activemq-all-5.3.1.jar due to size-limiting. Please attach: - activemq configuration files, no need for jar - test plan not just screenshot - any file you use in test plan Thank you Also try to replace in your test variables by their real values to exclude any misloading of CVS. Test against ActiveMQ5 is OK for me with one subscriber as in your Test Plan. Regards Philippe Hi Philippe, 1) why do you ask for activemq files if the java-code in Description works fine; NP, I will provide; 2) it does not work when I provide user/password by their values; 3) Jmeter 2.4 provides handled-error that user/paswword is not correct; 1) activemq conf files are attached (some security files are not included); 2) TP is attached; 3) TP is simplified and does not use any data files; 4) TP is updated to not use variables; Created attachment 27739 [details]
activemq conf files
Created attachment 27740 [details]
jmeter test plan
Once again, the java-code provided in the description works fine with my activemq configuration (username and password need to change). I reproduced NPE with your test case. Regarding your question, you can put libraries in lib also. Issue has been fixed in trunk by fixing 51996. But your test plan also enabled me to see a NPE that occurs when user/password is wrong, fix will be available within minutes. So thank you very much. Regards Philippe (In reply to comment #19) > I reproduced NPE with your test case. > Regarding your question, you can put libraries in lib also. > > Issue has been fixed in trunk by fixing 51996. Start Of wrong comment > But your test plan also enabled me to see a NPE that occurs when user/password > is wrong, fix will be available within minutes. > Ignore from "Start Of wrong comment" > So thank you very much. > Regards > Philippe Date: Sat Oct 8 19:06:06 2011 New Revision: 1180462 URL: http://svn.apache.org/viewvc?rev=1180462&view=rev Log: Bug 51691 - Authorization does not work for JMS Publisher and JMS Subscriber Adding some comments just to clarify why 51996 fix fixes this NPE issue Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java jakarta/jmeter/trunk/xdocs/changes.xml Hello Yaroslav, You can test if fix is OK by getting ,nightly build at: https://builds.apache.org/job/JMeter-trunk/lastSuccessfulBuild/artifact/trunk/dist/ Regards Philippe Verified r1183374 The issue has been passed QA Thanks for verification. Marking issue as RESOLVED to avoid it appearing in Bug Report. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2515 |