I am running Landscape On-Premises (version 16.06) on Ubuntu Server 16.04. The activities and the event tabs are filling up with the same entries every day. I am not able to delete any entries from the web interface. Via ssh I deleted relevant log files in the /var/log directory of the server but all activities and the event logs are still present when I login to the Landscape web interface.

I already got the information that the logs are supposed be an auditable log and so intentionally are meant to be not clearable. How can I nevertheless remove the activities and the event logs ? Where are the log files located and how can I manipulate them to clean up the server interface ?



Update : Results from the attempt to remove and reinstall postgresql and landscape-server

The solution to purge and reinstall postgresql generally worked, but after re-installing and re-registering account and computers, the computers were not able to ping the Landscape Server.

The solution to purge and reinstall landscape-server did not work - I got an error, which I was not able to solve, also I could not access Landscape Server at all anymore -> screenshots below.

I need to add that I did not run sudo apt autoremove after the removal - because this would have been a complete re-installation, which is too much effort for only clearing the event log.



They are located in the postgresql database, and there is no supported facility to clear them. You could attempt database manipulations, but I don't know what they are offhand.

Just in case it's fuzzy at all, I would not recommend trying to clear out the database rows, unless you are just playing around.

  • of course! sudo apt-get purge postgresql should give you prompts for clearing everything. It will get rid of all data, but you can do the same with sudo apt-get purge landscape-server\* and start fresh. – dpb Aug 16 '16 at 18:44
  • Thank you very much for your answer and your suggestions ! :) Please have a look and check the updated information given in the question ... maybe you are having any other alternative ideas or suggestions ? :) – cl-netbox Aug 17 '16 at 8:37
  • Could you give information about what was contained on the terminal after you hit enter in the screenshot you posted? – dpb Aug 22 '16 at 15:47
  • Nothing was returning in the terminal afterwards, the configuration window just closed and I was able to execute other commands as usual - I had to uninstall and reinstall everything to access landscape again. :) – cl-netbox Aug 22 '16 at 16:15
  • Hey -- drop to a terminal on your server, and run the following please: sudo lsctl stop; sudo setup-landscape-server; sudo lsctl start and paste the results please? Thanks. – dpb Aug 22 '16 at 17:48

I had a period of lots of VM churn, which left me with a similar situation (lots of dangling activities).

It turns out it's quite easy to clear out old activities.

Log into your database:

durr@spacecase:~> sudo -u postgres psql
[sudo] password for durr:
psql (9.5.7)
Type "help" for help.


We can see the databases landscape creates at this point.

postgres=# \l
                                        List of databases
              Name               |  Owner   | Encoding  | Collate | Ctype |   Access privileges
 landscape-standalone-account-1  | postgres | SQL_ASCII | C       | C     |
 landscape-standalone-knowledge  | postgres | SQL_ASCII | C       | C     |
 landscape-standalone-main       | postgres | SQL_ASCII | C       | C     |
 landscape-standalone-package    | postgres | SQL_ASCII | C       | C     |
 landscape-standalone-resource-1 | postgres | SQL_ASCII | C       | C     |
 landscape-standalone-session    | postgres | SQL_ASCII | C       | C     |
 postgres                        | postgres | SQL_ASCII | C       | C     |
 template0                       | postgres | SQL_ASCII | C       | C     | =c/postgres          +
                                 |          |           |         |       | postgres=CTc/postgres
 template1                       | postgres | SQL_ASCII | C       | C     | =c/postgres          +
                                 |          |           |         |       | postgres=CTc/postgres
(9 rows)

I've poked around before, I have no idea why landscape apparently needs SIX different databases for one application. Anyways, in this case, we want the landscape-standalone-account-1 database:

postgres=# \c landscape-standalone-account-1
You are now connected to database "landscape-standalone-account-1" as user "postgres".

\d will list the tables in this database. There are a giant number of them. This will probably open an output pager, hit q to exit (or just don't bother with \d.

landscape-standalone-account-1=# \d

The activity table looks interesting. Let's have a look:

landscape-standalone-account-1=# \d activity

[Opens a output-pager again]

Whoa, it's HUGE. How many items are in it?

landscape-standalone-account-1=# SELECT count(*) FROM ACTIVITY;
(1 row)

That doesn't match my activity count (38). Anyways, we can reinstall easily enough, let's just nuke everything.

landscape-standalone-account-1=# DELETE FROM activity;
landscape-standalone-account-1=# \q

And I now have no activities, and tailing the logs in /var/log/landscape and /var/log/landscape-server doesn't show any errors.

So yes, it's pretty easy to clean out stale activities yourself.


It is not normal to have so many resync activities. Something else is going on. Ideally, there should be none.

We have this old FAQ entry which still applies:


And there is one more tip to add to that list: check if you have multiple landscape-client processes. A normal process tree looks like this:

2350 ?        S      1:00 /usr/bin/python /usr/bin/landscape-client --daemon --pid-file /var/run/landscape/landscape-client.pid
2352 ?        Sl     0:30  \_ /usr/bin/python /usr/bin/landscape-broker --ignore-sigint --quiet
2353 ?        Sl     0:36  \_ /usr/bin/python /usr/bin/landscape-monitor --ignore-sigint --quiet
2354 ?        S      0:16  \_ /usr/bin/python /usr/bin/landscape-manager --ignore-sigint --quiet

There might be one more child called package-reporter or package-changer, that's ok, but all under the parent landscape-client. If you have something different like a process outside of this group, that could be causing the resyncs. This would also cause "clones" to appear in your computers.

  • Thank you very much for your answer Andreas ! :) Yes, you are right, randomly I am getting asked to accept a pending computer, which is a clone of one already being registered - I have to remove the old one before accepting the new one, otherwise it does not work. There is no machine with a duplicate ID as described in the troubleshooting faq and there is only one landscape-client process running. A clean new installation of the whole landscape environment on a basic ubuntu server setup brought no changes or improvements. :) – cl-netbox Aug 19 '16 at 13:10
  • If you are getting clones, then you have one or more landscape client broker processes trying to register the same computer in landscape. Or you have a shared /var/lib/landscape/client among different computers. – Andreas Hasenack Aug 19 '16 at 13:54

After many different attempts to clear the activities and event logs, this is what worked :

  • clean installation of the Ubuntu server, including lamp / mail / openssh / postgresql
  • clean installation of landscape-api / landscape-client / landscape-server-quickstart
  • shutdown the Ubuntu server

  • change /etc/landscape/client.conf to default on every attached Ubuntu workstation

  • remove .pem file from /etc/landscape folder on every attached Ubuntu workstation
  • shutdown every workstation

  • start Ubuntu server, register Landscape account and afterwards register the server

  • start all Ubuntu workstations, add the new .pem file, edit /etc/landscape/client.conf
  • register every Ubuntu workstation and accept all pending computers in Landscape

Now all works as expected, though starting over from scratch somehow is a bit overkill.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.