I am running Ubuntu Server 16.04.1 with Landscape On-Premises 16.06
installed and 3 computers are attached. Since a few days the update security script is not running anymore, everything else works as expected. To make sure that there is nothing wrong with my setup, I performed a new installation from scratch. The issue remains, I am receiving the permanent alert that the script update_security_db.sh
did not run - actually it never ran since the fresh installation at all.
This is the error information I get from /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): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was los$
Sep 1 19:15:08 update-security-db ERR ]
The attempt trying to run the update_security_db.sh
script as landscape user manually failed.
(sudo -u landscape bash -x /opt/canonical/landscape/scripts/update_security_db.sh
)
All attached computers (1 server and 2 workstations) are having the latest available updates installed. What is the root cause and what has to be done to make it running properly again ?
That script has its own log file in
/var/log/landscape-server
. It downloads a file from the Ubuntu servers using curl(1) and parses it locally. I suspect you may have a proxy and are hitting https://bugs.launchpad.net/landscape/+bug/1523950 (landscape cron jobs don't get proxy setting).The logs will tell you what is going on.
I finally could figure it out myself ... and everything was related to the original server host name. As I found out while solving : How to use the Landscape API in Landscape On-Premises correctly, using
landscape-server
on a server with a host name which contains upper-case letters caused the problem that thelandscape-api
is unusable. After restoring a clonezilla basic server image and renaming the host using all lower-case letters, I thought that everything should work now ...I was completely wrong - somewhere the old host name must have been cached, though I edited both, the
/etc/hostname
and theetc/hosts
files and rebooted the server system afterwards. Then I decided to perform a complete new installation from the Ubuntu Server 16.04 USB media. Now everything is working as expected - theupdate_security_db.sh
script error disappeared. Lesson learned ! Never use upper-case letters and change the host name when using Landscape.Even though this is old it is still relevant, I have an updated resolution. If you change the hostname that is running Landscape then you must reconfigure RabbitMQ, no matter upper or lowercase.
Get the configured landscape user's password for RabbitMQ
Under the [broker] section the password is base64 encoded so copy everything after b64: then decode it
The returned output is the actual password. Now take that value and create the RabbitMQ landscape user,
Create the vhost, set landscape user permissions and restart
Everything should be working now after hostname change.