4 Replies Latest reply on Apr 16, 2019 1:30 AM by Jonathan Drummey

    VA is operational but running just the executable produces an error

    Toby Erkson

      Preface

      I've been testing in my QA environment for the upgrade of 2018.1.4 to 2019.1.  I've performed this upgrade/downgrade multiple times in order to get my documentation down and the process smoothed out for the eventual production update.  I had VA working in 2019 briefly to test but it wasn't anything thorough.  I downgraded to 2018 and everything is working normally.  I did the VA install and while it does work -- there are no issues with it executing in TS -- I do have the following head-scratcher...

       

      Issue

      I ran the simple test of executing the vizalerts.exe and got this error:

      >D:\Application\Tableau\VizAlerts\vizalerts.exe
      An exception was raised loading the config file .\config\vizalerts.yaml: (<type 'exceptions.IOError'>, IOError(2, 'No such file or directory'), <traceback object at 0x0348BFD0>) Stacktrace: <traceback object at 0x0348BFD0>
      Could not initialize configuration file due to an unknown error: 'NoneType' object has no attribute 'error'
      
      10:59:51  D:\
      >
      

      I'm quite confident that my config file and published VizAlertsConfig.twb are correct.  No obvious errors to me in the vizalerts.log_...log file:

      MainThread - 2019-04-13 10:58:04 - [INFO] - main - Processing a total of 0 alerts

      MainThread - 2019-04-13 10:59:01 - [INFO] - LoggerQuickSetup - Logging initialized, writing to .\logs\vizalerts.log_2019-04-13.log

      MainThread - 2019-04-13 10:59:01 - [INFO] - main - VizAlerts v2.1.0 is starting

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - trusted_ticket_test - testing trusted ticket: ***.com, terkson, americas.corpdir.net, None

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_trusted_ticket - Generating trusted ticket. Request details: Server: ***.com, Site: , Username: terkson, Url: http://***.com/trusted, Postdata: username=americas.corpdir.net%5Cterkson.

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_trusted_ticket - NOT using SSL and NOT verifying cert

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_trusted_ticket - Got ticket: PbsLsRdBQJ2sfTijX0NetA==:BXUqTnWHtkYZ-QpwBNAaAQZU

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - trusted_ticket_test - Generated test trusted ticket. Value is: PbsLsRdBQJ2sfTijX0NetA==:BXUqTnWHtkYZ-QpwBNAaAQZU

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_alerts - Pulling source viz data down

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_trusted_ticket - Generating trusted ticket. Request details: Server: ***.com, Site: area51, Username: terkson, Url: http://***.com/trusted, Postdata: username=americas.corpdir.net%5Cterkson&target_site=area51.

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_trusted_ticket - NOT using SSL and NOT verifying cert

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - get_trusted_ticket - Got ticket: IZ50HIpsTEik2phLfO97Cw==:6C-TRkXJqKrP9_fSQPCTJ7Lq

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - export_view - Getting vizdata from: http://***.com/trusted/IZ50HIpsTEik2phLfO97Cw==:6C-TRkXJqKrP9_fSQPCTJ7Lq/t/area51/views/VizAlertsConfig_0/ScheduledTriggerViews?&:format=csv&:refresh=y

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - export_view - NOT Validating cert for this request

      MainThread - 2019-04-13 10:59:01 - [INFO] - _new_conn - Starting new HTTP connection (1): qtnaicvdw002.us164.corpintra.net

      MainThread - 2019-04-13 10:59:01 - [DEBUG] - _make_request - "GET /trusted/IZ50HIpsTEik2phLfO97Cw==:6C-TRkXJqKrP9_fSQPCTJ7Lq/t/area51/views/VizAlertsConfig_0/ScheduledTriggerViews?&:format=csv&:refresh=y HTTP/1.1" 302 0

      MainThread - 2019-04-13 10:59:03 - [DEBUG] - _make_request - "GET /t/area51/views/VizAlertsConfig_0/ScheduledTriggerViews?&:format=csv&:refresh=y&:embed=y HTTP/1.1" 200 2232

      MainThread - 2019-04-13 10:59:03 - [INFO] - export_view - Attempting to write to: .\temp\20190413105903600000_MainThread_VizAlertsConfig_0-ScheduledTriggerViews.csv

      MainThread - 2019-04-13 10:59:03 - [INFO] - main - Processing a total of 0 alerts

       

      The .csv file in the temp folder looked like the other ones around it.

       

      Environment

      ***.com = QA Server name

      Windows 2012 Server

      2018.1.4 Tableau Server

      config files point to the correct QA server environment.

      .yaml file location is in the same place it's always been (PROD is set up the EXACT same way):

       

      Any ideas?

        • 1. Re: VA is operational but running just the executable produces an error
          Jonathan Drummey

          Hi Toby,

           

          This is a head-scratcher...the error is issued in this chunk of code from vizalerts.py:

           

                  # initialize logging

                  log.logger = logging.getLogger()

                  if not len(log.logger.handlers):

                      log.logger = log.LoggerQuickSetup(config.configs['log.dir'] + 'vizalerts.log', log_level=config.configs['log.level'])

              except Exception as e:

                  print(u'Could not initialize configuration file due to an unknown error: {}'.format(e.message))

           

          I'd suggest checking your log.dir configuration in the config.yaml and the desired directory, the "No such file or directory" could mean that there's something happening with one or the other?

           

          Jonathan

          • 2. Re: VA is operational but running just the executable produces an error
            Toby Erkson

            I checked and checked again and everything looks fine.

             

            I did some more "easy checking", that is, do the simple stuff that I would think wouldn't make a difference.  So I opened a command prompt (as Administrator), went to the drive and changed the directory to the VizAlerts folder (BTW, I have my PROMPT environmental variable set up as $T$H$H$H$S$S$P$_$G so I see the time and folder path I'm in), and ran the executable:

            It worked!  Huh.

             

            So I went back to the C: drive and ran the executable like I did originally and it failed:

            Ah ha!  In order to test VA one must be in the folder where it resides.

             

            ---------------------------

            To recap since my prompt isn't set to the default and can be confusing:

            1. When I originally ran the VA executable I was in the root folder of my D: drive (D:\).  The D: drive is where all of my Tableau Server stuff lives.  Running VA from here was unsuccessful.
            2. When I did my "easy checking" trouble-shooting I changed the directory location to the folder where the VA executable lives:  D:\Application\Tableau\VizAlerts.  Running VA from here was successful.
            3. To double-check the issue, I then went back to my C: drive, into the default folder of the command prompt:  C:\Windows\System32.  Running VA from here was unsuccessful.
            • 3. Re: VA is operational but running just the executable produces an error
              Matt Coles

              Hey Toby! Yes, you are correct--VizAlerts currently always looks in the config folder from the current working directory to find the vizalerts.yaml file, unless you pass the path to it in as a parameter when you call VizAlerts.exe / py.

               

              However, it should really be looking at the working directory the script itself lives in, not the working directory of the user.

              1 of 1 people found this helpful
              • 4. Re: VA is operational but running just the executable produces an error
                Jonathan Drummey

                I’m glad you got it figured out!

                 

                Jonathan