librelist archives

« back to archive

Getting geonode to refresh data

Getting geonode to refresh data

From:
Joanne Cook
Date:
2010-12-21 @ 12:53
Dear All,

I am trying to get geonode to work with a pre-populated geoserver data_dir
(on the same pc as geonode), but I'm struggling to get the new data to 
show up. When I check in geoserver it shows the data, but geonode does 
not. I have tried various djangoadmin commands, such as updatelayers, and 
syncdb, I also tried flush and loaddata but none of them helped- none of 
them returned what looked like a related error either. Could someone 
explain how I get the new layers to show up?

Many thanks

Jo

-- 
-----------------------------------------------------
Joanne Cook
Senior IT Support and Development
Oxford Archaeology (North)
01524 880212
http://thehumanjourney.net


------
Files attached to this email may be in ISO 26300 format (OASIS Open 
Document Format). If you have difficulty opening them, please visit 
http://iso26300.info for more information.

Re: [geonode] Getting geonode to refresh data

From:
David Winslow
Date:
2010-12-21 @ 14:48
The 'django-admin.py updatelayers' command is intended to do exactly
what you are trying to do.  Could you provide us with a copy of the
output when you run it?  GeoServer and the Django app must both be
running when you do so.

--
David Winslow
OpenGeo - http://opengeo.org/

On Tuesday, December 21, 2010, Joanne Cook <j.cook@oxfordarch.co.uk> wrote:
> Dear All,
>
> I am trying to get geonode to work with a pre-populated geoserver 
data_dir (on the same pc as geonode), but I'm struggling to get the new 
data to show up. When I check in geoserver it shows the data, but geonode 
does not. I have tried various djangoadmin commands, such as updatelayers,
and syncdb, I also tried flush and loaddata but none of them helped- none 
of them returned what looked like a related error either. Could someone 
explain how I get the new layers to show up?
>
> Many thanks
>
> Jo
>
> --
> -----------------------------------------------------
> Joanne Cook
> Senior IT Support and Development
> Oxford Archaeology (North)
> 01524 880212
> http://thehumanjourney.net
>
>
> ------
> Files attached to this email may be in ISO 26300 format (OASIS Open 
Document Format). If you have difficulty opening them, please visit 
http://iso26300.info for more information.
>
>

Re: [geonode] Getting geonode to refresh data

From:
Joanne Cook
Date:
2011-01-04 @ 10:14
Hi David,

Sorry for the delay in getting back to you- Christmas got in the way!

When you say that geoserver and the django app must both be running- I am 
following the instructions from here: 
http://docs.geonode.org/1.0-RC3/deploy/ubuntu.html

So I'm assuming that if the django-admin.py command worked initially, then
it must be still running? Sorry if I've missed something obvious. Anyhow, 
here's the output that I get when running the update layers command:


jcook@jcook-dev:/var/www/geonode/wsgi/geonode/bin$ ./django-admin.py 
updatelayers --settings=geonode.settings

/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/registration/models.py:4:
DeprecationWarning: the sha module is deprecated; use the hashlib module 
instead
  import sha
Traceback (most recent call last):
  File "./django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py",
line 429, in execute_from_command_line
    utility.execute()
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py",
line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py",
line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py",
line 218, in execute
    output = self.handle(*args, **options)
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/management/commands/updatelayers.py",
line 11, in handle
    Layer.objects.slurp()
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py", line
597, in slurp
    layer.save()
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/db/models/base.py",
line 435, in save
    self.save_base(using=using, force_insert=force_insert, 
force_update=force_update)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/db/models/base.py",
line 543, in save_base
    created=(not record_exists), raw=raw)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/dispatch/dispatcher.py",
line 162, in send
    response = receiver(signal=self, sender=sender, **named)
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py", line
1557, in post_save_layer
    instance.save_to_geonetwork()
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py", line
877, in save_to_geonetwork
    md_link = gn.create_from_layer(self)
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/geonetwork.py", line 
83, in create_from_layer
    response = self.csw_request(layer, "maps/csw/transaction_insert.xml")
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/geonetwork.py", line 
71, in csw_request
    md_doc = tpl.render(ctx)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 173, in render
    return self._render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 167, in _render
    return self.nodelist.render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 796, in render
    bits.append(self.render_node(node, context))
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 809, in render_node
    return node.render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/loader_tags.py",
