Andrew Fletcher published: 5 August 2022 2 minutes read
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 Fletcher
•
27 Oct 2023
Using OpenAI to summarise PDF
To use OpenAI to summarise text from a PDF using Python 3.11.6, you'll first need to extract the text from the PDF and then send it to the OpenAI API for summarisation. Preparation Set-uppip install python-dotenv langchain openai tiktoken pypdf pymupdf CodeThe current code is on my...
Andrew Fletcher
•
20 Oct 2023
PermissionError: [Errno 13] Permission denied
Permission errorTraceback (most recent call last):
File "/var/www/html/open-ai/summarise-ai.py", line 144, in <module>
getfiles()
File "/var/www/html/open-ai/summarise-ai.py", line 26, in getfiles
summarise(filename)
File "/var/www/html/open-ai/summarise-ai.py", line 105, in...
Andrew Fletcher
•
19 Oct 2023
How to add an environment variable in Ubuntu
To set an environment variable on Ubuntu, can be achieved via a few options. This depends on whether you want the variable to be system-wide or specific to a user's session. Here are a couple of more common methods for setting environment variables:Setting environment variables for the...