ckan-docker icon indicating copy to clipboard operation
ckan-docker copied to clipboard

installation issues Exception: Config option `ckan.datapusher.api_token` must be set to use the DataPusher.

Open ken-muturi opened this issue 2 years ago • 10 comments

i get the below errors even after running

docker stop $(docker ps -q); docker rm $(docker ps -aq); docker image rm $(docker image ls -q); docker network rm $(docker network ls -q); docker volume rm $(docker volume ls -q) followed by docker system prune

then

docker compose build
docker compose up
 09:16:00,457 INFO  [ckan.config.environment] Loading templates from /srv/app/src/ckan/ckan/templates
ckan        | Traceback (most recent call last):
ckan        |   File "/srv/app/wsgi.py", line 20, in <module>
ckan        |     application = make_app(config)
ckan        |   File "/srv/app/src/ckan/ckan/config/middleware/__init__.py", line 27, in make_app
ckan        |     load_environment(conf)
ckan        |   File "/srv/app/src/ckan/ckan/config/environment.py", line 69, in load_environment
ckan        |     p.load_all()
ckan        |   File "/srv/app/src/ckan/ckan/plugins/core.py", line 224, in load_all
ckan        |     load(*plugins)
ckan        |   File "/srv/app/src/ckan/ckan/plugins/core.py", line 255, in load
ckan        |     plugins_update()
ckan        |   File "/srv/app/src/ckan/ckan/plugins/core.py", line 212, in plugins_update
ckan        |     environment.update_config()
ckan        |   File "/srv/app/src/ckan/ckan/config/environment.py", line 227, in update_config
ckan        |     plugin.configure(config)
ckan        |   File "/srv/app/src/ckan/ckanext/datapusher/plugin.py", line 52, in configure
ckan        |     raise Exception(
ckan        | Exception: Config option `ckan.datapusher.api_token` must be set to use the DataPusher.

ken-muturi avatar Aug 23 '23 09:08 ken-muturi

When the CKAN container comes up do you see the line: "Set up ckan.datapusher.api_token in the CKAN config file" in the logs ie: Screenshot 2023-08-23 at 3 18 02 pm plus do you see the ckan.datapusher.api_token line in the ckan.ini file in the running CKAN container? Screenshot 2023-08-23 at 3 22 02 pm

kowh-ai avatar Aug 23 '23 13:08 kowh-ai

i see this Set up ckan.datapusher.api_token in the CKAN config file on the console; however the api token in the container is empty image

ken-muturi avatar Aug 23 '23 14:08 ken-muturi

any feedback on this; even cloning a new repo gives me the same message

ken-muturi avatar Aug 24 '23 14:08 ken-muturi

i am still struggling with this issue even after about 10-15 trials; I even rebuilt my server to ensure i have a clean slate; Is there a way to generate the API token manually?

image

ken-muturi avatar Aug 29 '23 07:08 ken-muturi

I think you might want to start debugging where the ckan.datapusher.api_token gets created and subsequently changed. Take a look here to understand how to override the setup files for the local image/container

kowh-ai avatar Aug 29 '23 08:08 kowh-ai

thanks, let me look into it

ken-muturi avatar Aug 29 '23 09:08 ken-muturi

Are you using the master branch?

kowh-ai avatar Sep 04 '23 09:09 kowh-ai

yes i am using master branch

ken-muturi avatar Sep 05 '23 13:09 ken-muturi

Hi everyone,

I'm facing the same problem using the Master branch of ckan-docker.

This happens when I build another image including extensions and try to use the new image.

image

But if I install the extension manually using the original image and just restart the container everything works fine.

cicerobcastro avatar Oct 16 '23 18:10 cicerobcastro

i managed to have this install only with the default settings. I think the only thing i changed was the db credentials and site url. any other changes would cause this issue.

ken-muturi avatar Oct 17 '23 04:10 ken-muturi