Skip to main content

How do you clear caches on Ubuntu?

At first, I attempted

echo 1 > /proc/sys/vm/drop_caches


-bash: /proc/sys/vm/drop_caches: Permission denied

Adding sudo in front of the command was met with the same result.  What about if I execute the shell as root

sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches'

Success.  Caches cleared.


flask_debugtoolbar module doesn't exist

Error when running ckan.ini init

from flask_debugtoolbar import DebugToolbarExtension
ModuleNotFoundError: No module named 'flask_debugtoolbar'

Activate your CKAN virtual environment, for example:

. /usr/lib/ckan/default/bin/activate

Then check your location is

cd /usr/lib/ckan/default/src


How To Install Apache Solr 8.11 on Ubuntu

In this article I'll walk through the steps I went through to install Solr on Ubuntu.


Step 1: Java

Check if Java is installed on your server:

java -version

Not there - then Java is the first step for you to set up for Solr.  JAVA SE 8 or Later is required to run Apache Solr 8.  Utilisation taking after order to check in the event that you have Java introduced as of now on your system.

ckan.ini issues

Focusing on the ckan.ini file (/etc/ckan/default/ckan.ini).  When I run the commands to recreate the database tables for CKAN:

cd /usr/lib/ckan/default/src/ckan
ckan -c /etc/ckan/default/ckan.ini db init

The response I'm getting is:

server 500 error - 'Internal server error' on Nginx

Finding the issue with a server 500 error

The Nginx error logs are showing too much detail.


Nginx logs and test

There are no errors in the nginx log and sudo nginx -t looks fine

sudo nginx -t


nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful


Setting DataStore with CKAN on Nginx

Following the instructions on CKAN DataStore with a little information.


Enable the plugin

In your CKAN config file (/etc/ckan/default/ckan.ini), update the datastore plugin

ckan.plugins = datastore


CRIT Supervisor is running as root... Privileges were not dropped because no user is specified

Supervisor running as root error when running the command

sudo service supervisor status

Response error

892 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.

Check the supervisord.conf file in the directory

Subscribe to Ubuntu