GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.46k stars 1.13k forks source link

Problem during installation with "pavement.updategeoip" in "./paver_local.sh setup" #10219

Open AlRaCh opened 2 years ago

AlRaCh commented 2 years ago

Expected behavior

I'm installing geonode with the Advanced Core documentation for ubuntu-22-04-1lts. In the "Update settings to use PostgreSQL database" section, there is the code block below:

workon geonode
cd /I should expect nearly 260,000KB./geonode
chmod +x *.sh
./paver_local.sh reset
./paver_local.sh setup

The ./paver_local.sh setup line of code should download some files and install accordingly. It is expected that the code lines bellow should download nearly 260,000KB :

---> pavement.updategeoip
 python -W ignore manage.py updategeoip -o,

Actual behavior and steps to reproduce the problem

With "./paver_local.sh reset", I had to manually kill the Java process/service. With "./paver_local.sh setup", errors occur. It seems that "python -W ignore manage.py updategeoip -o" downloads a ridiculous 1 KB file... It indicate that it can't open the tar.

Is it broken Partial download in the cache ?!?

(geonode) geonoder@geonoder-VirtualBox:/opt/geonode$ ./paver_local.sh setup
---> pavement.setup
---> pavement.setup_geoserver
/home/geonoder/.virtualenvs/geonode/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'artifacts.geonode.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
168422KB [00:05, 30899.99KB/s]
/home/geonoder/.virtualenvs/geonode/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'repo1.maven.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
8880KB [00:02, 3893.50KB/s]
/home/geonoder/.virtualenvs/geonode/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'artifacts.geonode.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
153KB [00:00, 519.22KB/s]
---> pavement.updategeoip
python -W ignore manage.py updategeoip -o
1KB [00:00, 2053.01KB/s]
Cannot process <_io.BufferedReader name='output.bin'>: file could not be opened successfully:

    method gz: ReadError('not a gzip file')
    method bz2: ReadError('not a bzip2 file')
    method xz: ReadError('not an lzma file')
    method tar: ReadError('truncated header')
    Traceback (most recent call last):
    File "/opt/geonode/geonode/monitoring/management/commands/updategeoip.py", line 87, in handle_new_format
    with tarfile.open(fileobj=f) as zfile:
    File "/usr/lib/python3.10/tarfile.py", line 1639, in open
    raise ReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
    tarfile.ReadError: file could not be opened successfully:
    method gz: ReadError('not a gzip file')
    method bz2: ReadError('not a bzip2 file')
    method xz: ReadError('not an lzma file')
    method tar: ReadError('truncated header')
    GeoNode development environment successfully set up.If you have not set up an administrative account, please do so now. Use "paver start" to start up the server.

(geonode) geonoder@geonoder-VirtualBox:/opt/geonode$

Specifications

davekennewell commented 2 years ago

I took a quick look at this and it seems the master branch is dependent on this file: https://github.com/GeoNode/geonode/blob/master/geonode/monitoring/management/commands/updategeoip.py#L30 which is now returning a 404.

@afabiani - is it possible for Geosolutions to either restore the file or change this link to a community based version?

afabiani commented 2 years ago

@davekennewell can you please try with this free version?

https://cdn.jsdelivr.net/npm/geolite2-city@1.0.0/GeoLite2-City.mmdb.gz