tabcmd command hangs without login info in powershell
I am testing tabcmd 2.0 prior to implementing in a production environment and have run into an issue. In my current 1.0 scripts, I first connect to a session and then subsequent commands can be issued without providing credentials. While testing 2.0, I can successfully connect using login but issuing any further commands results in that command just hanging. There is nothing in the log file and using debug mode also results in no useful information. If I issue the second command and again supply the login info, it works as expected and I can export my view so I'm guessing, based on the behavior, that it is waiting for credentials to be supplied. I have tried adding the -cookie command to the login to see if that would help, but it did not. I'm wondering if this is by design and that the session is no longer maintained, and credentials must be sent for each export? Or is there something else needed in order to get subsequent commands to maintain the connection until logout is specifically requested?
That is not how it's supposed to work, that's strange. Can you share the export command you run?
I login with this:
& "C:\tabcmd\Command Line Utility\tabcmd.exe" login --server https://prod-useast-a.online.tableau.com --site
Then I can usually just run this next, and it works:
& "C:\tabcmd\Command Line Utility\tabcmd.exe" export "PremiumRegister2/PremiumRegister?:refresh=yes&YMBookingDate=$date" --pdf --pagelayout portrait --pagesize legal --width 1920 --filename $fullfilename
With 2.0, it just continues to say Running in my PS script but never returns anything, so I just stop the process.
If I run this command, it generates my report as expected:
& "C:\tabcmd\Command Line Utility\tabcmd.exe" export --server https://prod-useast-a.online.tableau.com --site
Let me know if you need anything else and I can provide whatever you need. Running in debug mode never returned anything useful because once it logged in using the first command, it never returned anything else so there was nothing in the log.
Ken Ulicny
From: Jac @.> Sent: Monday, November 21, 2022 3:57 PM To: tableau/tabcmd @.> Cc: Ken Ulicny @.>; Author @.> Subject: Re: [tableau/tabcmd] export issue/question. (Issue #201)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
That is not how it's supposed to work, that's strange. Can you share the export command you run?
— Reply to this email directly, view it on GitHubhttps://github.com/tableau/tabcmd/issues/201#issuecomment-1322630057, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2OKV7RDZWCOTOETCO5P4VTWJPOYHANCNFSM6AAAAAASGUIWU4. You are receiving this because you authored the thread.Message ID: @.@.>>
could you run tabcmd -v and share the version info?
Tableau Server Command Line Utility v2.0.7
Ken Ulicny
From: Jac @.> Sent: Monday, November 28, 2022 3:59 PM To: tableau/tabcmd @.> Cc: Ken Ulicny @.>; Author @.> Subject: Re: [tableau/tabcmd] export issue/question. (Issue #201)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
could you run tabcmd -v and share the version info?
— Reply to this email directly, view it on GitHubhttps://github.com/tableau/tabcmd/issues/201#issuecomment-1329753401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2OKV7XV5U4FJG4B4BQ7U6LWKUMJFANCNFSM6AAAAAASGUIWU4. You are receiving this because you authored the thread.Message ID: @.@.>>
I just re-read this and noticed that you are running it within powershell, is that right? I'll have to check that out.
If you run the same command from windows cmd, do you see the same behavior?
Yes, from powershell. I can try running from windows command for a test but we are using powershell and I have so many scripts, I won’t be able to conver them nor do I want to do so. I’ll send you the results next week.
Ken Ulicny
On Dec 9, 2022, at 8:59 PM, Jac @.***> wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
I just re-read this and noticed that you are running it within powershell, is that right? I'll have to check that out.
If you run the same command from windows cmd, do you see the same behavior?
— Reply to this email directly, view it on GitHubhttps://github.com/tableau/tabcmd/issues/201#issuecomment-1344975608, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2OKV7VE72FD4KPPRVPAMKLWMPPWHANCNFSM6AAAAAASGUIWU4. You are receiving this because you authored the thread.Message ID: @.***>
Hi All - I have some issue from powershell on all 2.0.x versions. Anyone have some ideas how to solve it?
update: Same situation from bash script, tabcmd is not holding session and each command requires login parameters to run or just fail.
Deploy.sh
#!/bin/bash
tabcmd login -s https://domain.com -u admin -t testsite -p ****
tabcmd publish ./reports/workbook.twb -n MyReport -r test --overwrite --tabbed --replace --timeout 180
Result:
./Deploy.sh
Creating new session
===== Server: https://domain.com
===== Username: admin
Tableau Server Site: testsite
Connecting to the server...
Succeeded
Creating new session
===== Server: https://domain.com
===== Username: admin
Tableau Server Site: testsite
Connecting to the server...
Succeeded
Publishing as Overwrite
Publishing ''.reports/workbook.twb'' to the server. This could take several minutes...