1

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.

enter image description here

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 ?

3 Answers 3

1

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.

3
  • Thanks for your answer ! :) I updated the question with information from /var/log/landscape-server/update-security-db.log and no, I do not have a proxy. The link to the launchpad bug shows "This page does not exist, or you may not have permission to see it." It is strange that the script ran before and then stopped working.
    – cl-netbox
    Sep 2, 2016 at 7:27
  • I suggest to run the cron job manually with bash -x, as the landscape user. It's in two parts: one is the download of the file, the other is the import of the file into landscape. Sep 2, 2016 at 16:34
  • Thanks for the suggestion Andreas ! I ran the script manually, but this also did not work ... where running other of the cron job scripts manually did not fail. But I could find the root cause, please read my answer.
    – cl-netbox
    Sep 5, 2016 at 15:52
1

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

sudo less /opt/canonical/landscape/configs/standalone/service.conf

Under the [broker] section the password is base64 encoded so copy everything after b64: then decode it

echo the_base64_string | base64 -d

The returned output is the actual password. Now take that value and create the RabbitMQ landscape user,

sudo rabbitmqctl add_user landscape the_password_above

Create the vhost, set landscape user permissions and restart

sudo rabbitmqctl add_vhost landscape
sudo rabbitmqctl set_permissions -p landscape landscape ".*" ".*" ".*"
sudo service rabbitmq-server restart

Everything should be working now after hostname change.

1
  • Old but still relevant. Solution is working just need also uncomment /etc/rabbitmq/rabbitmq-env.conf NODE_IP_ADDRESS=127.0.0.1.
    – silhano
    Jan 29 at 9:19
0

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 the landscape-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 the etc/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 - the update_security_db.sh script error disappeared. Lesson learned ! Never use upper-case letters and change the host name when using Landscape.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .