tableau-server-docker icon indicating copy to clipboard operation
tableau-server-docker copied to clipboard

TableauServer doesn't start when container restart

Open wzrzt opened this issue 6 years ago • 15 comments
trafficstars

Hi, I followed HOWTO: Tableau Server Linux in Docker Container to start a docker container. It works fine when first started. But if stop the container and restart again, tableauServer can't start. I tried to docker exec into it and used tsm to start it, but it says Could not connect to TSM Controller at 'bb334aeab113:8850'.. I searched a lot from google and tableau community and find nothing helpful. If tableauserver can't restart when container start, commit to a new image will be useless.
Is there anything I missed ?

wzrzt avatar Mar 19 '19 11:03 wzrzt

I found that docker run command with /usr/sbin/init in the end will solve the problem. But still TSM controller does't start at container restart. I have to systemctl restart [email protected] several minutes after container restart in order to start TSM controller. In fact it's a service called tabadmincontroller_0.service under the user "tableau". su -l tableau and then systemctl --user will show it's status and other services about tableau server.
By the way, 2019.1.1 version doesn't work for me. Got Failed to start Tableau Silent Install in Docker message and when exec in to the container, "tableau_server_install.service" status failed. When I log into "https://localhost:8850" to use TSM controller to install it, also fails, and try again, fails again.

wzrzt avatar Mar 27 '19 07:03 wzrzt

I changed container os from centOS to Ubuntu, and then it runs well.
But in fact, tableau server runs a set of services, but docker's designed for single service in one conatainer. And tableau server is statefull, so I built node image separatedly, and then run containers as they are vms. ... Anyway, it works at least.

wzrzt avatar Dec 08 '19 07:12 wzrzt

I changed container os from centOS to Ubuntu, and then it runs well. But in fact, tableau server runs a set of services, but docker's designed for single service in one conatainer. And tableau server is statefull, so I built node image separatedly, and then run containers as they are vms. ... Anyway, it works at least.

Hi wzrzt,

Is the container running stable. Also, have you tried running it on K8s? Thanks in advance :)

ChikkannaSuhas avatar Feb 21 '20 10:02 ChikkannaSuhas

By the way, 2019.1.1 version doesn't work for me. Got Failed to start Tableau Silent Install in Docker message and when exec in to the container...

Hello, @ChikkannaSuhas and @wzrzt. Can you confirm which version(s) you have been able to get working? I personally wasn't able to get this running but perhaps it was because I was attempting to use the 2019.1.1 version. Perhaps newer versions do not work with this approach?

Thanks in advance for your input/guidance!

aaronsteers avatar Feb 21 '20 16:02 aaronsteers

@ChikkannaSuhas Tableau server requires "privileged=true" which is not possible with k8s. And I'm not familar with k8s. So I haven't try it yet. One of tableau engineers said they did some exploratory about k8s. But we haven't see their solusions. https://community.tableau.com/ideas/9729 My tableau server is running well for about 10 months since April 2019, with 3 nodes running by docker-compose and "prifileged:true" .

wzrzt avatar Feb 22 '20 02:02 wzrzt

@aaronsteers. My first time 2019.1.1. And then 2019.1.2 was published and I built an image with it. It's still running.

wzrzt avatar Feb 22 '20 02:02 wzrzt

Hi @wzrzt ,

I am facing some issues while using Ubuntu Base Image. I get the below error when I run "/opt/tableau/tableau_server/packages/scripts.20194.20.1110.0952/initialize-tsm --accepteula -a tableau -f" as a part of the Dockerfile

Failed to create bus connection: No such file or directory

However, if I run the same command after looging into the container, it works fine.

vaibhavvasa236 avatar Dec 10 '20 12:12 vaibhavvasa236

@vaibhavvasa236 Maybe, find a ubuntu docker image with systemd ?

wzrzt avatar Dec 11 '20 16:12 wzrzt

@wzrzt I am using Ubuntu docker image with Systemd (jrei/systemd-ubuntu) Check this one: https://hub.docker.com/r/jrei/systemd-ubuntu/dockerfile

vaibhavvasa236 avatar Dec 11 '20 16:12 vaibhavvasa236

@vaibhavvasa236 - Thanks for sharing the docker image. I'm excited to try this out.

aaronsteers avatar Dec 11 '20 17:12 aaronsteers

@vaibhavvasa236 I am using solita/ubuntu-systemd:16.04 , https://hub.docker.com/r/solita/ubuntu-systemd

wzrzt avatar Dec 13 '20 02:12 wzrzt

I managed to get this working satisfactorily for me using 2020.4.0 and the original centos/systemd image. Here's what I learned:

  • I added STOPSIGNAL RTMIN+3 to the Dockerfile. Apparently the default stop signal that Docker uses causes issues with systemd.
  • I executed chmod 0775 /run/FNP the first time after restarting the container. It appears the permissions get messed up when the systemd service gets setup.
  • I gave a static hostname to the container. I used the line hostname: tableau in my Docker Compose file. I found that if you recreate the container, the container ID changes, and by default the container ID is the hostname. Tableau Server seems to require a static hostname or the TSM just errors out.

You'll probably need to restart Tableau Server using using tsm restart whenever you restart the container, but that wasn't a big deal for me. I hope this helps anyone who is running into similar issues.

sebluy avatar Feb 15 '21 19:02 sebluy

@sebluy - Thanks for posting this. I am really excited to try these suggestions.

In case you push the image to docker hub, feel free to share the link here

vaibhavvasa236 avatar Feb 15 '21 19:02 vaibhavvasa236

@sebluy Thank you for your info. How did you make the permissions change stay for subsequent restarts? I can't seem to make that happen, even if I commit the container.

matthew-mcdermott avatar Feb 18 '21 13:02 matthew-mcdermott

Hmm, it just stayed for me. I only had to update the permissions once after tableau-init-configure.sh was done. The service that requires the permissions is /etc/systemd/system/[email protected]. I'm guessing that some service that runs after that is overwriting them, or it could be Tableau Server itself. You could try running stat /run/FNP to check if the permissions are being overwritten, or just lost. Also, if you are using a different version of Tableau Server it might initialize slightly differently.

sebluy avatar Feb 18 '21 14:02 sebluy