FOR BI PROS Tableau
Tableau 9’s TabCmd under Linux
March 13, 2015
10
, , ,

In  Tableau 9 all jRuby related code were replaced by native java stuff. Even if I still believe that ruby is one of the best programming language (it’s sooooo clean and dry), but, khm, yes, it’s just slow. Like really slow. I guess Tableau Software felt the same and did this huge change. And yes, as tabcmd was ruby as well, the old tricks to make it work on linux are not working anymore. But today Jeff Solomon posted the ultimate solution for Tableau 9 in beta forum. Let me quote it as it is still a closed forum and I think it is useful for all of us:

Running on Linux is actually pretty simple. The hardest part is that you do need to be able to run either the server installer or the tabcmd installer to get the tabcmd jars. But after you do that, here are the instructions:

1) Create a local copy of C:\Program Files\Tableau\Tableau Server\9.0\extras\lib  to $HOME/lib.

2) Create  a ~/.tabcmd directory. This is used for logs, session storage and file uploads.

3) Create the following bash script:

Notes:

This assumes that the JRE is correctly installed and available in the path, and that bash is available. This should work with non-ascii UTF-8 characters in the command line arguments assuming that your terminal supports them, but this isn’t well tested (at all really), so please post your experiences.

We will try to package this up so that it’s more turnkey, but we have no idea when that will be released or what it will look like. But this these instructions should do for now.

And it works like a charm.

TabCmd under Linux - Tableau 9

And it is fast. Okay, as fast a Java program can be, but honestly it feels like speed of light compared to the old one.

Tamás Földi

Tamás Földi

