Closed jindrichmynarz closed 9 years ago
What am I supposed to do? This is internal CKAN issue with hostname.
@jindrichmynarz this is related to caching mechanism of CKAN, hostname generated into the URL is taken from cache and cache is filled with value that was used to publish data. You can check the behaviour, go into the CKAN and add new resource using upload mechanism, you will see that also other resources has changed URL.
I tried to upload a resource to internal catalogue and I got HTTP 500 error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Where can I find CKAN logs to get to know more? Do I need to configure CKAN to allow uploading resources?
After this error I get Error 500 if I request the root of the internal catalogue (i.e. /internalcatalog/
).
@jindrichmynarz what means: I tried to upload a resource ? DId you use CKAN GUI or this DPU? @jan-marcek please comment where are log files.
I tried to upload a resource using the CKAN's GUI as you suggested above.
@jindrichmynarz you can find logs for internal catalog here:
less /var/log/apache2/odn-ckan-ic.error.log
less /var/log/apache2/odn-ckan-ic.access.log
In /var/log/apache2/odn-ckan-ic.error.log
I have found this error when I requested /internalcatalog
:
[Tue May 19 10:46:36 2015] [error] 2015-05-19 10:46:36,641 WARNI [repoze.who.plugins.cas.main_plugin] Retrieving credentials: validating against CAS
[Tue May 19 10:46:36 2015] [error] 2015-05-19 10:46:36,664 WARNI [repoze.who.plugins.cas.main_plugin] Validation response:
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
[Tue May 19 10:46:36 2015] [error] \t<cas:authenticationSuccess>
[Tue May 19 10:46:36 2015] [error] \t\t<cas:user>casadmin</cas:user>
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] \t\t
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] \t\t\t<cas:attributes>
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] \t
[Tue May 19 10:46:36 2015] [error] \t
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] <cas:SPR.Roles>Administrator</cas:SPR.Roles>
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] \t
[Tue May 19 10:46:36 2015] [error] \t
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] <cas:cn>CAS Administrator</cas:cn>
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error] \t
[Tue May 19 10:46:36 2015] [error] \t
[Tue May 19 10:46:36 2015] [error]
[Tue May 19 10:46:36 2015] [error]
However, I tried requesting /internalcatalog
again and it worked fine. Moreover, I tried uploading resources via the CKAN GUI and I can no longer reproduce the previously encountered error.
Could be caused by low memory.
This issue is planed for v1.0.2, so there is cherry pick from #5 pull request to branch hotfix/v1.0.2
.
Missing unification of configuration parameters, see 0b8351b632bd9102d64d97b7038e6ee3a704f5e7 old parameters are replaced by new parameters: dpu.uv-l-filesToCkan.secret.token -> org.opendatanode.CKAN.secret.token dpu.uv-l-filesToCkan.catalog.api.ur -> org.opendatanode.CKAN.api.url dpu.uv-l-filesToCkan.http.header.[key] -> org.opendatanode.CKAN.http.header.[key] What is expected: if new parameter present, it is used, otherwise old parameter is used if present.
fixed in b877561f474ce374183632a7b9eb9a966ad74ac1 and included in v1.0.2 release
Similarly to this issue, I'm not sure whether this is an issue of this DPU, or the CKAN glue code (e.g.,
http://localhost:9080/internalcatalog/api/action/internal_api
), or of ODN. Let me know if I should move the issue elsewhere.This DPU generates invalid CKAN resource URL using localhost instead of the server's domain name. For example, the generated URL is http://localhost:9080/internalcatalog/dataset/ca8686a5-b5d1-4fbd-bc5d-1445c0a5aac6/resource/f9bf4ace-f6f1-4d83-b081-7b9237410e21/download/snk.csv, while it should be http://jmynarz.odn.in.eea.sk:9080/internalcatalog/dataset/ca8686a5-b5d1-4fbd-bc5d-1445c0a5aac6/resource/f9bf4ace-f6f1-4d83-b081-7b9237410e21/download/snk.csv instead.
Context: I'm using ODN 1.0.1 installed from the odn-simple Debian package, which contains this DPU in version 1.0.1 (uv-l-filesToCkan-1.0.1.jar).