tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.57k stars 599 forks source link

TableauException: An error occurred while communicating with the external service #37

Closed venkataanumula closed 7 years ago

venkataanumula commented 7 years ago

Hi I am able to use tabpy successfully through the tableau desktop. but when I am trying to use it as an external service for the server I am getting an error that the tableau could not connect to the external service. tabpy2.txt tabpy3 1 tabpy1 1

your help is very much appreciated.

Thanks

BBeran commented 7 years ago

Did you try the following for the setup on Tableau server?

tabadmin stop tabadmin set vizqlserver.extsvc.host tabadmin set vizqlserver.extsvc.port tabadmin configure tabadmin start

venkataanumula commented 7 years ago

Yes, I tried that again but still the same error image

BBeran commented 7 years ago

It might be having problem resolving the name localhost.

Have you tried http://localhost OR 127.0.0.1 when configuring on the server and see if it solves the problem?

venkataanumula commented 7 years ago

I tired both http://localhost and 127.0.0.1 . It did not work . But, it works when i configure with the ip address of the box where the tableau server is installed.

BBeran commented 7 years ago

If those names aren't resolving but IP address of the server is working, it is likely an issue in the hosts file https://en.wikipedia.org/wiki/Hosts_(file)

where mapping from localhost and 127.0.0.1 need to be defined.

But it seems like you found a solution by using the full hostname for the server TabPy is on.

andylam1989 commented 7 years ago

I have tried with the localhost (127.0.0.1) of coz it works well but I tried to config in Tableau server, it's not work. My flow is configured in server tabadmin stop tabadmin set vizqlserver.allow_insecure_scripts true tabadmin set vizqlserver.extsvc.host tabadmin set vizqlserver.extsvc.port tabadmin config tabadmin start

Any idea for this problem. Thanks ;)

venkataanumula commented 7 years ago

@andylam1989 it would be helpful if you could mention the error you are getting.

BBeran commented 7 years ago

I have a server running without any issues with the following config

vizqlserver.extsvc.host http://127.0.0.1 vizqlserver.extsvc.port 9004 vizqlserver.script.disabled true

Last setting is backwards. It has to be set to true to enable scripts while the name implies otherwise. allow_insecure_scripts controls whether Tableau Server should accept string parameters which is a safety measure against injection attacks.

andylam1989 commented 7 years ago

Thank you venkataanumula and BBeran. Of coz when I set 127.0.0.1, it means the IP of localhost and it works very well. Now I want to use another computer with IP to run Pytab and in Tableau, I set the IP of this computer? Is it possible? I saw some blog for Rserve and I have tried this way. Thanks again!

s13varun commented 6 years ago

I am trying to connect R and tableau server. In my case R and tableau desktop are on one machine and tableau server on another machine. I could publish workbook, but it returns error when opening workbook. I had executed the following C:\Program Files\Tableau\Tableau Server\10.4\bin>tabadmin stop C:\Program Files\Tableau\Tableau Server\10.4\bin>tabadmin set vizqlserver.extsvc.host ip address of the machine hosting Rserve C:\Program Files\Tableau\Tableau Server\10.4\bin>tabadmin set vizqlserver.extsvc.port 6311 C:\Program Files\Tableau\Tableau Server\10.4\bin>tabadmin set vizqlserver.script.disabled true C:\Program Files\Tableau\Tableau Server\10.4\bin>tabadmin configure C:\Program Files\Tableau\Tableau Server\10.4\bin>tabadmin start r tab tabserverror

Any idea to solve this ? Thanks

0golovatyi commented 6 years ago

Try to start Rserve with Rserve(debug=TRUE) to confirm it can locate and load config file and parameters there are what you expect them to be.

s13varun commented 6 years ago

I have made the following changes. I could publish workbook, when I try to open dashboard it takes more than 30 minutes and returns error. r tab cmd tabserverror

nmannheimer commented 6 years ago