Director of IT Development at Starschema
Decades of experience with data processing and state of the art programming. From nuclear bomb explosion simulation to distributed file systems. ethical hacking, real time stream processing practically I always had a great fun with those geeky ones and zeros.
Tamás Földi
  • Gergely Dányi

    Thanks for sharing Tamas!

    For those who were not in the beta, tabcmd 9.0 can be downloaded from here:
    http://www.tableau.com/about/blog/2015/3/tableau-online-90-coming-soon-36975

    Also, replace $* with ${1+”$@”} to make it work with arguments containing spaces.

  • ravi agrawal

    Hi,

    I am running with following error while running the command. Could you please help ?

    sh -x tabcmd.sh login -s servername -u username -p password

    + HOME=/home/username/tabcmd/

    + java -Xmx64m -Xss2048k -Djsse.enableSNIExtension=false -Dpid=6249 -Dlog.file=/home/username/tabcmd//.tabcmd/tabcmd.log -Dsession.file=/home/username/tabcmd//.tabcmd/tabcmd-session.xml -Din.progress.dir=/home/username/tabcmd//.tabcmd -Dconsole.codepage=en_US.UTF-8 -Dconsole.cols= -cp ‘/home/username/tabcmd//lib/*’ com.tableausoftware.tabcmd.Tabcmd login -s servername -u na.jnj.comragarw22 -p RAOct2015

    ===== Creating new session

    ===== Server: servername

    ===== Username: username

    ===== Connecting to the server…

    *** Uncaught exception RuntimeException: java.security.KeyStoreException: WINDOWS-ROOT not found

    *** See the logs for the stacktrace.

    Exception in thread “main” java.lang.RuntimeException: java.security.KeyStoreException: WINDOWS-ROOT not found

    at com.tableausoftware.tabcmd.session.Session.createRequest(Session.java:223)

    at com.tableausoftware.tabcmd.session.Session.createRequest(Session.java:198)

    at com.tableausoftware.tabcmd.session.Session.setAuthDataAndGetEncryptedPassword(Session.java:560)

    at com.tableausoftware.tabcmd.session.Session.login(Session.java:644)

    at com.tableausoftware.tabcmd.commands.Login.execute(Login.java:57)

    at com.tableausoftware.tabcmd.Tabcmd.run(Tabcmd.java:134)

    at com.tableausoftware.tabcmd.Tabcmd.main(Tabcmd.java:61)

    Caused by: java.security.KeyStoreException: WINDOWS-ROOT not found

    at java.security.KeyStore.getInstance(KeyStore.java:616)

    at com.tableausoftware.tabcmd.session.Session.getSSLContext(Session.java:344)

    at com.tableausoftware.tabcmd.session.Session.setCommonRequestSettings(Session.java:162)

    at com.tableausoftware.tabcmd.session.Session.createRequestInternal(Session.java:288)

    at com.tableausoftware.tabcmd.session.Session.createRequest(Session.java:220)

    … 6 more

    Caused by: java.security.NoSuchAlgorithmException: WINDOWS-ROOT KeyStore not available

    at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)

    at java.security.Security.getImpl(Security.java:695)

    at java.security.KeyStore.getInstance(KeyStore.java:613)

    … 10 more

    • forrest

      Hi, I’m running into the same problem, did you find a solution?

    • Ignacio Toledo

      I was able to solve the problem by using the option –no-certcheck

  • jambesh

    Exception in thread “main” java.lang.UnsupportedClassVersionError: com/tableausoftware/tabcmd/Tabcmd : Unsupported major.minor version 51.0

    at java.lang.ClassLoader.defineClass1(Native Method)

    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    Could not find the main class: com.tableausoftware.tabcmd.Tabcmd. Program will exit.

    • realdataboss

      You should use exactly the same java version as Tableau. At the moment you need JDK at minimum

      • jambesh

        Thanks For the info Databoss !!! I was guessing the same.
        But when you say Same Java/Tablea Version Do you mean Tableau 9 Java 9 , Tableau 10 Java 10 some thing like this ??
        Is there a way we can check which Java version has been used for a particular tableau version of tabcmd ?? That would ease my task,

  • jambesh

    Running into trouble with Java Major : Minor Version .. any idea how to resolve this ??? I Followed the same step as mentioned.

  • Vijay

    Hello,

    Our server got upgraded from 9.0 to 9.1 and since then I am getting the following error. I have already checked the versions and they match. Really Appreciate any help…

    Build 9100.16.0303.2317
    Default charset: UTF-8
    Console codepage: en_US.UTF-8
    Codepage identifier code: null
    Default locale: en_US
    Display language: English
    run as: tabcmd login -s PAGE -t SITE –no-certcheck
    Creating new session
    Server: https:URL
    Username: XXXXXX
    Site: SITENAME
    Connecting to the server…
    Connecting to url (GET): https:URL/auth
    Uncaught exception RuntimeException: javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
    See the logs for the stacktrace.
    Top level exception caught:
    java.lang.RuntimeException: javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
    at com.tableausoftware.tabcmd.http.HttpRequest.connect(HttpRequest.java:383)
    at com.tableausoftware.tabcmd.session.Session.execute(Session.java:426)
    at com.tableausoftware.tabcmd.session.Session.setAuthDataAndGetEncryptedPassword(Session.java:563)
    at com.tableausoftware.tabcmd.session.Session.login(Session.java:644)
    at com.tableausoftware.tabcmd.commands.Login.execute(Login.java:57)
    at com.tableausoftware.tabcmd.Tabcmd.run(Tabcmd.java:144)
    at com.tableausoftware.tabcmd.Tabcmd.main(Tabcmd.java:64)
    Caused by: javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
    at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:524)
    at sun.security.ssl.InputRecord.read(InputRecord.java:506)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at com.tableausoftware.tabcmd.http.HttpRequest.connect(HttpRequest.java:379)
    … 6 more

Related items

/ You may check this items as well

Pasted image at 2018_01_09 04_59 PM

Python Experiments in Tableau 1. – Add live currency conversion to Tableau Dashboards using TabPy

In  Tableau 9 all jRuby related code were replace...

Read more
Tableau Docker

HOWTO: Tableau Server Linux in Docker Container

In  Tableau 9 all jRuby related code were replace...

Read more
Tableau Consistency Checker

Tableau Filestore Consistency Checker – How Repository Maps to Filestore

In  Tableau 9 all jRuby related code were replace...

Read more