1

I'm using ckan 2.7.2 (Docker), Whenever I try to update any resource file (via GUI), Ckan is throwing an error i.e. 403 forbidden and data could not successfully upload to the DataStore. Because of that file preview is showing old content, although we are able to download the new updated file (with updated data). whether I try to upload(update) that file directly to DataStore by Upload to DataStore option, it throws same error i.e. 403 Forbidden error.

below are the logs of datapusher.error.log file:

[Tue Jun 23 10:56:50.423279 2020] [wsgi:error] [pid 725:tid 140031474673408] Deleting "<resource_id>" from datastore.
[Tue Jun 23 10:56:50.469999 2020] [wsgi:error] [pid 725:tid 140031474673408] /usr/lib/ckan/datapusher/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:340: SubjectAltNameWarning: Certificate for demo.ckan.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
[Tue Jun 23 10:56:50.470014 2020] [wsgi:error] [pid 725:tid 140031474673408]   SubjectAltNameWarning
[Tue Jun 23 10:56:50.534169 2020] [wsgi:error] [pid 725:tid 140031474673408] Job "push_to_datastore (trigger: RunTriggerNow, run = True, next run at: None)" raised an exception
[Tue Jun 23 10:56:50.534185 2020] [wsgi:error] [pid 725:tid 140031474673408] Traceback (most recent call last):
[Tue Jun 23 10:56:50.534187 2020] [wsgi:error] [pid 725:tid 140031474673408]   File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/apscheduler/scheduler.py", line 512, in _run_job
[Tue Jun 23 10:56:50.534189 2020] [wsgi:error] [pid 725:tid 140031474673408]     retval = job.func(*job.args, **job.kwargs)
[Tue Jun 23 10:56:50.534190 2020] [wsgi:error] [pid 725:tid 140031474673408]   File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 463, in push_to_datastore
[Tue Jun 23 10:56:50.534192 2020] [wsgi:error] [pid 725:tid 140031474673408]     delete_datastore_resource(resource_id, api_key, ckan_url)
[Tue Jun 23 10:56:50.534193 2020] [wsgi:error] [pid 725:tid 140031474673408]   File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 199, in delete_datastore_resource
[Tue Jun 23 10:56:50.534195 2020] [wsgi:error] [pid 725:tid 140031474673408]     good_status=(201, 200, 404), ignore_no_success=True)
[Tue Jun 23 10:56:50.534196 2020] [wsgi:error] [pid 725:tid 140031474673408]   File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 160, in check_response
[Tue Jun 23 10:56:50.534197 2020] [wsgi:error] [pid 725:tid 140031474673408]     response=response.text)
[Tue Jun 23 10:56:50.534198 2020] [wsgi:error] [pid 725:tid 140031474673408] HTTPError: CKAN bad response. Status code: 403 Forbidden. At: https://demo.ckan.org/ckan/api/3/action/datastore_delete. status=403 url=https://demo.ckan.org/ckan/api/3/action/datastore_delete response=<html>\r
[Tue Jun 23 10:56:50.534200 2020] [wsgi:error] [pid 725:tid 140031474673408] <head><title>403 Forbidden</title></head>\r
[Tue Jun 23 10:56:50.534201 2020] [wsgi:error] [pid 725:tid 140031474673408] <body bgcolor="white">\r
[Tue Jun 23 10:56:50.534203 2020] [wsgi:error] [pid 725:tid 140031474673408] <center><h1>403 Forbidden</h1></center>\r
[Tue Jun 23 10:56:50.534204 2020] [wsgi:error] [pid 725:tid 140031474673408] <hr><center>nginx</center>\r
[Tue Jun 23 10:56:50.534205 2020] [wsgi:error] [pid 725:tid 140031474673408] </body>\r
[Tue Jun 23 10:56:50.534206 2020] [wsgi:error] [pid 725:tid 140031474673408] </html>\r

Please suggest, how to fix this. Thanks:)

e007
  • 21
  • 1

0 Answers0