6 Replies Latest reply on Dec 2, 2016 12:49 PM by Andrew Raith

    Tableau & RServe issue using custom portal and trusted tickets

    Andrew Raith

      In my role, I am a developer but also a data analyst and I built a custom J2EE portal that uses trusted tickets to execute and display Tableau visualizations using Tableau Server.  I have written a pretty dashboard that uses RServe to process a K-Means Clustering analysis on a small data set.  In Tableau Desktop, I am configured with RServe correctly and the dashboard works as planned.  If I open the published visualization directly in Tableau Server, everything runs fine as well.  However, when the same visualization is accessed through our portal, I get an error stating: "TableauException: An error occurred while communicating with the Rserve service."  RServe is installed and running on the same box as Tableau Server (nothing else) in case that matters.  The portal code runs on a different web server that is set up as a trusted host for Tableau Server which in turn allows licensed users to run visualizations using a web browser but not directly in Tableau Server (the portal serves some other purposes as well...)

       

      Does anyone have some suggestions for what might be causing this issue or where to start looking for a cause?  I have checked to make sure that the RServe port is not being blocked by a firewall (getting some extra technical support on that) and it appears to be configured properly (after all I am connect to it with Tableau Desktop).

       

      Thanks,

      Andrew

        • 1. Re: Tableau & RServe issue using custom portal and trusted tickets
          Jeff Strauss

          could it be that there is an authentication issue?  What id is being passed into the Rserve?  Maybe is it the Tableau Server runas account, or is it the individual user id, or is it the id that was used to generate the trusted ticket?

          • 2. Re: Tableau & RServe issue using custom portal and trusted tickets
            Bora Beran

            Hi Andrew,

            Are you're embedding a Tableau visualization hosted on a Tableau Server in a page hosted on another server? In that case this should just work because Tableau server will call Rserve directly. Or is it a different setup?

             

            It is a stab in the dark but you may want to give a shot to setting remote enable in Rserve config file if you haven't already.

             

            Thanks,

             

            Bora

            • 3. Re: Tableau & RServe issue using custom portal and trusted tickets
              Andrew Raith

              Thanks for the reply Jeff.  RServe does not require a username and that is how things are set up between Tableau Server and RServe.  Users authenticate to the portal with Active Directory credentials which are in turn used to request trusted tickets to execute a visualization.  Obviously since the visualization runs fine in Desktop and when accessed through Tableau Server, there is some disconnect between the portal and accessing the RServe box.  When I remove the R-specific piece of this dashboard, the rest of the dashboard runs fine..... Kind of stumped.

              • 4. Re: Tableau & RServe issue using custom portal and trusted tickets
                Andrew Raith

                Hi Bora and thanks for the input.  Yes, your description of the embedding of a visualization is correct.  And I too thought it should just work, particularly since it works fine in Tableau Server's interface.

                 

                I double-checked and RServe is running with remote enable (set up in config file and RServe started using that config file).  I understand that the portal/ticket set up may not be typical though.  It just seemed like it should work when all else seems to be working.  As I mentioned in the earlier post to Jeff, when I remove the R code from the visualization, the rest of it shows as expected so it is surely appears to be an issue of the web server running the portal talking to the RServe interface.  I was expecting that Tableau Server would do the heavy lifting and just send data back to the client but maybe that is not how it works...

                Thank again.

                • 5. Re: Tableau & RServe issue using custom portal and trusted tickets
                  Bora Beran

                  Tableau server communicates directly with Rserve and serves the results. It doesn't act as a bridge to connect client to Rserve. It also doesn't use the user's credentials to connect to Rserve, it connects to Rserve based on credentials defined using tabadmin regardless of user's credentials. So there is something else going on here.

                   

                  Is there any more detail you can share on the error message? E.g. if you modified your R code and inserted code to try catch errors and write to csv it may help understand what the error is.

                  • 6. Re: Tableau & RServe issue using custom portal and trusted tickets
                    Andrew Raith

                    The error message is pretty non-descript (see below).  Obviously resetting the view does not help.  I will try to modify the R code to simply return something basic and not run the K Means Cluster algorithm so see if that makes a difference.  Then I will know if it is indeed a connection issue or whether something more abstract happening.  Thanks for the suggestion.

                    R error.png