line 139, in render
    return self.template.render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 173, in render
    return self._render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 167, in _render
    return self.nodelist.render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 796, in render
    bits.append(self.render_node(node, context))
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 809, in render_node
    return node.render(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/defaulttags.py",
line 131, in render
    values = self.sequence.resolve(context, True)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 553, in resolve
    obj = self.var.resolve(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 696, in resolve
    value = self._resolve_lookup(context)
  File 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
line 731, in _resolve_lookup
    current = current()
  File 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py", line
674, in download_links
    dataAspect = dx / dy
ZeroDivisionError: float division

Thanks

Jo
----- Original Message -----
From: "David Winslow" <dwinslow@opengeo.org>
To: geonode@librelist.com
Sent: Tuesday, 21 December, 2010 2:48:29 PM
Subject: Re: [geonode] Getting geonode to refresh data

The 'django-admin.py updatelayers' command is intended to do exactly
what you are trying to do. Could you provide us with a copy of the
output when you run it? GeoServer and the Django app must both be
running when you do so.

-- David Winslow
OpenGeo - http://opengeo.org/

On Tuesday, December 21, 2010, Joanne Cook <j.cook@oxfordarch.co.uk>
wrote:
> Dear All,
>
> I am trying to get geonode to work with a pre-populated geoserver
> data_dir (on the same pc as geonode), but I'm struggling to get the
> new data to show up. When I check in geoserver it shows the data, but
> geonode does not. I have tried various djangoadmin commands, such as
> updatelayers, and syncdb, I also tried flush and loaddata but none of
> them helped- none of them returned what looked like a related error
> either. Could someone explain how I get the new layers to show up?
>
> Many thanks
>
> Jo
>
> --
> ----------------------------------------------------- Joanne Cook
> Senior IT Support and Development
> Oxford Archaeology (North)
> 01524 880212
> http://thehumanjourney.net
>
>
> ------ Files attached to this email may be in ISO 26300 format (OASIS
> Open Document Format). If you have difficulty opening them, please
> visit http://iso26300.info for more information.
>
>

-- 
-----------------------------------------------------
Joanne Cook
Senior IT Support and Development
Oxford Archaeology (North)
01524 880212
http://thehumanjourney.net


------
Files attached to this email may be in ISO 26300 format (OASIS Open 
Document Format). If you have difficulty opening them, please visit 
http://iso26300.info for more information.

Re: [geonode] Getting geonode to refresh data

From:
David Winslow
Date:
2011-01-04 @ 15:18
On Tue, Jan 4, 2011 at 5:14 AM, Joanne Cook <j.cook@oxfordarch.co.uk> wrote:

> Hi David,
>
> Sorry for the delay in getting back to you- Christmas got in the way!
>
> When you say that geoserver and the django app must both be running- I am
> following the instructions from here:
> http://docs.geonode.org/1.0-RC3/deploy/ubuntu.html
>
> So I'm assuming that if the django-admin.py command worked initially, then
> it must be still running?


Not all django-admin operations require the Django application to be
running, but the updatelayers task does.  When I am not sure whether
everything is running properly I use the netstat command to see what servers
are listening for connections.  Here's a (truncated) sample from the demo
server:

root@demo:~# netstat -tlnp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State
>     PID/Program name

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
>    2466/apache2

tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN
>    2365/java

tcp6       0      0 :::8009                 :::*                    LISTEN
>    2365/java

tcp6       0      0 :::8080                 :::*                    LISTEN
>    2365/java


:80 is the default HTTP port for apache/httpd, 8080 is the default one for
Tomcat.  The other numbers in this output don't really matter for this quick
test.


> Sorry if I've missed something obvious. Anyhow, here's the output that I
> get when running the update layers command:
>

Ok, it looks like your GeoServer configuration has something odd about it
that we don't check for; I am guessing that you have a raster layer whose
extent is not properly detected since there is a divide-by-zero error in
some code that calculates an appropriate preview size.  Perhaps you could
skim through your GeoServer configuration and try to manually identify the
coverage with the problem?  If you aren't able to do that, let me know and I
can whip up a script based on gsconfig.py to identify the problem layer.

--
David Winslow
OpenGeo - http://opengeo.org/

jcook@jcook-dev:/var/www/geonode/wsgi/geonode/bin$ ./django-admin.py
> updatelayers --settings=geonode.settings
> 
/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/registration/models.py:4:
> DeprecationWarning: the sha module is deprecated; use the hashlib module
> instead
>  import sha
> Traceback (most recent call last):
>  File "./django-admin.py", line 5, in <module>
>    management.execute_from_command_line()
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py",
> line 429, in execute_from_command_line
>    utility.execute()
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py",
> line 379, in execute
>    self.fetch_command(subcommand).run_from_argv(self.argv)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py",
> line 191, in run_from_argv
>    self.execute(*args, **options.__dict__)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py",
> line 218, in execute
>    output = self.handle(*args, **options)
>  File
> 
"/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/management/commands/updatelayers.py",
> line 11, in handle
>    Layer.objects.slurp()
>  File "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py",
> line 597, in slurp
>    layer.save()
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/db/models/base.py",
> line 435, in save
>    self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/db/models/base.py",
> line 543, in save_base
>    created=(not record_exists), raw=raw)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/dispatch/dispatcher.py",
> line 162, in send
>    response = receiver(signal=self, sender=sender, **named)
>  File "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py",
> line 1557, in post_save_layer
>    instance.save_to_geonetwork()
>  File "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py",
> line 877, in save_to_geonetwork
>    md_link = gn.create_from_layer(self)
>  File "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/geonetwork.py",
> line 83, in create_from_layer
>    response = self.csw_request(layer, "maps/csw/transaction_insert.xml")
>  File "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/geonetwork.py",
> line 71, in csw_request
>    md_doc = tpl.render(ctx)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 173, in render
>    return self._render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 167, in _render
>    return self.nodelist.render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 796, in render
>    bits.append(self.render_node(node, context))
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 809, in render_node
>    return node.render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/loader_tags.py",
> line 139, in render
>    return self.template.render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 173, in render
>    return self._render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 167, in _render
>    return self.nodelist.render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 796, in render
>    bits.append(self.render_node(node, context))
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 809, in render_node
>    return node.render(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/defaulttags.py",
> line 131, in render
>    values = self.sequence.resolve(context, True)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 553, in resolve
>    obj = self.var.resolve(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 696, in resolve
>    value = self._resolve_lookup(context)
>  File
> 
"/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/template/__init__.py",
> line 731, in _resolve_lookup
>    current = current()
>  File "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/models.py",
> line 674, in download_links
>    dataAspect = dx / dy
> ZeroDivisionError: float division
>
> Thanks
>
> Jo
> ----- Original Message -----
> From: "David Winslow" <dwinslow@opengeo.org>
> To: geonode@librelist.com
> Sent: Tuesday, 21 December, 2010 2:48:29 PM
> Subject: Re: [geonode] Getting geonode to refresh data
>
> The 'django-admin.py updatelayers' command is intended to do exactly
> what you are trying to do. Could you provide us with a copy of the
> output when you run it? GeoServer and the Django app must both be
> running when you do so.
>
> -- David Winslow
> OpenGeo - http://opengeo.org/
>
> On Tuesday, December 21, 2010, Joanne Cook <j.cook@oxfordarch.co.uk>
> wrote:
> > Dear All,
> >
> > I am trying to get geonode to work with a pre-populated geoserver
> > data_dir (on the same pc as geonode), but I'm struggling to get the
> > new data to show up. When I check in geoserver it shows the data, but
> > geonode does not. I have tried various djangoadmin commands, such as
> > updatelayers, and syncdb, I also tried flush and loaddata but none of
> > them helped- none of them returned what looked like a related error
> > either. Could someone explain how I get the new layers to show up?
> >
> > Many thanks
> >
> > Jo
> >
> > --
> > ----------------------------------------------------- Joanne Cook
> > Senior IT Support and Development
> > Oxford Archaeology (North)
> > 01524 880212
> > http://thehumanjourney.net
> >
> >
> > ------ Files attached to this email may be in ISO 26300 format (OASIS
> > Open Document Format). If you have difficulty opening them, please
> > visit http://iso26300.info for more information.
> >
> >
>
> --
> -----------------------------------------------------
> Joanne Cook
> Senior IT Support and Development
> Oxford Archaeology (North)
> 01524 880212
> http://thehumanjourney.net
>
>
> ------
> Files attached to this email may be in ISO 26300 format (OASIS Open
> Document Format). If you have difficulty opening them, please visit
> http://iso26300.info for more information.
>
>