In your cmd line printouts it looks like you're setting the extsvc.host to localhost, but earlier you mentioned you are running RServe on a different machine.

Are you setting the extsvc.host to the ip address of the machine where Rserve is running? Additionally can you confirm that you can ping the machine where RServe is running from the box where Tableau Server is running?

nmannheimer commented 6 years ago

Also, @s13varun this github page is primarily for supporting TabPy Python integration. If the issue persists, please consider posting on Tableau's forums, so you can get input from community members who may have more experience with RServe as well as the Tableau team:

https://community.tableau.com/community/forums/externalservices

s13varun commented 6 years ago

Sorry for not updating that. Both are running on same machine now. I didn't understand " Can you confirm that you can ping the machine where RServe is running from the box where Tableau Server is running? "

nmannheimer commented 6 years ago

So if I understand correctly, you are running RServe on the same machine as your Tableau Server? Are you also running an RServe instance on the same machine as your Tableau Desktop instance, or are all three on the same machine?

If you were running RServe on a different machine than your Tableau Server, pinging the computer that was running RServe from the computer running Tableau Server would confirm that you can send network traffic between the two. http://www.steves-internet-guide.com/ping-command/

s13varun commented 6 years ago

All three are running on the same machine

nmannheimer commented 6 years ago

And to confirm, you are able to render the visualization you are trying to make with R code in Desktop, but not in Server even when all three are on the same machine?

s13varun commented 6 years ago

Yes. It works on desktop but not in server

0golovatyi commented 6 years ago

@s13varun,

With debug=TRUE on the screenshot, you provided it is unfortunately still not clear what config file and parameters running Rserve is using. Could you try Rserve(debug=TRUE, args="--RS-conf C:\path\to\conf\file")? I am not sure it works for Windows Rserve in the same way - on Linux\Mac debug output shows if config file was found and what parameters are used (host, port, etc.)

s13varun commented 6 years ago

Correct me if I am wrong. I had found many tutorial regarding config file of Rserve. I have not found any config file under Rserve yet. Is config file comes with Rserve installation or should we create one ?

nmannheimer commented 6 years ago

Hello @s13varun,

Since this issue is ongoing, I'm going to ask that you submit an issue on the Tableau forums in the external services section: https://community.tableau.com/community/forums/externalservices or file a ticket with Tableau technical support: https://www.tableau.com/support

This github page is for Tableau's Python integration server TabPy.

s13varun commented 6 years ago

I want to integrate R and tableau server to make use of a function in R package. It is not working even on tableau desktop. To integrate python with tableau, I already had anaconda installed on my machine. When I ran startup.bat window closes immediately. How to solve this ?

startup.bat file location C:\Users\user4\AppData\Local\conda\conda\pkgs\tabpy-server-0.2-py36_0\Lib\site-packages\tabpy_server

ap

ghost commented 6 years ago

You’ll probably get faster answer on the Tableau forums. This repository is for TabPy and not R. Some individuals will have knowledge of R here, but it’s not the focus. On Mon, Sep 3, 2018 at 5:53 AM s13varun notifications@github.com wrote:

I want to integrate R and tableau server to make use of a function in R package. It is not working even on tableau desktop. To integrate python with tableau, I already had anaconda installed on my machine. When I ran startup.bat window closes immediately. How to solve this ?

startup.bat file location C:\Users\user4\AppData\Local\conda\conda\pkgs\tabpy-server-0.2-py36_0\Lib\site-packages\tabpy_server

[image: ap] https://user-images.githubusercontent.com/36952745/44983095-9f283380-af95-11e8-8058-d6ba8b43344b.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tableau/TabPy/issues/37#issuecomment-418078497, or mute the thread https://github.com/notifications/unsubscribe-auth/ATUUxkn179EqlmJ1fiNqjcFMZWa2Cda1ks5uXQosgaJpZM4NwGfQ .