Closed Analect closed 1 year ago
I think part of the problem might relate to the set-up not being able to resolve ckan.localdomain
This is /etc/hosts on ckandocker_ckan_1
This is an example CSV file ... where clicking on this link fails to resolve ... if I manually replace ckan.localdomain with either 172.17.0.15 or localhost .. it resolves
This probably explains why the datapusher isn't working and why the data isn't getting push to the datastore.
Any thoughts on how I might resolve? Thanks
Re-db initialisation, yes it is done for you at runtime.
The domain ckan.localdomain is nothing more than a simple example. If you use it, the host must know how to resolve this. I suspect your network config is causing the issue. Can you give me details on the context? OS, network, proxy, vpn, dns ...
You should not recreate containers every time, I tend to use fig up -d
the first time then fig up --no-recreate
to just restart them in order.
I'm jumping in a plain and will get back to you later today
I believe that the problem is that the datapusher container is not linked to the ckan container so the ckan container address can't be resolved from the datapusher container. This is /etc/host
file of the datapusher container:
172.17.0.144 datapusher.localdomain datapusher
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
I tried to ping ckan.localdomain
from the datapusher container and the ping command gives me a unknown host error.
Yup, I'm getting the same error. Once I manually edit /etc/hosts in the datapusher container it works. Not sure what can be done, since adding a link to the ckan container to the datapusher part in docker-compose.yml results in a circular reference.
Depending on your network configuration you may have to change the ckan.localdomain
hostname to something more suitable, that can be resolved. As you said we can't link it to the datapusher.
@clementmouchet Docker has announced a new feature to create virtual networks for containers. It could be a possible solution. Check it out: http://blog.docker.com/2015/06/networking-receives-an-upgrade/
This is partly related to #16 ... as part of trouble-shooting to get CKAN functioning under this ckan-docker set. Unlike in #16 this is with a blank set-up, as spun up by 'docker-compose up' ... I haven't dropped / recreated databases and haven't restored any existing ckan or datastore databases.
My config details are below. In addition, I've added a bunch of ckanext in the _src/ directory, as per below. Am I right in thinking that the set up of these extensions is handled for me ... or do I have to do the various paster db init etc... for each of these ... such as harvest and spatial?
-rwxrwxr-x 1 user_me user_me 350 Mar 29 10:13 README.md drwxrwxr-x 10 user_me user_me 4096 Mar 29 12:38 ckan drwxrwxr-x 6 user_me user_me 4096 Mar 29 12:38 ckanext-geojsonview drwxrwxr-x 5 user_me user_me 4096 Mar 29 12:38 ckanext-geoview drwxrwxr-x 6 user_me user_me 4096 Mar 29 12:38 ckanext-harvest drwxrwxr-x 6 user_me user_me 4096 Mar 29 12:38 ckanext-pdfview drwxrwxr-x 7 user_me user_me 4096 Mar 29 12:38 ckanext-spatial
config ckan.ini: https://gist.github.com/Analect/471654e6df10915b3318 apache error logs: https://gist.github.com/Analect/27e83e5e5be7200efdc6 error from datapusher: https://gist.github.com/Analect/ebcc6706012637fc1da0
Unlike in #16 with the AWS instance, I am able to run this test upload (https://github.com/ckan/example-add-dataset) without an issue once I change the IP in the url in the *.py file. However, eventhough I have all the relevant view types installed, the 'paster views create' script doesn't appear to work very effectively, for whatever reason.
Problems:
While the ckan.ini appears to have the right permissioning, but perhaps the others do not. The link above says: " The Apache web server needs to have permission to access your WSGI script file and all of its parent directories. The permissions of the file should look like -rw-r--r-- and the permissions of each of its parent directories should look like drwxr-xr-x." Should this permissioning of relevant files/folders ideally be handled by the dockerfiles?
Aborting. Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/code/build/docker-compose/out00-PYZ.pyz/threading", line 552, in __bootstrap_inner File "/code/build/docker-compose/out00-PYZ.pyz/threading", line 505, in run File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.multiplexer", line 41, in _enqueue_output File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.log_printer", line 62, in _make_log_generator File "/code/build/docker-compose/out00-PYZ.pyz/compose.container", line 139, in wait File "/code/build/docker-compose/out00-PYZ.pyz/docker.client", line 999, in wait File "/code/build/docker-compose/out00-PYZ.pyz/docker.client", line 78, in _post File "/code/build/docker-compose/out00-PYZ.pyz/requests.sessions", line 425, in post File "/code/build/docker-compose/out00-PYZ.pyz/requests.sessions", line 383, in request File "/code/build/docker-compose/out00-PYZ.pyz/requests.sessions", line 486, in send File "/code/build/docker-compose/out00-PYZ.pyz/requests.adapters", line 374, in send <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'