I would like publish some messages and perform load testing of my docker-based ActiveMQ server using JMeter. I have the configuration in place but for some reason I am not able to see the message getting published in ActiveMQ.
I have the admin console up and running and see that the queues is not getting created either. I also tried to manually create the queue and see if the Jmeter script works, but no luck
I have already added activemq-all-5.15.0 jar in my jmeter/lib/ext folder of JMeter 3.2.
I am also seeing following error in JMeter Results Tree.
javax.naming.NameNotFoundException: jmeter-q
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.apache.jmeter.protocol.jms.Utils.lookupDestination(Utils.java:148)
at org.apache.jmeter.protocol.jms.client.Publisher.<init>(Publisher.java:134)
at org.apache.jmeter.protocol.jms.sampler.PublisherSampler.initClient(PublisherSampler.java:181)
at org.apache.jmeter.protocol.jms.sampler.PublisherSampler.sample(PublisherSampler.java:206)
at org.apache.jmeter.protocol.jms.sampler.BaseJMSSampler.sample(BaseJMSSampler.java:98)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254)
at java.lang.Thread.run(Thread.java:748)
The correct format to provide destination under Destination textbox is
dynamicQueues/jmeter-q
Also please make sure that there should be no spaces at the end of each fields like provideURl, connectionf factory etc.
Related
I am trying to do a LDAP mod operation through Jmeter. Expected behavior - Jmeter would hit server A which in turn would hit server B. Actual modification operation would happen at server B. Server B would complete the operation and give response to server A which in turn would respond to Jmeter.
Now the issue is, Jmeter is always getting the "Referral" response message. However, manually we are able to change the password after hitting server A from different remote server.
Could you someone please suggest how to overcome this?
I am assuming this has been resolved. Just in case you are still wondering, #Rohan , my understanding is that you run jmeter on the command line:
$ jmeter -Jjava.naming.referral=true -n -t testplan.jmx -l log.jtl
JMeter won't have specific behaviour of its own. You will need to tell it to follow referrals by setting java.naming.referral property appropriately in the jndi.properties mechanism defined in the documentation for the JNDI LDAP provider, which you should already have in place for your application if you expect it to behave that way.
My goal is to run a load test using 4 Azure servers as load generators and 1 Azure server to initiate the test and gather results. I had the distributed test running and I was getting good data. But today when I remote start the test 3 of the 4 load generators fail with all the http transactions erroring. The failed transactions log the following error:
Non HTTP response message: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.Log4jFactory (Caused by java.lang.ClassNotFoundException: org.apache.commons.logging.impl.Log4jFactory)
I confirmed the presence of commons-logging-1.2.jar in the jmeter\lib folder on each machine.
To try to narrow down the issue I set up one Azure server to both initiate the load and run JMeter-server but this fails too. However, if I start the test from the JMeter UI on that same server the test runs OK. I think this rules out a problem in the script or a problem with the Azure machines talking to each other.
I also simplified my test plan down to where it only runs one simple http transaction and this still fails.
I've gone through all the basics: reinstalled jmeter, updated java to the latest version (1.8.0_111), updated the JAVA_HOME environment variable and backed out the most recent Microsoft Security update on the server. Any advice on how to pick this problem apart would be greatly appreciated.
I'm using JMeter 3.0r1743807 and Java 1.8
The Azure servers are running Windows Server 2008 R2
I did get a resolution to this problem. It turned out to be a conflict between some extraneous code in a jar file and a component of JMeter. It was “spooky” because something influenced the load order of referenced jar files and JMeter components.
I had included a jar file in my JMeter script using the “Add directory or jar to classpath” function in the Test Plan. This jar file has a piece of code I needed for my test along with many other components and one of those components, probably a similar logging function, conflicted with a logging function in JMeter. The problem was spooky; the test ran fine for months but started failing at the maximally inconvenient time. The problem was revealed by creating a very simple JMeter test that would load and run just fine. If I opened the simple test in JMeter then, without closing JMeter, opened my problem test, my problem test would not fail. If I reversed the order, opening the problem test followed by the simple test then the simple test would fail too. Given that the problem followed the order in which things loaded I started looking at the jar files and found my suspect.
When I built the script I left the jar file alone thinking that the functions I need might have dependencies to other pieces within the jar. Now that things are broken I need to find out if that is true and happily it is not. So, to fix the problem I changed the extension on my jar file to zip then edited it in 7-zip. I removed all the code except what I needed. I kept all the folders in the path to my needed code, I did this for two reasons; I did not have to update my code that called the functions and when I tried changing the path the functions did not work.
Next I changed the extension on the file back to jar and changed the reference in JMeter’s “Add directory or jar to classpath” function to point to the revised jar. I haven’t seen the failure since.
Many thanks to the folks who looked at this. I hope the resolution will help someone out.
I'm doing a Proxy Service with Messaging transportation for Any XML and defining the stage, archive and error folders for a xml processing when configuring the proxy service.
I had included an error handler and when reading the file and an error happens, the file must be moved for error folder.
Currently when doing my test and an error happens, the file is moved to archive instead of error folder.
Are there something that I need to add and get this working?
Basically the complete scenario is a Proxy Service polling a folder, reading the XML and sending to Business Services as a XML messaging.
Could you give me directions to make this working or tips that I need to check?
Thanks
Edson
A wild guess - Is it because you have an error handler and you may be doing a success reply from the handler. Have you tested removing the error handler or reply-with-failure from the handler ?
We need to download multiple files on a hourly basis from a vendors FTP site. The vendor provides two ftp sites for fault tolerance with both sites having identical files. I would like to setup a Camel route to download the files from ftp site A if its available and if not try ftp site B. The following code is incorrect but it may highlight what I am trying to achieve.
from("timer://timer1?fixedRate=true&period=60m")
.loadBalance()
.failover(-1, false, true)
.to("direct:ftp-symbolguides-1")
.to("direct:ftp-symbolguides-2")
.end();
from("direct:ftp-symbolguides-1")
.to("ftp://SiteA?localWorkDirectory=c:/temp&passiveMode=true&noop=true&idempotentKey=${file:name}-${file:size}&idempotentRepository=#idempotentRepository")
.to("file:/c:/temp/inbox");
from("direct:ftp-symbolguides-2")
.to("ftp://SiteB?password=publicftp&localWorkDirectory=c:/temp&passiveMode=true&noop=true&idempotentKey=${file:name}-${file:size}&idempotentRepository=#idempotentRepository")
.to("file:/c:/temp/inbox");
Does anyone have any thoughts on how I can achieve this?
When the connection fails by default ftp consumer produces a WARN message instead of throwing an exception, but by the throwExceptionOnConnectionFailed property you can change to throw exception, and handle exception from the
PollingConsumerPollStrategy[1] rollback() method.
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/PollingConsumerPollStrategy.html
I am new to Mule and I have been struggling with a simple issue for a while now. I am trying to connect to flat files (.MDB, .DBF) located on a remote desktop through my Mule application using the generic database connector of Mule. I have tried different things here:
I am using StelsDBF and StelsMDB drivers for the JDBC connectivity. I tried connecting directly using jdbc URL - jdbc:jstels:mdb:host/path
I have also tried to access through FTP by using FileZilla server on remote desktop and using jdbc URL in my app - jdbc:jstels:dbf:ftp://user:password#host:21/path
None of these seem to be working as I am always getting Connection exceptions. If anyone has tried this before, what is the best way to go about it? Connecting a remote flat file with Mule? Your response on this will be greatly appreciated!
If you want to load the contents of the file inside a Mule flow you should use the file or FTP connector, i don't know for sure about your JDBC option.
With the File connector you can access local files (files on the server where mule is running), you could try to mount the folders as a share.
Or run an FTP server like you already tried, that should work.
There is probably an error in your syntax / connection.
Please paste the complete XML of your Mule flow so we can see what you are trying to do.
Your usecase is still not really clear to me, are you really planning to use http to trigger the DB everytime? Anyway did you try putting the file on a local path and use that path in your database url. Here is someone that says he had it working, he created a separate bean.
http://forums.mulesoft.com/questions/6422/setting_property_dynamically_on_jdbcdatasource.html
I think a local path is maybe possible and it's better to test that first.
Also take note of how to refer to a file path, look at the examples for the file connector: https://docs.mulesoft.com/mule-user-guide/v/3.7/file-transport-reference#namespace-and-syntax
If you manage to get it working and you can use the path directly in the JDBC url, you should have a look at the poll scope.
https://docs.mulesoft.com/mule-user-guide/v/3.7/poll-reference
You can use your DB connector as an inbound endpoint when wrapped in a poll scope.
I experienced the same issue when connect to Microsoft Access Database (*.mdb, *.accdb) using Mule Database Connector. After further investigation, it's solved by installing Microsoft Access Database Engine
Another issue, I couldn't pass parameter to construct a query as same as I do for other databases. e.g.: SELECT * FROM emplcopy WHERE id = #[payload.id]
To solve this issue:
I changed the Query type from Parameterized into Dynamic.
I generated the query inside Set Payload transformer (generate the query in form of String, e.g.: SELECT * FROM emplcopy WHERE id = '1').
Finally, put it into the Dynamic query area: #[payload]