5 Replies Latest reply on Jun 27, 2019 12:54 AM by Teodor Doroftei

    Tableau Prep CLI: Unable to find rest api port after 100 retries.

    Rey Magdaong

      Dear All,

       

      I would like to ask for your assistance/help. I'm trying ti schedule the tableau prep task using the cli. Sometimes it works sometimes it doesn't.

      Sometimes I'm receiving this error: Unable to find rest api port number after 100 retries.

       

      this is my cli command

       

      cd "C:\Program Files\Tableau\Tableau Prep 2018.2\scripts"

      tableau-prep-cli.bat -c "D:\SFDC_Data\Interface_Dataloader\Dataloader CLI Config\tableauprepcredential.json" -t "D:\SFDC_Data\Interface_Dataloader\Interface ERP-Salesforce Transformation.tfl" -d

       

      as per documentation.

      Save and Share Tableau Prep Work - Tableau

      I also set the crendential file with blank connections

       

      I'm only using text files(csv) as the source file, and export it also as a csv, in the local machine.

       

      Attached is the cli log as well.

       

      Really appreciate your help,

       

      Thank you very much!

      Rey

        • 1. Re: Tableau Prep CLI: Unable to find rest api port after 100 retries.
          Matt Wilson

          Rey Magdaong did you ever figure this out? I've got the same issue.

          • 2. Re: Tableau Prep CLI: Unable to find rest api port after 100 retries.
            Cristiano Silva

            I have the same issue to. I think thats the firewall maybe is blocking the connection, but I dont figure out wich ports I have to liberate in the firewall.

            • 3. Re: Tableau Prep CLI: Unable to find rest api port after 100 retries.
              Matt Coles

              I've hit something like this as well, occasionally. I have a script set up to run my flows every morning, and occasionally one of them will just fail. It seems like what might be happening is that a previous flow fails and does not shut down all the components properly. Then, when I try to run the next one, it can't start Prep. I upgraded to 2019.1 and it hasn't occurred since--possibly it has already been fixed--but I plan to keep an eye on things and watch for it happening again. If you had a previous flow fail, then you get this, then one workaround might be to restart your machine to ensure that all the processes have been stopped.

              • 4. Re: Tableau Prep CLI: Unable to find rest api port after 100 retries.
                Cristiano Silva

                In my case all execution always fail. I tried to restart the machine and erro still ocourring.

                • 5. Re: Tableau Prep CLI: Unable to find rest api port after 100 retries.
                  Teodor Doroftei

                  Hello!

                   

                  I seem to have a similar issue, here's my script:

                   

                  @echo off

                  >>F:\Tableau\Flows_update\logs\flow_update_times.txt echo started at %date% %time%

                  for %%a in ("*.tfl") do (

                  call "C:\Program Files\Tableau\Tableau Prep Builder 2019.1\scripts"\tableau-prep-cli.bat -c "F:\Tableau\Flows_update\credentials.json" -t "F:\Tableau\Flows_update\%%a"

                  )

                  >>F:\Tableau\Flows_update\logs\flow_update_times.txt echo finished at %date% %time%

                  exit

                   

                  And here's my log file for the ~last month:

                  started at 2019-05-03  8:00:01,89

                  started at 2019-05-03  9:25:07,18

                  finished at 2019-05-03  9:33:13,06

                  started at 2019-05-04  8:00:02,29

                  finished at 2019-05-04  8:07:56,49

                  started at 2019-05-05  8:00:02,11

                  finished at 2019-05-05 16:46:18,40

                  started at 2019-05-06  8:00:01,62

                  finished at 2019-05-06  8:05:06,99

                  started at 2019-05-07  8:00:01,88

                  started at 2019-05-07  9:18:06,48

                  finished at 2019-05-07  9:22:08,45

                  started at 2019-05-08  8:00:02,12

                  finished at 2019-05-08  8:08:22,10

                  started at 2019-05-09  8:00:02,06

                  started at 2019-05-09  8:17:39,40

                  finished at 2019-05-09  8:21:53,24

                  started at 2019-05-10  8:00:04,86

                  started at 2019-05-10  8:28:33,19

                  finished at 2019-05-10  8:34:00,73

                  started at 2019-05-11  8:00:01,97

                  finished at 2019-05-11 16:46:42,92

                  started at 2019-05-12  8:00:02,16

                  finished at 2019-05-13  1:26:53,53

                  started at 2019-05-13  8:00:01,90

                  finished at 2019-05-13  8:07:43,60

                  started at 2019-05-14  8:00:01,86

                  finished at 2019-05-14  8:05:34,06

                  started at 2019-05-15  8:00:02,08

                  finished at 2019-05-15 16:45:24,05

                  started at 2019-05-16  8:00:02,10

                  started at 2019-05-16  8:21:16,99

                  finished at 2019-05-16  8:25:30,57

                  started at 2019-05-17  8:00:02,27

                  finished at 2019-05-17  8:07:42,90

                  started at 2019-05-18  8:00:02,12

                  finished at 2019-05-18  8:08:12,15

                  started at 2019-05-19  8:00:02,67

                  finished at 2019-05-19  8:08:31,42

                  started at 2019-05-20  8:00:02,93

                  started at 2019-05-20  8:41:48,81

                  finished at 2019-05-20  8:46:55,31

                   

                  I've marked all occasions that i've manually have to restart the task in bold and also those occasion that took unreasonably long time. As we can see, every so often the script is either extremely slow or I have to restart it. I believe it must be the tableau-prep-cli.bat, because my own batch-script seems to run flawlessly now.

                   

                  I'm running Prep 2019.1 and Server 2019.1

                   

                  So if anyone knows a fix for this or why it happens, feel free to comment here!

                   

                  //Teo

                   

                  /UPDATE: Since I've upgraded both the server and prep to 2019.2 it seems to be a lot more stable, no more crashes and errors so far.