7 Replies Latest reply on Dec 19, 2017 1:51 AM by Debayan Bhattacharjya

    No valid session issue while running multiple Tableau Tabcmd Process in Windows box via Batch script using Synchronous option

    Debayan Bhattacharjya



      I have a scenario in Production environment.


      Where we have an already automation batch script present which will refresh certain workbooks and will archive the report .This has been done completely using batch script. And we have used --synchronous option to maintain live connection network with the tableau server background process.


      1) login

      2) refresh using synchronous

      3) Archive reports date as per logic stored in a separate report.


      Repeat the above 3 for 5-6 report workbook with different data source using Service account using Windows box.



      Now we have another Dashboard which needs to run every 10 minutes As data will get updated in every 10 minutes.


      So here we also used extract connection and follow the same batch file as below steps


      1) Login

      2)refresh using synchronous


      Due to every 10 minutes batchscript execution of the second process, what happened is when both got executed ,we observed failure in first process with below message


        *** Not authorized

      No valid session found. (errorCode=46)



      Now ,


      Option 1)Change the Tabcmd  process and remove --synchronous from second process(First anyways we need to keep,other wise proper archival will not happen)

      Option 2)Using Live connection. But we want the data to be automatically refreshed and User doesn't need to perform any other option.

      Option 3)Use autosys  Jil file and put dependency for second process that when first runs,it will put the second process on-Hold



      Please help me out as whether the Option 1 is okay or we should go with option 3 or option 2.



      Also in case of using extract for every 10 minutes ,will that be a performance concern (Meanwhile it takes around 2 minutes to refresh and create a very small extract ,but because of unavailability of resource sometimes be in idle mode)


      I tried with Option 2 with Live Connection using Jaspi. and below is the code.But its no0t refr3eshing(I tested for in Tableau public where Its having Current timestamp,but its not refreshing unless I use ?:refresh=yes)


      Below  JavaScript API used for testing in a public Dashboard


      <title>Tableau JavaScript API</title>
      <script type="text/javascript" src="https://public.tableau.com/javascripts/api/tableau-2.min.js"></script>
      <div id="tableauViz"></div>

      <script type='text/javascript'>
      var placeholderDiv = document.getElementById("tableauViz");
      var url = "https://public.tableau.com/profile/debayan.bhattacharjya#!/vizhome/Practice_383/Dashboard1";
      var options = {
      hideTabs: true,
      width: "100%",
      height: "1000px"
      var viz = new tableauSoftware.Viz(placeholderDiv,url,options);





      I also Checked an old community link but didn't get any conclusion