Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1150 closed defect (fixed)

Installation of GeoNode provides 404 error

Reported by: kalxas Owned by: ingenieroariel
Priority: major Milestone: OSGeoLive7.0
Component: OSGeoLive Keywords: pypi, python, geonode
Cc: live-demo@…

Description

As can be seen here: ` Processing triggers for libc-bin ... ldconfig deferred processing now taking place Downloading/unpacking geonode==2.0b10 Running setup.py egg_info for package geonode Downloading/unpacking PIL (from geonode==2.0b10) Could not find any downloads that satisfy the requirement PIL (from geonode==2.0b10) No distributions at all found for PIL (from geonode==2.0b10) ` PIL was not available for the last builds due to Pypi transition: http://www.python.org/dev/peps/pep-0438/

Change history (23)

comment:1 Changed 6 years ago by kalxas

More readable:

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Downloading/unpacking geonode==2.0b10
Running setup.py egg_info for package geonode
Downloading/unpacking PIL (from geonode==2.0b10)
Could not find any downloads that satisfy the requirement PIL (from geonode==2.0b10)
No distributions at all found for PIL (from geonode==2.0b10)

comment:2 Changed 6 years ago by hamish

Keywords: python geonode added

general notice:

please do not use eggs, easy_install, or similar for installing common software on the live disc.

They are really useful and nice and work well locally, but are not very compatible with a centralized package management system. Try to generate a .deb instead. it's easy. it's really easy. If you must install using one of these tools, make sure you install it to /usr/local/ so we have some chance of figuring out what the heck is going later on when softwares compete with "last to install their version wins". dpkg is there for us to use, and it's the best way to avoid the inevitable conflicts.

howto:

http://lists.osgeo.org/pipermail/live-demo/2013-May/007451.html

In this case PIL is available from a standard ubuntu package, and that package is installed and used by other software on the disc. If $your installer clobbers a system package with a custom install, and that's causing problems for an innocent 3rd party, it's going to be $your installer, not theirs, which gets disabled without prior notice* when problems arise, especially as we get closer to final releases. (* consider this due notice) If you think $you need another version of some package, please rename it or sort it out so that you don't, it will save us a world of trouble later on.

If it's just pulling in $your project and $your modules alone, and doesn't insist on installing then removing many system -dev packages, then it probably isn't going to be a problem. But if it starts pulling in other common-dependencies it very quickly becomes a problem, and the beauty of the .deb system is that it automatically detects that for us before it becomes a run-time bug, saving us huge amounts of time and energy as we try to get the final image out the door.

thanks, Hamish (been burned way too many times by this sort of thing already)

comment:3 Changed 6 years ago by ingenieroariel

Owner: changed from live-demo@… to ingenieroariel
Status: newassigned

Hamish,

Thanks for the recommendation. PIL is not supposed to be downloaded if python-imaging is already installe, same goes for python-owslib, and other dependencies.

Something was seriously wrong with PyPi? in the past days as they were busy with a transition to (ironically) improve reliability.

As discussed with kalxas, I will start the packaging work to create a .deb and do not depend on PyPi? anymore.

Best, Ariel.

comment:4 Changed 6 years ago by hamish

Cc: live-demo@… added

Hi,

just to be clear about it- that wasn't specifically directed at geonode, just a general comment for everyone pulling from external pypi, cran, ppa, ..., et al external code repositories. let's hope the pypi improvements help clean up these troubles. :)

thanks, Hamish

comment:5 Changed 6 years ago by kalxas

Hi all,

I agree that deb packaging (even better Launchpad based) is preferred to othen installation tools (pypi, maven, plain tar/zip files etc). This applies to *ALL* projects.

Regarding the Pypi problem, it is now solved and GeoNode? installation completes fine.

We should either rename the ticket, or close it after we confirm that GeoNode? works fine...

comment:6 Changed 6 years ago by kalxas

Summary: Problems with Pypi prevent installation of GeoNodeInstallation of GeoNode provides 404 error

Actually in build 10279 GeoNode? is installed but localhost/geonode provides a 404 error.

comment:7 Changed 6 years ago by kalxas

Excellent job Ariel! https://launchpad.net/~ingenieroariel/+archive/unstable

I see django 1.5.1 there too :)

comment:8 Changed 6 years ago by ingenieroariel

(In [10345]) Fixed path locations in install_geonode.sh, refs #1150

comment:9 Changed 6 years ago by ingenieroariel

(In [10349]) Switched GeoNodes? PPA, refs #1150

comment:10 Changed 6 years ago by kalxas

It seems that after the switch to ppa, the desktop files are missing (tested build 10357)

comment:11 Changed 6 years ago by kalxas

Thanks Ariel for the effort!

Switch to ppa completed fine. We now use the django 1.5.1 package too from geonode ppa. I checked build 10382 and 404 error is still there. I feel that we miss something minor...

comment:12 Changed 6 years ago by ingenieroariel

(In [10390]) Fix for missing ServerName?, refs #1150

comment:13 Changed 6 years ago by kalxas

still a 404 in build 10391

comment:14 Changed 6 years ago by ingenieroariel

Changes to /etc/hosts during install_geonode.sh are not reflected in final installation.

Running the following command on build 10391 fixes the 404:

sudo echo "127.0.0.1 geonode" >> /etc/hosts

comment:15 Changed 6 years ago by ingenieroariel

(In [10401]) Different method to create /etc/hosts entry, refs #1150

comment:16 Changed 6 years ago by kalxas

ok, I will build another one and if it does not work, then we can add the above line on the startup script, as done for mysql + ushahidi.

comment:17 Changed 6 years ago by ingenieroariel

To clarify, the line I ended up using was:

echo '127.0.0.1 geonode' | sudo tee -a /etc/hosts

comment:18 Changed 6 years ago by hamish

for my 2c, I'm glad to learn how to get apache to do that, but am not convinced that projects adding DNS hacks to use the http://projectname/ namespace is a very good idea in general.

One specific example for that is what if my local domain's WMS server is called e.g. http://mapserver.my_university.edu and our users usually just call it by http://mapserver? (e.g. http://mapserver.flightgear.org)

regards, Hamish

comment:19 Changed 6 years ago by kalxas

Confirmed to work on build 10408 with the above line inserted from terminal. So this is really close now. Ariel, any reason not to follow the same setup as eoxserver to point to http://localhost/geonode ?

Best, Angelos

comment:20 in reply to:  19 Changed 6 years ago by wildintellect

Replying to kalxas:

Ariel, any reason not to follow the same setup as eoxserver to point to http://localhost/geonode ?

Geonode often misbehaves if it's not the root url, there are few unsolved mysteries as to why it doesn't like being a suburl. I've tried and failed in the past to get such a config to work.

comment:21 Changed 6 years ago by kalxas

Thanks Alex,

So lets make it work as a root path. I think that /etc/hosts is overwriten during live session and perhaps this is why install_geonode.sh has no effect to it.

Perhaps we should use the same trick as in Ushahidi (install_mysql.sh line 140)

comment:22 Changed 6 years ago by kalxas

Resolution: fixed
Status: assignedclosed

Fixed in [10453] and confirmed to work in nightly build.

comment:23 Changed 6 years ago by hamish

just to note that I plan to replace the init.d fix with a simpler rc.local fix.

Note: See TracTickets for help on using tickets.