Skip to main content

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:

Option ckan.requests.timeout is not declared
Option ckan.requests.timeout is not declared
2022-08-05 03:31:07,941 INFO  [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2022-08-05 03:31:07,941 INFO  [ckan.config.environment] Loading static files from public
2022-08-05 03:31:08,054 WARNI [ckan.common] Option ckan.plugins is not declared
2022-08-05 03:31:08,321 ERROR [ckan.lib.search.common] Solr responded with an error (HTTP 500): [Reason: None]
Traceback (most recent call last):
  File "/home/{project}/ckan/lib/default/src/ckan/ckan/lib/search/common.py", line 69, in is_available
    conn.search(q="*:*", rows=1)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pysolr.py", line 827, in search
    response = self._select(params, handler=search_handler)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pysolr.py", line 488, in _select
    return self._send_request("get", path)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pysolr.py", line 463, in _send_request
    raise SolrError(error_message % (resp.status_code, solr_message))
pysolr.SolrError: Solr responded with an error (HTTP 500): [Reason: None]

2022-08-05 03:31:08,323 WARNI [ckan.lib.search] Problems were found while connecting to the SOLR server
2022-08-05 03:31:08,325 INFO  [ckan.config.environment] Loading templates from /home/{project}/ckan/lib/default/src/ckan/ckan/templates
2022-08-05 03:31:08,911 ERROR [ckan.lib.search.common] Solr responded with an error (HTTP 500): [Reason: None]
Traceback (most recent call last):
  File "/home/{project}/ckan/lib/default/src/ckan/ckan/lib/search/common.py", line 69, in is_available
    conn.search(q="*:*", rows=1)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pysolr.py", line 827, in search
    response = self._select(params, handler=search_handler)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pysolr.py", line 488, in _select
    return self._send_request("get", path)
  File "/usr/lib/ckan/default/lib/python3.8/site-packages/pysolr.py", line 463, in _send_request
    raise SolrError(error_message % (resp.status_code, solr_message))
pysolr.SolrError: Solr responded with an error (HTTP 500): [Reason: None]

2022-08-05 03:31:08,912 WARNI [ckan.lib.search] Problems were found while connecting to the SOLR server
2022-08-05 03:31:08,913 INFO  [ckan.config.environment] Loading templates from /home/{project}/ckan/lib/default/src/ckan/ckan/templates
2022-08-05 03:31:09,191 INFO  [ckan.cli.db] Initialize the Database
2022-08-05 03:31:09,318 INFO  [ckan.model] CKAN database version remains as: ff13667243ed (head)
2022-08-05 03:31:09,318 INFO  [ckan.model] Database initialised
Initialising DB: SUCCESS

 

Yes, I've activated the Python virtual environment command:

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

 

Focusing on the 500 error

 ERROR [ckan.lib.search.common] Solr responded with an error (HTTP 500): [Reason: None]

If this is receiving a 500 error is the site seeing the same too?

 

Related articles

Andrew Fletcher18 Mar 2024
Resolving CVE-2022-48624 less issue
To resolve the CVE-2022-48624 vulnerability on Ubuntu using Nginx, it's crucial to understand that the issue lies within the "less" package, not Nginx itself. The vulnerability affects "less" before version 606, where close_altfile in filename.c in less omits shell_quote calls for LESSCLOSE,...
Andrew Fletcher06 Mar 2024
Terminal command to find and replace
In many terminal text editors, you use find command as reference in Terminal commands - find.  How about find and replace.  This action depends on the specific text editor you're using in the terminal.  Here are a few common terminal text editors and how you can find and replace...