Hi everyone,
Following up on the docker setup, I'm now trying to run celery / rabbitmq properly
to allow the import / export of data. However even before getting there, pillowtop
worries me a little bit.
I'm running these services in their own containers :
- postgres
- couchdb
- redis
- elasticsearch
- rabbitmq
Following README.md, I then initialize the DB :
- create postgres DB
- create couchdb admin and DB
- manage.py syncdb
- manage.py migrate
- manage.py collectstatic
- manage.py bootstrap example example@example.com example
So far so good : running an HQ instance as that point is a success, at least for
creation application and managing users.
Still following the README.md, I then run ptop on its own container connected to
the databases :
$ docker run --rm --name run_ptop --link postgres:postgres --link
couchdb:couchdb --link redis:redis --link elasticsearch:elasticsearch --link
rabbitmq:rabbitmq -v pwd
:/usr/src/commcare-hq charlesfleche/commcare-hq
python manage.py run_ptop --all
A few weird things happen:
ResourceNotFound: missing
run_ptop.txt (23.9 KB)
···
=========================pillowtop seems to fail to get CouchDB documents, but these documents are not
always the same between runs :
First run (accessing these documents raise ResourceNotFound: missing in
"couchdbkit/resource.py", line 129, in request)
pillowtop_fluff.TDHInfantClassificationFluffPillow.870ceaecb4ba
pillowtop_corehq.pillows.reportcase.ReportCasePillow.8c10a7564b6af5052f8b8669
3bf6ac07.870ceaecb4ba
pillowtop_fluff.TDHChildClassificationFluffPillow.870ceaecb4ba
pillowtop_fluff.TauxDeRuptureFluffPillow.870ceaecb4ba
pillowtop_fluff.McctMonthlyAggregateFormFluffPillow.870ceaecb4ba
pillowtop_fluff.MalariaConsortiumFluffPillow.870ceaecb4ba
pillowtop_fluff.IntraHealthFluffPillow.870ceaecb4ba
pillowtop_fluff.TDHNewbornTreatmentFluffPillow.870ceaecb4ba
pillowtop_corehq.pillows.domain.DomainPillow.hqdomains_a3dbc2012ed3ba384bed
595735ef5100.870ceaecb4ba
pillowtop_corehq.apps.userreports.pillow.CustomDataSourcePillow.870ceaecb4ba
pillowtop_fluff.OPMHierarchyFluffPillow.870ceaecb4ba
pillowtop_fluff.CouvertureFluffPillow.870ceaecb4ba
pillowtop_corehq.pillows.application.AppPillow.fe975a5128b655ba175ac81b035498
d0.870ceaecb4ba
pillowtop_corehq.pillows.user.GroupToUserPillow.870ceaecb4ba
pillowtop_fluff.OpmHealthStatusAllInfoFluffPillow.870ceaecb4ba
pillowtop_corehq.pillows.user.UnknownUsersPillow.870ceaecb4ba
pillowtop_fluff.TDHNewbornClassificationFluffPillow.870ceaecb4ba
pillowtop_corehq.pillows.sofabed.CaseDataPillow.870ceaecb4ba
pillowtop_fluff.TDHEnrollChildFluffPillow.870ceaecb4ba
Second run (accessing these documents raise ResourceNotFound: missing in
"couchdbkit/resource.py", line 129, in request)
pillowtop_fluff.CareSAFluffPillow.59a34724a421
pillowtop_corehq.pillows.sofabed.FormDataPillow.59a34724a421
pillowtop_fluff.UnicefMalawiFluffPillow.59a34724a421
pillowtop_corehq.pillows.sms.SMSPillow.708c77f8e5fe00286fa5791e9fa7d45f.59a3
4724a421
pillowtop_fluff.OPMHierarchyFluffPillow.59a34724a421
pillowtop_corehq.pillows.reportxform.ReportXFormPillow.report_xforms_e26fad18
b95711e4a7bc3c970e7be43b.59a34724a421
pillowtop_corehq.pillows.user.GroupToUserPillow.59a34724a421
pillowtop_fluff.TDHChildClassificationFluffPillow.59a34724a421
pillowtop_fluff.AllHmisCaseFluffPillow.59a34724a421
pillowtop_fluff.TDHInfantClassificationFluffPillow.59a34724a421
pillowtop_corehq.pillows.application.AppPillow.fe975a5128b655ba175ac81b035498
d0.59a34724a421
pillowtop_fluff.VhndAvailabilityFluffPillow.59a34724a421
pillowtop_fluff.FarmerRecordFluffPillow.59a34724a421
pillowtop_fluff.TDHEnrollChildFluffPillow.59a34724a421
pillowtop_fluff.RecouvrementFluffPillow.59a34724a421
pillowtop_corehq.pillows.log.PhoneLogPillow.59a34724a421
ERROR 404
Consistently, a process fails and raise an error 404 accessing
http://commcarehq:commcarehq@couchdb:5984/commcarehq
Process Process-55:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "submodules/pillowtop-src/pillowtop/listener.py", line 172, in run
self.new_changes()
File "submodules/pillowtop-src/pillowtop/listener.py", line 152, in new_changes
since=self.since,
File "submodules/pillowtop-src/pillowtop/listener.py", line 235, in since
checkpoint = self.get_checkpoint()
File "/usr/src/commcare-hq/corehq/pillows/cacheinvalidate.py", line 37, in
get_checkpoint
current_db_seq = self.couch_db.info()['update_seq']
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/client.py", line 280, in info
return self.res.get().json_body
File "/usr/local/lib/python2.7/dist-packages/restkit/resource.py", line 114, in get
params_dict=params_dict, **params)
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/resource.py", line 129, in
request
response=e.response)
ResourceNotFound: {'msg': '', 'status_int': 404, 'response':
<couchdbkit.resource.CouchDBResponse object at 0x77736d0>}
This is weird as running 'curl
http://commcarehq:commcarehq@couchdb:5984/commcarehq' in the same
container succeed.
FILE ALREADY EXISTS
Another consistently raised Exception is 'PreconditionFailed: The database could
not be created, the file already exists.'
Process Process-51:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()