4 Replies Latest reply on Nov 27, 2018 2:07 PM by Brian Collett

    tabcmd user management on multi-site server

    Brian Collett

      As reference, I'm using Tableau Server 2018.3 on Linux.

       

      We have multiple sites which I need to administer fairly large numbers of users on. The tabcmd operations 5 - 7 below do not work on a non-default site.

      Is this a problem with Tableau, or something I am doing. The documentation implies this is possible through tabcmd.

       

      This is the process I am attempting to do with tabcmd.

      1. Login to the site as user with Server administrator permissions
        tabcmd login -s https://demosite.com -t "" --cookie --no-certcheck -u poweruser -p passw0rd
      2. Create a site Test
        tabcmd createsite "Test site name" -url "TestURL" --no-certcheck -u poweruser -p passw0rd
      3. Create a set of users with appropriate permissions
        tabcmd createusers "users.csv"
      4. Change to the new site

        tabcmd login -s https://demosite.com --site "Test site name" --cookie --no-certcheck -u poweruser -p passw0rd

      5. Assign the users to a site Test.
        tabcmd createsiteusers "siteusers.csv" --role "ExplorerCanPublish" -p passw0rd
      6. Create a group on the site Test called Test_Group.
        tabcmd creategroup  "Operator users" -p passw0rd
      7. Add the users to the group Test_Group.
        tabcmd createsiteusers "siteusers.csv" --role "ExplorerCanPublish" -p passw0rd

       

      Steps 1 through 4 work correctly

      Steps 5 - 7 don't do anything other than produce output the results below, except when connecting to the default site.

      > tabcmd creategroup  "Operator users" -p passw0rd

      ===== Creating new session

      =====     Server:   https://demosite.com

      =====     Username: poweruser

      =====     Site:     Test site

      ===== Connecting to the server...

      >

       

      When you use this comment on the default site, the output includes "Creating group Operator users", not when on another site.

      I've tried all the above separately, even after doing the prior steps through the web interface.

       

      All the tabcmd commands above describe a --site parameter, yet none of them work on a non-default site.

      The tabcmd version matches the server version.

       

       

      Why does tabcmd not apply these changes to the users from tabcmd?

      Has anyone else had a similar experience?

       

      Thanks

      Brian

        • 1. Re: tabcmd user management on multi-site server
          Jeff Strauss

          Are you sure that step #4, login to the new site is working correctly?  When I try to login on my on-premise deployment using tabcmd, I get a succeeded message if it indeed works.

           

           

          Prior to #4, can you first try to do a tabcmd logout?  It should allow you to start fresh with a new session, and see if this helps.

          • 2. Re: tabcmd user management on multi-site server
            Brian Collett

            Hi Jeff.

            Thanks for the reply.

             

            I have tried logout as well. That doesn't make a difference.

             

            I can't find any log files on the server which show the interaction, to trace if something is going wrong.

             

            Here the exact response from the console, identifying names and passwords have been changed, but the rest is an exact copy.

             

            >$ tabcmd login -s https://demosite.com -t "" --cookie --no-certcheck -u poweruser  -p passw0rd

            ===== Creating new session

            =====     Server:   https://demosite.com

            =====     Username: poweruser

            ===== Connecting to the server...

            ===== Signing in...

            ===== Succeeded

             

            This logs into the default site.

             

            >$ tabcmd creategroup  "Operator users" --no-certcheck -p passw0rd

            ===== Continuing previous session

            =====     Server:   https://demosite.com

            =====     Username: poweruser

            ===== Creating group 'Operator users' on the server...

            ===== Succeeded

             

            Note the response: "Creating group 'Operator users' on the server..."

            The group is correctly created on the default site.

             

            Logging into a non-default site, this doesn't work. Note the confirmation of the site name "Test site name".

             

            >$ tabcmd login -s https://demosite.com --site "Test site name" --no-certcheck -u poweruser  -p passw0rd

            ===== Creating new session

            =====     Server:   https://demosite.com

            =====     Username: poweruser

            =====     Site:     Test site name

            ===== Connecting to the server...

             

            >$ tabcmd creategroup  "Operator users" --no-certcheck -p passw0rd

            ===== Creating new session

            =====     Server:   https://demosite.com

            =====     Username: poweruser

            =====     Site:     Test site name

            ===== Connecting to the server...

             

            Note the missing response "Creating group 'Operator users' on the server..."

            Note again, the confirmation of the site name "Test site name" in the response. There is no mention of this failing or anything except that there is no confirmation that the group was created either, yet the groups is not on the server. I have also tested when the same group in the default site is deleted, in case that is a conflict, but that makes no difference.

             

            Trying logout

             

            >$ tabcmd logout

            >$ tabcmd login -s https://demosite.com --site "Test site name" --no-certcheck -u poweruser  -p passw0rd

            ===== Creating new session

            =====     Server:   https://demosite.com

            =====     Username: poweruser

            =====     Site:     Test site name

            ===== Connecting to the server...

             

            >$ tabcmd creategroup  "Operator users" --no-certcheck -p passw0rd

            ===== Creating new session

            =====     Server:   https://demosite.com

            =====     Username: poweruser

            =====     Site:     Test site name

            ===== Connecting to the server...

             

            Note the missing response "Creating group 'Operator users' on the server..."

            • 3. Re: tabcmd user management on multi-site server
              Jeff Strauss

              Here's a few more suggestions:

               

              1. I think there should be info about the events either in the httpd log or the vizportal log(s).

               

              2. All the scripts I have here, use one --notation or the -n, in other words I never mix the two syntaxes.  So in your case, you can switch -u to --username and -p to --password.  Or it may be working just fine the way you have it, but we like consistency.

               

              3. Can you create a sitename that has no spaces?  (i.e. Test_site_name) and then get rid of the quotes to see if this helps?  In fact, looking at this closer, this is the likely cause.  You can also try Testsitename and this may help.

              1 of 1 people found this helpful
              • 4. Re: tabcmd user management on multi-site server
                Brian Collett

                Spot on!

                 

                It seems you can create a site with a space in the name, but all operations on that site silently fail.

                 

                • Create site "NewSite" with url NewSite. I can log into it, add groups, add users etc. Works perfectly.
                • Create site "New Site" with url NewSite2. I can log into "New Site", and the operations all state "Site: New Site", but don't do anything.
                • If I log using --site "NewSite2" (the url, not the site name), then the operations all work. Strangely, they refer to the url in the name in the response "Site: NewSite2" but add the groups and users to the "New Site" name.

                 

                • Actually, one doesn't even have to logout or login to another site first to switch sites. Simply specify the site in the operation.
                  tabcmd creategroup  "TestGroupSpace" --site "NewSite" --no-certcheck --password passw0rd

                 

                 

                 

                This seems to be a bug with tabcmd. The site name is reported correctly with the space. It should at least produce a message stating there is an issue with the command. It only reports login failures with username, password, server or certificates, but nothing when there is an issue such as this.

                 

                The documentation should also instruct to use the url if the sitename includes a space. The same problem may apply to unusual characters in the site name.

                 

                I will raise this as an issue with Tableau Support.

                 

                 

                I tried the full --option as suggested. It doesn't make a difference, but I agree, it is consistent and better practice.

                 

                 

                Also, I see not activity for any tabcmd connections or operations. These are the only files modified in the past 24 hours in the folders suggested and others I scanned through. I only see activity for actions through the web page, not the tabcmd actions.

                httpd/access.2018_11_27_00_00_00.log

                httpd/gateway.log

                 

                vizportal/vizportal_node1-0.log

                vizportal/nativeapi_vizportal_1-0_2018_11_27_00_00_00.txt

                vizportal/vizportal-grpc-request-0.log

                 

                thanks for your help.