11 Replies Latest reply on Feb 1, 2016 7:31 AM by Matt Coles Branched from an earlier discussion.

    Trusted ticket error

    David Mejia

      Hi guru Matt,

       

      This may sound a stupid question but I am getting an error on trusted ticket. My question now is do you need to register the server itselft as trusterd user? I am using the same tableau server for vizalert host. So they are using the same machine. I tried using domain name, localhost, and ip address. So now do I still need to do this step, even though they are on the same machine:

       

      tabadmin set wgserver.trusted_hosts <ip-address>

      tabadmin config

      tabadmin restart

       

      This is the error I get:

      2016-01-26 13:11:11 - [INFO] - LoggerQuickSetup - Logging initialized, writing to .\logs\vizalerts.log_2016-01-26.log

      2016-01-26 13:11:11 - [DEBUG] - trusted_ticket_test - testing trusted ticket: localhost, userxxx, None

      2016-01-26 13:11:11 - [DEBUG] - get_trusted_ticket - Generating trusted ticket. Request details: Server: localhost, Site: , Username: userxxx, Url: http://localhost/trusted, Postdata: username=userxxx.

      2016-01-26 13:11:13 - [ERROR] - get_trusted_ticket - URLError generating trusted ticket:   Request details: Server: localhost, Site: , Username: userxxx, Url: http://localhost/trusted, Postdata: username=userxxx.

      2016-01-26 13:11:13 - [ERROR] - trusted_ticket_test - URLError generating trusted ticket:   Request details: Server: localhost, Site: , Username: userxxx, Url: http://localhost/trusted, Postdata: username=userxxx.

      2016-01-26 13:11:13 - [INFO] - send_email - sending email: smtp.mycomp.com,vizalerts-noreply@mycomp.com,userxxx@mycomp.com,None,None,ALERT: VizAlerts failed to execute properly,None

      2016-01-26 13:11:13 - [DEBUG] - send_email - email body: URLError generating trusted ticket:   Request details: Server: localhost, Site: , Username: userxxx, Url: http://localhost/trusted, Postdata: username=userxxx.

      2016-01-26 13:11:14 - [ERROR] - <module> - An unhandled exception occurred: Traceback (most recent call last):

        File "vizalerts.py", line 1249, in <module>

          main()

        File "vizalerts.py", line 171, in main

          trusted_ticket_test()

        File "vizalerts.py", line 326, in trusted_ticket_test

          quit_script(errormessage)

        File "vizalerts.py", line 868, in quit_script

          sys.exit(1)

      SystemExit: 1

      Traceback (most recent call last):

        File "vizalerts.py", line 1249, in <module>

          main()

        File "vizalerts.py", line 171, in main

          trusted_ticket_test()

        File "vizalerts.py", line 326, in trusted_ticket_test

          quit_script(errormessage)

        File "vizalerts.py", line 868, in quit_script

          sys.exit(1)

      SystemExit: 1

       

      Thanks,

      David

        • 1. Re: Trusted ticket error
          Toby Erkson

          David,

          I moved your question as it really doesn't belong in that other thread.

           

          Please go here:  Get started with the latest version of VizAlerts!

          Read the documentation!

          • 2. Re: Trusted ticket error
            Matt Coles

            Thanks for moving, Toby!

             

            David, yes, valid question--you still need to enable the trusted hosts even if running from your Tableau Server machine. I would recommend trying "localhost" in your first tabadmin command, as it's presumably what you've set for the server name in the VizAlerts configuration. If that doesn't work, you may need to open the VizQLServer logs to see what IP address Tableau Server is seeing the request coming from.

             

            So it'd be:

             

            tabadmin set wgserver.trusted_hosts "localhost"
            tabadmin config
            tabadmin restart
            
            • 3. Re: Trusted ticket error
              David Mejia

              Thanks Matt and Toby. Appreciate the help.

               

              Yes, I saw that is using localhost. I will do it tonight then.

               

              Thanks,

              David

              • 4. Re: Trusted ticket error
                David Mejia

                Hi guys,

                 

                I'm back but with a different problem.. so I added localhost, ip address, and domain name by doing tabadmin set wgserver,trusted_hosts "" but to no avail.  I just have a hunch that trusted tickets do not work with long domain. We are one of those that uses https://name1.name2.shortname.com.

                 

                Let me know your thoughts.

                 

                The error now is:

                 

                D:\VizAlerts-1.0.8>python vizalerts.py

                2016-01-26 22:13:36 - [INFO] - LoggerQuickSetup - Logging initialized, writing to .\logs\vizalerts.log_2016-01-26.log

                2016-01-26 22:13:36 - [DEBUG] - trusted_ticket_test - testing trusted ticket: 10.52.99.99, user, None

                2016-01-26 22:13:36 - [DEBUG] - get_trusted_ticket - Generating trusted ticket.Request details: Server: 10.52.99.99, Site: , Username: user, Url: https://10.52.99.99/trusted, Postdata: username=user.

                2016-01-26 22:13:36 - [ERROR] - get_trusted_ticket - Generic exception generating trusted ticket: hostname u'10.52.99.99' doesn't match '*.yyyyy.xxx.com'  Request details: Server: 10.52.99.99, Site: , Username: user, Url: https://10.52.99.99/trusted, Postdata: username=user.

                2016-01-26 22:13:36 - [ERROR] - trusted_ticket_test - Generic exception generating trusted ticket: hostname u'10.52.99.99' doesn't match '*.yyyyy.xxx.com'  Request details: Server: 10.52.99.99, Site: , Username: user, Url: https://10.52.99.99/trusted, Postdata: username=user.

                2016-01-26 22:13:36 - [INFO] - send_email - sending email: None,None,ALERT: VizAlerts failed to executeproperly,None

                2016-01-26 22:13:36 - [DEBUG] - send_email - email body: Generic exception generating trusted ticket: hostname u'10.52.99.99' doesn't match '*.yyyyy.xxx.com'  Request details: Server: 10.52.99.99, Site: , Username: user, Url: https://10.52.99.99/trusted, Postdata: username=user.

                2016-01-26 22:13:37 - [ERROR] - <module> - An unhandled exception occurred: Traceback (most recent call last): 

                File "vizalerts.py", line 1249, in <module>

                    main()

                  File "vizalerts.py", line 171, in main

                    trusted_ticket_test()

                  File "vizalerts.py", line 326, in trusted_ticket_test

                    quit_script(errormessage)

                  File "vizalerts.py", line 868, in quit_script

                    sys.exit(1)

                SystemExit: 1

                Traceback (most recent call last):

                  File "vizalerts.py", line 1249, in <module>

                    main()

                  File "vizalerts.py", line 171, in main

                    trusted_ticket_test()

                  File "vizalerts.py", line 326, in trusted_ticket_test

                    quit_script(errormessage)

                  File "vizalerts.py", line 868, in quit_script

                    sys.exit(1)

                SystemExit: 1

                 

                Thanks,

                David

                • 5. Re: Trusted ticket error
                  Matt Coles

                  ...that's a new one, for sure! Would you mind redacting the sensitive parts out of vizalerts.yaml and posting it so I can take a look at how things are configured, please?

                  • 6. Re: Trusted ticket error
                    Matt Coles

                    The two specific things I'd recommend are:

                     

                    server: name1.name2.shortname.com
                    trusted.useclientip: false
                    

                     

                    Then just ensure that you've "trusted" the same host that is shown as trying to generate trusted tickets in your vizqlserver logs at [root Tableau Server install folder]\data\tabsvc\logs\vizqlserver\vizql-#.log. Errors with trusted tickets will show up there and list the IP address that Tableau Server is seeing traffic coming from, so that can be used to ensure you've told it to trust itself.

                    • 7. Re: Trusted ticket error
                      David Mejia

                      Hi Matt,

                       

                      Sorry for the late reply. Things got busy in the office.

                       

                      Checking vizql-#.log. I do  not see the ip address nor the domain name. The only visible to me is that is close enough to server info is this, which is "localhost". Is this what is expected or are you seeing it differently?

                       

                      2016-01-28 03:02:19.128 -0500 (,,,) localhost-startStop-1-EventThread : INFO  wgsessionId= com.tableausoftware.domain.solr.SolrLeaderConnection - Leader has changed for Core view rebuilding connection map.

                       

                      I tried the following combinations:

                      # Tableau Server settings

                      server: mycomp.xyz.abc.com                  # the Tableau Server instance your alerts will reside on. Recommend using the fully-qualified name, e.g. "myserver.mydomain.com"

                      server.version: 9                             # the major version of Tableau Server that this is running against (just ensures correct URLs in email footers)

                      server.user: user1              # this is ANY user licensed in Tableau Server--it does not need to be an Admin. It is only used to test whether Trusted Tickets work.

                                                                          # If you are using Local Authentication, do not prepend domain name to this entry. (e.g., mcoles)

                                                                          # If you are using Active Directory Authentication, specify the user as domain\username (e.g., tableau.com\mcoles)

                      server.ssl: true                               # use HTTPS for Server connections

                      trusted.useclientip: false                      # use clientip for trusted tickets verification

                       

                       

                      Tried using local host:

                      server: localhost                  # the Tableau Server instance your alerts will reside on. Recommend using the fully-qualified name, e.g. "myserver.mydomain.com"

                      server.version: 9                             # the major version of Tableau Server that this is running against (just ensures correct URLs in email footers)

                      server.user: user1              # this is ANY user licensed in Tableau Server--it does not need to be an Admin. It is only used to test whether Trusted Tickets work.

                                                                          # If you are using Local Authentication, do not prepend domain name to this entry. (e.g., mcoles)

                                                                          # If you are using Active Directory Authentication, specify the user as domain\username (e.g., tableau.com\mcoles)

                      server.ssl: false                               # use HTTPS for Server connections

                      trusted.useclientip: false                      # use clientip for trusted tickets verification

                       

                       

                      Tried using ip address (internal IP):

                      server: 10.10.10.10                  # the Tableau Server instance your alerts will reside on. Recommend using the fully-qualified name, e.g. "myserver.mydomain.com"

                      server.version: 9                             # the major version of Tableau Server that this is running against (just ensures correct URLs in email footers)

                      server.user: user1              # this is ANY user licensed in Tableau Server--it does not need to be an Admin. It is only used to test whether Trusted Tickets work.

                                                                          # If you are using Local Authentication, do not prepend domain name to this entry. (e.g., mcoles)

                                                                          # If you are using Active Directory Authentication, specify the user as domain\username (e.g., tableau.com\mcoles)

                      server.ssl: false                               # use HTTPS for Server connections

                      trusted.useclientip: false                      # use clientip for trusted tickets verification

                       

                      On my last try using your suggestion, the error I get now is:

                      2016-01-28 16:57:43 - [DEBUG] - get_trusted_ticket - Got ticket: -1

                      2016-01-28 16:57:43 - [ERROR] - get_trusted_ticket - Error generating trusted ticket. Value of ticket is -1.  Please see http://onlinehelp.tableau.com/current/server/en-us/trusted_auth_trouble_1return.htm Request details:

                      2016-01-28 16:57:43 - [ERROR] - get_trusted_ticket - UserWarning generating trusted ticket: Error generating trusted ticket. Value of ticket is -1.

                       

                       

                      I have a question, when I did the following before, I did it one by one:

                      1. tabadmin set wgserver.trusted_hosts "localhost" 
                      2. tabadmin config 
                      3. tabadmin restart 

                       

                      then run python vizalerts.py

                       

                      1. tabadmin set wgserver.trusted_hosts "mycomp.xyz.abc.com" 
                      2. tabadmin config 
                      3. tabadmin restart 

                       

                      then run python vizalerts.py

                       

                      1. tabadmin set wgserver.trusted_hosts "10.10.10.10" 
                      2. tabadmin config 
                      3. tabadmin restart 

                      then run python vizalerts.py

                       

                      By doing all of these, do I have all three registered or just the last one? Am I over-writing the previous one or adding into it?

                       

                      Thanks,

                      David

                      • 8. Re: Trusted ticket error
                        David Mejia

                        Hi Matt,

                         

                        For this:

                        Tried using local host:

                        server: localhost

                        server.version: 9

                        server.user: user1 

                        server.ssl: false 

                        trusted.useclientip: false

                         

                        I get this error:

                        2016-01-28 17:21:52 - [ERROR] - get_trusted_ticket - URLError generating trusted ticket:   Request details: Server: localhost, Site: , Username: user1, Url: http://localhost/trusted, Postdata: username=user1.

                         

                        I hope I am not confusing you.

                         

                        Thanks,

                        David

                        • 9. Re: Trusted ticket error
                          Matt Coles

                          Nope, not confusing me! Thanks for the additional detail. To answer your question, each time you reset a config value by calling tabadmin set, you are overwriting the previous value. So in the above sequence you are now trusting 10.10.10.10 and not localhost nor "mycomp.xyz.abc.com".

                           

                          The good news is that the "-1" thing is a better error to get. I would now check the logs as described in Ticket Value of -1 Returned from Tableau Server , as they should describe the problem more specifically:

                           

                           

                          The exact reason for this message is written to the file production*.log in the following folder:

                          ProgramData\Tableau\Tableau Server\data\tabsvc\logs\wgserver

                          and to the vizql*.log in the following folder:

                          ProgramData\Tableau\Tableau Server\data\tabsvc\logs\vizqlserver

                           

                          • 10. Re: Trusted ticket error
                            David Mejia

                            Hi Matt,

                             

                            Below is my latest attempts. I updated the trusted server by adding localhost. Then tried localhost with and without SSL. See different results below:

                             

                            server.ssl: true 

                            Generic exception generating trusted ticket: hostname u'localhost' doesn't match '*.xxx.xx.com' Request details: Server: localhost, Site: , Username: user1, Url: https://localhost/trusted, Postdata: username=users1.

                             

                             

                            server.ssl: false 

                            URLError generating trusted ticket: Request details: Server: localhost, Site: , Username: user1, Url: http://localhost/trusted, Postdata: username=user1.

                             

                            Any more ideas? Let me know.

                             

                            Thanks,

                            David

                            • 11. Re: Trusted ticket error
                              Matt Coles

                              Revert your settings to what you had when you got the "-1" error. Run the script again to reproduce that error. Then check the logs in the folder(s) I listed above and let me know what they say--that should provide the information we need to move forward.