landscape alert – 有问题的脚本:update_security_db.sh

我正在运行安装了Landscape On-Premises 16.06的Ubuntu Server 16.04.1并连接了3台计算机。 由于几天后更新安全脚本不再运行,所以其他所有内容都按预期工作。 为了确保我的设置没有任何问题,我从头开始执行新安装。 问题仍然存在,我收到脚本update_security_db.sh未运行的永久警报 – 实际上它从未在全新安装后运行。

在此处输入图像描述

这是我从/var/log/landscape-server/update-security-db.log获得的错误信息:

 Sep 1 19:15:08 update-security-db ERR Unhandled error in Deferred: Sep 1 19:15:08 update-security-db ERR Sep 1 19:15:08 update-security-db ERR Sep 1 19:15:08 update-security-db ERR Traceback (most recent call last): Sep 1 19:15:08 update-security-db ERR Failure: txamqp.client.Closed: [Failure instance: Traceback (failure with no frames): : Connection to the other side was los$ Sep 1 19:15:08 update-security-db ERR ] 

尝试以横向用户手动运行update_security_db.sh脚本失败的尝试失败 。
sudo -u landscape bash -x /opt/canonical/landscape/scripts/update_security_db.sh

所有连接的计算机(1台服务器和2台工作站)都安装了最新的可用更新。 什么是根本原因以及必须采取哪些措施才能使其再次正常运行?

该脚本在/var/log/landscape-server有自己的日志文件。 它使用curl(1)从Ubuntu服务器下载文件并在本地解析它。 我怀疑你可能有一个代理并且正在点击https://bugs.launchpad.net/landscape/+bug/1523950 (横向cron作业没有得到代理设置)。

日志会告诉你发生了什么。

我终于可以弄清楚了……而且一切都与原始服务器主机名有关。 正如我在解决过程中发现的那样: 如何在Landscape On-Premises中正确使用Landscape API,在主机名包含大写字母landscape-server上使用landscape-server导致landscape-api无法使用的问题。 在恢复clonezilla基本服务器映像并使用所有小写字母重命名主机后,我认为现在一切都应该工作了……

我完全错了 – 虽然我编辑了/etc/hostnameetc/hosts文件,然后重新启动了服务器系统,但是旧的主机名必须已被缓存。 然后我决定从Ubuntu Server 16.04 USB媒体执行全新的安装。 现在一切都按预期工作 – update_security_db.sh脚本错误消失了。 学过的知识 ! 使用横向时,切勿使用大写字母并更改主机名。