install on a package installation of ckan
I have installed ckan by following exactly the instructions found here: http://docs.ckan.org/en/2.9/maintaining/installing/install-from-package.html on a clean ubuntu 18.04 installation.
I follow the instructions found in the readme file in order to install ckanext-scheming. However, if I add even one extension from scheming_datasets, scheming_groups, scheming_organizations to the variable ckan.plugins, supervisor gives the following message after running reload, and then status.
$ sudo supervisorctl status
ckan-datapusher:ckan-datapusher-00 RUNNING pid 13844, uptime 0:16:43
ckan-uwsgi:ckan-uwsgi-00 RUNNING pid 13845, uptime 0:16:43
ckan-worker:ckan-worker-00 FATAL Exited too quickly (process log may have details)
I have managed to install the extension just fine on a source installation of ckan.
I would like to point out that when running the two first commands of the instructions in readme (with the virtual environment enabled), which for me would be:
cd /usr/lib/ckan/default/src
sudo pip3 install -e "git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming"
I end up with a somewhat weird structure of directories.
/usr/lib/ckan/default/src$ ls
ckan src
(this src directory appears after running pip install)
/usr/lib/ckan/default/src$ ls src
ckanext-scheming pip-delete-this-directory.txt
Is the structure above to be expected? If yes, what am I doing wrong?
EDIT: After further inspection, cd-ing into the root of the virtual environment and then running pip install makes more sense, because it installs ckan-scheming next to the ckan directory. However, running "ckan" gives a PluginNotFoundException: scheming_datasets exception.
@kowh-ai when following the documented install is there a standard place for the error logs? I think this user needs the traceback or maybe this repo might need better installation instructions.
@wardi Hello,
Also if I run:
cat /var/log/ckan/ckan-worker.stderr.log
I get the following:
2022-03-03 21:12:58,016 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/ckan", line 11, in <module>
load_entry_point('ckan', 'console_scripts', 'ckan')()
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 781, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 700, in make_context
self.parse_args(ctx, args)
File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 115, in parse_args
result = super(ExtendableGroup, self).parse_args(ctx, args)
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1212, in parse_args
rest = Command.parse_args(self, ctx, args)
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1048, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 1630, in handle_parse_result
value = invoke_param_callback(self.callback, ctx, self, value)
File "/usr/lib/ckan/default/lib/python3.8/site-packages/click/core.py", line 123, in invoke_param_callback
return callback(ctx, param, value)
File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 125, in _init_ckan_config
_add_ctx_object(ctx, value)
File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 134, in _add_ctx_object
ctx.obj = CtxObject(path)
File "/usr/lib/ckan/default/src/ckan/ckan/cli/cli.py", line 56, in __init__
self.app = make_app(self.config)
File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 56, in make_app
load_environment(conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 123, in load_environment
p.load_all()
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 165, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 179, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 282, in _get_service
raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: scheming_datasets
EDIT: I have also run
python setup.py develop
inside the root folder of the plugin, but still nothing
@wardi - Yes kind of standard location:
/var/log/ckan/*.log for all the services started with Supervisor (web, worker, datapusher)
/var/log/ngnix/*.log for nginx logs
/path/to/solr/server/logs/*.log for Solr 8 logs (if Solr is installed manually)
I think the intention with the CKAN Package install is to get a simple CKAN environment up and running that would survive things like a system reboot (maybe for non-Developers). Installing CKAN extensions on top of this would require a bit more work: mainly in the area of file ownership changes, PATH changes, who runs CKAN etc. Installing CKAN from source may be a better option here.
@kowh-ai Hi,
What I don't understand however is why would the instructions for the package installation of ckan state the following right here http://docs.ckan.org/en/2.9/maintaining/installing/install-from-package.html#install-the-ckan-package
- Install the Ubuntu packages that CKAN requires (and ‘git’, to enable you to install CKAN extensions):
From that, it would seem that package installation supports adding extensions (?)
Yeah it definitely supports installing CKAN extensions, it just may take a bit of extra effort to get working compared to using the CKAN install from source.
did anyone get this working when installing from packages? I keep getting the same error.
Currently building a new VM on 20.04 to try install from source.