OK, I’ve been busy. I haven’t blogged in a long time. Life can be that way. I have a whole ton of stuff to tell you about, and first on the list is a whole series on my favorite tool, TabJolt.
This post is going to get into how to do a basic install. It’ll document some of the mistakes people tend to make when working with TabJolt the first time. I’ve managed to make just about every mistake there is, so consider this post a fount of wisdom about what not to do.
The second post will dive into more advanced uses of the tool such as metrics gathering and configuration settings. I’ll likely finish off with a post on interpreting TabJolt results and building your own vizzes based on what TabJolt spits out.
To begin, I’m going to assume you’ve downloaded TabJolt from github and read the installation guide. You haven’t, you say? Well, go do it. Now. Kaifeng didn’t spend all that time writing the guide just for his health.
Here’s where I set your expectations:
First time using TabJolt? It’s quite likely things won’t go completely smoothly. In fact, you can depend on it 🙂
…and that’s OK. There are lots of moving parts here and the chances of you doing everything perfectly the first time are low. You will see errors. No big whoop. Just work through the config process a step at a time, and TEST each step as you go to make sure it works so that it’s easier to spot where you made your error if you do happen to trip up.
Rule #1: Don’t install and run TabJolt on the machine you’re going to be testing. It needs to be on a different box and it will point to the Tableau Server you want to drive load against.
Corollary #1: TabJolt config files generally point to localhost “out of the box”. If you don’t remember to point to your Tableau Server instead, you’ll have connection failures and/or will unwittingly collect performance data about your TabJolt machine, not your Tableau Server.
Installing Java
Just like the fine manual says, you need to install Java. If you get a message: ‘java’ is not recognized as an internal or external command, operable program or batch file, it means you didn’t do what you were supposed to…OR that you have, but you’re still in a command window that was open before you installed Java. You’re going to want to do your work in a new, “post Java install” command window.
The first thing I do when I hit a new machine I want to install TabJolt on is to execute java -version to make sure Java is installed and it’s a recent version. If you don’t see it or you’re not running 1.8+, install it. Here I am out on http://java.com/en/download/manual.jsp:
After Java is installed, launch a new command window and check yourself.
Java and the Windows Firewall
If Java wasn’t already installed on your machine and you install it yourself, you’ll likely get this prompt the first time you run the “go” batch file that launches TabJolt:
Breathe deeply and don’t just start clicking buttons! Seriously. I’ve been onsite with several clients who blasted through this dialog without really paying attention and we had a bear of a time getting TabJolt to run properly as a result. In one case, we gave up and just started with a clean machine because we couldn’t disable Windows Firewall altogether and couldn’t properly reconstruct the rules that were not created correctly when we had a chance to.
At a minimum, you need to allow Java to communicate on Domain and Private networks. I personally tend to enable all three network types since the TabJolt box I’m working with is often a “throw away machine” that was provisioned strictly for testing and will get blown away as soon as testing is complete.
Lesson: If inbound rules for your firewall don’t get created properly, TabJolt is not going to work right. Don’t rush through the Firewall dialogs.
Installing Postgres
The documents suggest that you install a new instance of Postgres to support TabJolt. This is the most simple and best thing to do, but isn’t always a viable option. For example, I run different instances of Tableau Server on different machines and sometimes install TabJolt on each one. I use TabJolt on Machine1 to test Machine2, and I use TabJolt on Machine2 to test Machine1. If you go this route, you’re going to want to use the copy of Postgres that got installed by Tableau Server itself to host your results database.
This is possible, but you’ll need to do some Googling to figure out how to determine the admin username and password for your specific instance of “Tableau’s Postgres” …and then you’ll need to modify some of the base values in the config/PerfRunHarness.Properties file to match. Keep in mind that adding your own database to Tableau’s Postgres is not supported by Tableau and not recommended. Don’t do this on a production machine, ever.
Here I’ve added the PerfResults database to my existing Postgres instance and changed the name of the owner to the admin/root user.
Then, I’m modifying the harness file to use a different port, username, and password:
Basic Configuration File Editing
Before you can run TabJolt, you must make at least two changes to files in the /config folder
ServerTestConfig.yaml
You’ll need to change the hostUri value from http://localhost to the name of your Tableau Server (remember Corollary #1?) . Double-check your server name and be careful with your spaces. Note the space between hostUri and my server name below? It needs to stay there.
If you inadvertently remove it, you’ll get the error below when you try to run TabJolt.
Here’s the error in plain text for Google-ification:
Exception in thread “main” java.lang.NullPointerException
at com.tableausoftware.test.tools.perfRunHarness.PerfRunHelper.getTestPassId(PerfRunHelper.java:613)
By the way, the same thing holds true for the name and password properties of user in the same file:
In fact, just about any error that mentions getTestPassId probably has something to do with an incorrect or malformed entry in ServerTestConfig.yaml. Examine it carefully.
A “bad” server (hostUri) name is frequently the cause of errors that come later.
Vizpool.csv is the next file to touch, and you’ll want to include a pointer to a “known, good” viz. I’d recommend you start with a single viz – no more. BTW – the information provided on page 9 of the installation guide is quite complete, so just follow it and you should be in good shape.
Assuming that you haven’t modified any other settings or config files, when you run TabJolt here’s what’s happening:
- Tabjolt will attempt to hit the machine specified in hostUri (ServerTestConfig.yaml)
- TabJolt will use the Guest user to login to Tableau Server (because you didn’t include a username & password in ServerTestConfig.yaml)
- TabJolt will attempt to access the viz specified in vizpool.csv and execute it as Guest
Errors, Errors, Errors
It’s not uncommon to see something like the following at this point – nothing but errors. You execute x samples and get x problems:
What we’re seeing above tells us that TabJolt is able to get to Tableau Server but then something goes off the rails. Your problem will generally be one of the following:
- TabJolt is trying to login as “Guest” when you really want it to login with the username / password you configured in ServerTestConfig.yaml
- Your Tableau server doesn’t use SSL, but you used https://severname in hostURI
- The username and/or password you specified in ServerTestConfig.yaml is not correct or doesn’t exist for the site your viz lives in
- You didn’t specify a username & password in ServerTestConfig.yaml, and TabJolt is therefore trying to execute your viz as “Guest’…but you forgot to grant permissions on the workbook and/or views TO the Guest user…or you forgot to enable Guest on Tableau Server altogether
- The string you stuck in vizpool.csv which points to your viz is bad
First, swing for the fences: For issue #1, set the forceLogin property of PerfTestConfig.yaml to true and see how things go. Even if you don’ t think you’re running into problem #1, just try it anyway. Humor me.
Didn’t, work, huh?
Well, then the remaining 60-70% of the time my problem is #5. Maybe I’m just sloppy, but that’s where I start troubleshooting, anyway. How?:
- Logout of Tableau Server and close any open browser windows
- Take the string from vizpool.csv and “complete” it: /views/WorldIndicators/GDPpercapita becomes http://myserver/views/WorldIndicators/GDPpercapita or /site/newsite/views/WorldIndicators/GDPpercapita becomes http://myserver/t/newsite/views/WorldIndicators/GDPpercapita. Paste this into the browser and see if it “works”. Does the viz exist? Are you prompted to login when you should see it “automatically” via the Guest account? Are you denied permissions to view the viz?
Here are some other things you might have done wrong, and the way they assert themselves in TabJolt:
You forgot the leading “/” on the string inside vizpool.csv:
Instead of /views/WorldIndicators/GDPpercapita or /site/newsite/views/WorldIndicators/GDPpercapita, you specified site/newsite/views/WorldIndicators/GDPpercapita or views/WorldIndicators/GDPpercapita
Error:
FATAL [2015-11-22 10:35:02,714][setUp Thread Group 1-1] (LoadSessionSetup.java:57) – Failed to set up load test session. Stopping the test run.
java.lang.NumberFormatException: For input string: “GDPpercapita”
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.tableausoftware.test.server.perfTestSuite.ViewFetcher.populateVizFromCSV(ViewFetcher.java:288)
at com.tableausoftware.test.server.perfTestSuite.ViewFetcher.initialize(ViewFetcher.java:82)
at com.tableausoftware.test.server.perfTestSuite.ViewFetcher.initialize(ViewFetcher.java:104)
at com.tableausoftware.test.server.perfTestSuite.LoadSessionSetup.runTest(LoadSessionSetup.java:47)
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:191)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Tidying up … @ Sun Nov 22 10:35:02 SGT 2015 (1448159702748)
… end of run
You’re running Postgres on a port other than 5432 and/or are using different usernames / passwords to access it:
…but you forgot to adjust the /config/PerfRunHarness.properties file to compensate:
Error:
ERROR [2015-11-22 10:30:49,046][main] (ResultProcessor.java:99) – Unable to get DB Helper instance
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
You put the wrong server name into ServerTestConfig.yaml or forgot to modify hostUri at all:
Error:
Waiting for possible shutdown message on port 4445
FATAL [2015-11-22 11:10:03,383][setUp Thread Group 1-1] (LoadSessionSetup.java:57) – Failed to set up load test session. Stopping the test run.
java.lang.NullPointerException
at com.tableausoftware.vizportal.test.webClientApi.WebClientResponse.<init>(WebClientResponse.java:62)
at com.tableausoftware.vizportal.test.webClientApi.WebClientResponse.create(WebClientResponse.java:88)
at com.tableausoftware.vizportal.test.webClientApi.WebClientApi.getServerSettingsUnauthenticated(WebClientApi.java:1222)
at com.tableausoftware.test.server.perfTestSuite.ServerSettingsFetcher.setServerSetting(ServerSettingsFetcher.java:28)
at com.tableausoftware.test.server.perfTestSuite.LoadSessionSetup.runTest(LoadSessionSetup.java:52)
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:191)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Tidying up … @ Sun Nov 22 11:10:03 SGT 2015 (1448161803415)
… end of run
You are running in “Web” mode (vs. getting the list of vizzes to execute from vizpool.csv) but you neglected to add an admin username and password to ServerTestConfig.yaml:
Error:
Waiting for possible shutdown message on port 4445
FATAL [2015-11-22 14:00:01,936][setUp Thread Group 1-1] (ViewFetcher.java:332) – Please provide system administrator user name and password in ServerTestConfig.yaml. Tabjolt needs to log into the server to get all the sites and all the vizes in each site.
FATAL [2015-11-22 14:00:01,937][setUp Thread Group 1-1] (LoadSessionSetup.java:57) – Failed to set up load test session. Stopping the test run.
java.lang.IllegalArgumentException: Please provide system administrator user name and password in ServerTestConfig.yaml. Tabjolt needs to log into the server to get all the sites and all the vizes in each site.
at com.tableausoftware.test.server.perfTestSuite.ViewFetcher.populateVizFromDesktopApi(ViewFetcher.java:333)
at com.tableausoftware.test.server.perfTestSuite.ViewFetcher.initialize(ViewFetcher.java:85)
at com.tableausoftware.test.server.perfTestSuite.ViewFetcher.initialize(ViewFetcher.java:104)
at com.tableausoftware.test.server.perfTestSuite.LoadSessionSetup.runTest(LoadSessionSetup.java:47)
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:191)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Tidying up … @ Sun Nov 22 14:00:01 SGT 2015 (1448172001970)
… end of run
(I’ll continue to add more to this list as they occur to me…feel free to submit your own in the comments section, too!)
So…at this point you should be able to generate some load against Tableau Server. It’ll look like this:
Keep in mind that we haven’t made any modifications in order to collect JMX or Perfmon Metrics from our Tableau Server — we’re only driving load. If you’re seeing errors related to JMX or Perfmon, hang on for the next entry which’ll get into all that fun stuff.
Have fun TabJolting!
Hi Russell,
This post is extremely helpful. I’ve gone through all of the steps you laid out but I’m getting the following error:
Perf harness is started with parameters –rootPath=C:tabjolt\ –t=testplans\InteractiveVizLoadTest.jmx –d=60 –c=1 unable to load configuration file based on binary location reflection; continuing…Loaded properties file from C:\tabjolt/config/PerfRunHarness.properties Looking for `config` starting in C:\tabjolt\bin\perfRunHarness Config folder path is C:\tabjolt\config Loading Log4J configuration from C:\tabjolt\config\log4j.properties
Exception in thread “main” java.lang.NullPointerException at com.tableausoftware.test.tools.perfRunHarness.PerfRunHelper.getTestPassId(PerfRunHelper.java613) at com.tableausoftware.test.tools.perfRunHarness.Main.main(Main.java:100)
Any idea what’s causing this?
Thanks,
Mark
Well, it’s likely your ServerTestCOnfig.yaml file – can you post the contents? Have you done a quick check in the file to make sure there aren’t any “phantom characters” scattered about? I’ve done that on occasion when I fat finger my keyboard and then don’t realize I’ve just messed up the file…
Hi , Please help to see log file seem it run but no Resp time, any suggestion to look on setup of tabjolt.
Note: we are using tableau server 10.2.3 with tabjolt 10.2
Starting the test @ Tue Aug 08 13:52:27 CDT 2017 (1502218347804)
INFO [2017-08-08 13:52:27,820][main] (ResultProcessor.java:129) – ———–
–start processing perf counters and run result————-
INFO [2017-08-08 13:52:27,820][main] (ResultProcessor.java:130) – Perf run re
sult is saving to result repository. Please use this RUN ID 6 to view your resul
t in Tableau
Waiting for possible shutdown message on port 4445
INFO [2017-08-08 13:52:27,929][Thread-7] (PerfRunMonitor.java:37) – Starting
Perfrun monitor thread
#0 Threads: 1/1 Samples: 1 Latency: 0 Resp.Time: 1 Errors:
1
#1 Threads: 1/1 Samples: 341 Latency: 0 Resp.Time: 0 Errors:
341
#2 Threads: 1/1 Samples: 8760 Latency: 0 Resp.Time: 0 Errors:
8760
#3 Threads: 1/1 Samples: 8862 Latency: 0 Resp.Time: 0 Errors:
8862
#4 Threads: 1/1 Samples: 7673 Latency: 0 Resp.Time: 0 Errors:
7673
#5 Threads: 1/1 Samples: 7446 Latency: 0 Resp.Time: 0 Errors:
7446
#6 Threads: 1/1 Samples: 8544 Latency: 0 Resp.Time: 0 Errors:
8544
#7 Threads: 1/1 Samples: 6131 Latency: 0 Resp.Time: 0 Errors:
6131
#8 Threads: 1/1 Samples: 5916 Latency: 0 Resp.Time: 0 Errors:
5916
#9 Threads: 1/1 Samples: 8730 Latency: 0 Resp.Time: 0 Errors:
8730
#10 Threads: 1/1 Samples: 10256 Latency: 0 Resp.Time: 0 Errors:
10256
#11 Threads: 1/1 Samples: 10989 Latency: 0 Resp.Time: 0 Errors:
10989
#12 Threads: 1/1 Samples: 7381 Latency: 0 Resp.Time: 0 Errors:
7381
#13 Threads: 1/1 Samples: 8097 Latency: 0 Resp.Time: 0 Errors:
8097
#14 Threads: 1/1 Samples: 10466 Latency: 0 Resp.Time: 0 Errors:
10466
#15 Threads: 1/1 Samples: 11481 Latency: 0 Resp.Time: 0 Errors:
11481
#16 Threads: 1/1 Samples: 11007 Latency: 0 Resp.Time: 0 Errors:
11007
#17 Threads: 1/1 Samples: 11278 Latency: 0 Resp.Time: 0 Errors:
11278
INFO [2017-08-08 13:52:47,789][Thread-1] (JmeterResultDBSender.java:81) – Fin
ish processeing all Jmeter perf result samples.
#18 Threads: 1/1 Samples: 9968 Latency: 0 Resp.Time: 0 Errors:
9968
#19 Threads: 1/1 Samples: 8364 Latency: 0 Resp.Time: 0 Errors:
8364
#20 Threads: 1/1 Samples: 10710 Latency: 0 Resp.Time: 0 Errors:
10710
#21 Threads: 1/1 Samples: 8544 Latency: 0 Resp.Time: 0 Errors:
8544
#22 Threads: 1/1 Samples: 10335 Latency: 0 Resp.Time: 0 Errors:
10335
#23 Threads: 1/1 Samples: 10818 Latency: 0 Resp.Time: 0 Errors:
10818
#24 Threads: 1/1 Samples: 10634 Latency: 0 Resp.Time: 0 Errors:
10634
#25 Threads: 1/1 Samples: 10413 Latency: 0 Resp.Time: 0 Errors:
10413
#26 Threads: 1/1 Samples: 8324 Latency: 0 Resp.Time: 0 Errors:
8324
#27 Threads: 1/1 Samples: 9385 Latency: 0 Resp.Time: 0 Errors:
9385
ERROR [2017-08-08 13:52:57,952][Thread-7] (PerfRunMonitor.java:40) – ***** Cur
rent run in progress exceeded the maximum error thresholds. It will be stopped.
*************
ERROR [2017-08-08 13:52:57,952][Thread-7] (PerfRunMonitor.java:66) – *****Invo
king PerfRunHelper stop Jmeter function ****
ERROR [2017-08-08 13:52:57,952][Thread-7] (PerfRunHelper.java:370) – Invoking
Jmeter stoptest.cmd in machine: localhost
#28 Threads: 1/1 Samples: 10625 Latency: 0 Resp.Time: 0 Errors:
10625
ERROR [2017-08-08 13:52:58,030][Thread-7] (PerfRunHelper.java:376) – Command:
[C:\Tabjolt/bin/stoptest.cmd]
#29 Threads: 1/1 Samples: 8593 Latency: 0 Resp.Time: 0 Errors:
8593
#30 Threads: 1/1 Samples: 10872 Latency: 0 Resp.Time: 0 Errors:
10872
Command: StopTestNow received from /127.0.0.1
Tidying up … @ Tue Aug 08 13:53:00 CDT 2017 (1502218380063)
… end of run
INFO [2017-08-08 13:53:07,943][main] (PerfRunHelper.java:192) – Jmeter proces
s has exited. Waiting for the other processes to exit.
INFO [2017-08-08 13:53:25,972][main] (PerfRunHelper.java:211) – All processes
have exited.
INFO [2017-08-08 13:53:25,972][main] (PerfRunMonitor.java:57) – Perfrun is co
mpleted – ending monitor thread
INFO [2017-08-08 13:53:26,550][Thread-3] (PerfCounterDBSender.java:72) – Fini
shed processing all perf counter records
INFO [2017-08-08 13:53:26,582][main] (ResultProcessor.java:186) – ———–
——————————————
INFO [2017-08-08 13:53:26,582][main] (ResultProcessor.java:187) – Perf run re
sult have been stored. Please use this RUN ID 6 to view your result in Tableau