You can get them running
These information can help me in reproducing your bug and to have a clear overview of your setup.
Hi Daniele,
We’re having some problems with OpenQuake not picking up the PostGIS version. We tried your suggestion of
1) test your Postgis setup
sudo -u postgres psql -d openquake2 -c "SELECT postgis_lib_version();"
2) force the PostGIS version in Django
echo "POSTGIS_VERSION = (2, 0, 3)" >> /path/to/oq-engine/openquake/engine/local_settings.py
/path/to/oq-engine/ should be the path of the oq-engine sources (it looks like you are not using packages) and (2,0,3) must be replaces with your PostGIS version.
Our PostGIS version is 2.1.3, so it should be sufficient, but we are still having some issues. How do we ensure that local_settings.py is picked up? I’d downloaded the sources as a zip and tried working through the installation instructions for Red Hat 7/CentOS 7 to come up with something I could install in /usr/local and have everyone use. This may not be the most optimal approach.
Our PostGIS version is 2.1.3, so it should be sufficient, but we are still having some issues. How do we ensure that local_settings.py is picked up?
Hi Daniele,
Stephen is away at the moment, so I provide some of the answers as below.
Thanks.
Regards,
Hyeuk
From: Daniele Viganò [mailto:daniele...@globalquakemodel.org]
Sent: Wednesday, 30 September 2015 3:57 PM
To: Hocking Stephen
Cc: Ryu Hyeuk; openqua...@googlegroups.com
Subject: Re: Issues detecting PostGIS version in openquake [SEC=UNOFFICIAL]
Dear Stephen,
thanks for your feedback and sorry for the late response, yesterday I was off.
I still need some information to help you with this issue:
- Which OS are you running? I suppose RHEL 7
[u65242@rhe-compute1:/usr/share/openquake/engine]$uname -a
Linux rhe-compute1.ga.gov.au 3.10.0-229.11.1.el7.x86_64 #1 SMP Wed Jul 22 12:06:11 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[u65242@rhe-compute1:/usr/share/openquake/engine]$cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
- How did you installed all the dependencies? Yum? Have been manually compiled?
- How did you installed the oq-engine and its libraries? RPM from yum/copr (we have experimental RPMs for RHEL 7 and its clones starting from OQ Engine 1.5.0) or manually using git/zip files?
- Which version of these dependencies are you running?
- Django
- Postgres (It should be 9.3)
- Postgis (it looks 2.1.3)
You can get them running
- yum list installed | grep -Ei "django|postgres|postgis"
[u65242@rhe-compute1:/usr/share/openquake/engine]$yum list installed | grep -Ei "django|postgres|postgis"
*Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories.
postgis.x86_64 2.1.3-5.el7.centos @openquake-rhel7
postgresql.x86_64 9.2.13-1.el7_1 @rhel-x86_64-server-7
postgresql-devel.x86_64 9.2.13-1.el7_1 @rhel-x86_64-server-7
postgresql-libs.x86_64 9.2.13-1.el7_1 @rhel-x86_64-server-7
postgresql-server.x86_64 9.2.13-1.el7_1 @rhel-x86_64-server-7
python-django.noarch 1.6.11-1.el7 @epel7_channel
python-django-bash-completion.noarch
- pip freeze | grep -i "django" (in case Django has been installed/upgraded using pip)
[u65242@rhe-compute1:/usr/share/openquake/engine]$pip freeze | grep -i "django"
Django==1.6.11
Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
-------------------------------------------------------------------------------------------------------------------------
Dear all,
I was unable to reproduce the error in our test environment (it's a systemd-nspawn/machinectl container, we can pass it to you if your IT wants to have a look), but I have some ideas:
1) let's see if python is picking the right settings.py. What's the output of this command?
python -c "from openquake.engine import settings; print settings.__file__"
it should returns /usr/lib/python2.7/site-packages/openquake/engine/settings.pyc if the packages have been used, or /path/to/oq-engine/openquake/engine/settings.pyc if the sources are used. Make sure you have added POSTGIS_VERSION = (2, 1, 3) in the settings.py printed by that command (and please remove other installations, if present, to avoid conflicts).
[u65242@rhe-compute1:~]$python -c "from openquake.engine import settings; print settings.__file__"/usr/lib/python2.7/site-packages/openquake/engine/settings.pyc
When I checked the /usr/lib/python2.7/site-packages/openquake/engine/settings.py there is no POSTGIS_VERSION. As I don't have admin access, I am not able to add it to the file. Is there any way for each user to maintain its own db?