Tableau Server三年不升级的“证书问题”

近期,一家三年前开始使用Tableau并部署Tableau server服务器的客户,遇到了服务部问题,TSM无法使用的问题;仔细研究发现,此类问题会在服务器使用三年后出现,特此记录。

一、问题描述

问题最基本的症状是,8850中,提示TSM管理服务器报错,而且重启TSM也无法解决问题。如下所示:

如果在终端中使用tsm命令,则会提示:

tableau server unable to verify the server’s https certificate

二、问题诊断

1、既然是tsm故障,可以查看tsm日志,或者tabadmincontroller日志来判断。如下所示,在tsm.log日志中,我们发现在ERROR报错行之前,有多个 FAILED/Invalid等的错误提示。

2023-02-26 17:12:23.030 main : DEBUG com.tableausoftware.tabadmin.commands.TabadminCommand - Creating ServerApi client
2023-02-26 17:12:23.137 main : INFO com.tableausoftware.tabadmin.cli.ServerApi - Creating ServerApi object - host:biganalyze, port:8850, skipCertValidation:false
2023-02-26 17:12:23.147 main : TRACE com.tableau.certificates.LinuxCertManager - Creating LinuxCertManager(/etc/opt/tableau/tableau_server/tableauservicesmanagerca.jks)
2023-02-26 17:12:23.148 main : TRACE com.tableau.certificates.PrivateKeystoreCertManager - Constructing PrivateKeystoreCertManager(/etc/opt/tableau/tableau_server/tableauservicesmanagerca.jks, /tmp/.tableauservicesmanagerca-lockfile)
2023-02-26 17:12:23.149 main : TRACE com.tableau.certificates.LinuxCertManager - Creating LinuxCertManager(/etc/opt/tableau/tableau_server/tableauservicesmanagerca.jks)
2023-02-26 17:12:23.149 main : TRACE com.tableau.certificates.PrivateKeystoreCertManager - Constructing PrivateKeystoreCertManager(/etc/opt/tableau/tableau_server/

仔细查看报错会发现,系统实在2019年12月安装的,到2022年12月正好三年!关键是为了稳定,客户三年没有升级,所以导致certification证书到期。

在一篇官方的说明文章中,我们找到类似的说明:

Error “Could not connect to TSM Controller at ‘https://servername:8850′” Running TSM Com

文章提到,如果有证书失效情况,优先查看tsm.log日志。

三、解决方案

也是在上面的官方帮助文件(英文)中,提到了该问题的背景信息和解决方案。

TSM使用了一个自签名的证书,在安装上生成。在早期版本中,Tableau重装时会自动重新生成证书,如今,重装安装tabadmincontroller也可以生成新证书。

TSM uses a self-signed SSL certificate that is generated at time of installation.  In earlier versions, a full Tableau Server reinstall was required to regenerate a new SSL cert.  In current versions, a reinstall of the tabadmincontroller can be performed to generate a new certificate. 

另一个办法是在使用tsm时增加一个临时的参数–trust-admin-controller-cert,可以用于tsm命令和脚本升级。不过要注意,升级要在同一个大版本下操作,比如早期的2021.4.1版本,就可以升级到2021.4.14或者其他2021.4.1+版本。

Current releases have added a flag, –trust-admin-controller-cert, to tsm and the upgrade-tsm script.  To perform this resolution, you need to install the same version family.  For example, if using Tableau Server 2021.4.1, you will need to install Tableau Server 2021.4.1+.

1、临时策略:

使用–trust-admin-controller-cert,如下所示,我在第一时间使用这个方法抓紧备份了数据。后续高危操作,都要建立在备份基础上。

2、重装tabadmincontroller

我计划从当前的2020.2直接升级到2021.4.14,出现了大版本变化,所以我计划先重装tabadmincontroller,确保证书没有问题,然后再升级。

在上面文中,官方提供了详细的步骤。

1)Open a command prompt as administrator以管理员执行命令终端

2)停止Tableau服务器:tsm stop –trust-admin-controller-cert

3)切换到Tableau\Tableau Server\data\tabsvc\services\tabadmincontroller_<version>路径。window和linux下的路径可能有所不同。

接下来,运行卸载、安装脚本。

4)运行 uninstall.cmd(Linux中unistall.sh),如果出现0,说明运行成功 (Exit code 0 means it was successful)

5)运行 Install.cmd.如果出现0,说明运行成功 (Exit code 0 means it was successful)

6)之后重启服务器。Restart the Tableau Computer.

7)启动 TSM。Start the Tableau Server using the TSM web UI or using TSM Start.

喜乐君
Feb 26, 2023

发布者:喜乐君

喜乐君 | Tableau Partner,Tableau Desktop and Server QA Certification

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

您正在使用您的 WordPress.com 账号评论。 注销 /  更改 )

Twitter picture

您正在使用您的 Twitter 账号评论。 注销 /  更改 )

Facebook photo

您正在使用您的 Facebook 账号评论。 注销 /  更改 )

Connecting to %s

%d 博主赞过: