[GeoNode-users] "layers_uploadsession" does not exist

Christian Willmes christian.willmes at googlemail.com
Tue Jul 14 01:54:03 PDT 2015


Hi,

I have the following issues with geonode since the update and fixing the 
DB, as discussed in this thread.

1. The keyword handling is somehow messed up. GeoNode only shows one 
Keyword, there are at least10 different assigned to the various layers.

2. After a "geonode updatelayers", layers that were deleted through the 
frontend reappear in the GeoNode catalog.

3. On each request I get the following error in apache error.log:

[Tue Jul 14 03:03:06.744495 2015] [:error] [pid 23485:tid 
140415573407488] Internal Server Error: /api/keywords/17/
[Tue Jul 14 03:03:06.744523 2015] [:error] [pid 23485:tid 
140415573407488] Traceback (most recent call last):
[Tue Jul 14 03:03:06.744530 2015] [:error] [pid 23485:tid 
140415573407488]   File 
"/usr/lib/python2.7/dist-packages/tastypie/resources.py", line 217, in 
wrapper
[Tue Jul 14 03:03:06.744536 2015] [:error] [pid 23485:tid 
140415573407488]     response = callback(request, *args, **kwargs)
[...]
[Tue Jul 14 03:03:06.755778 2015] [:error] [pid 23485:tid 
140415573407488] KeyError: 'objects'
[Tue Jul 14 03:03:06.772377 2015] [:error] [pid 23485:tid 
140415573407488] [remote 134.95.19.174:59667] mod_wsgi (pid=23485): 
Exception occurred processing WSGI script 
'/var/www/geonode/wsgi/geonode.wsgi'.
[Tue Jul 14 03:03:06.772430 2015] [:error] [pid 23485:tid 
140415573407488] [remote 134.95.19.174:59667] Traceback (most recent 
call last):
[...]
[Tue Jul 14 03:03:06.773172 2015] [:error] [pid 23485:tid 
140415573407488] [remote 134.95.19.174:59667]   File 
"/usr/lib/python2.7/dist-packages/django/template/context.py", line 56, 
in __getitem__
[Tue Jul 14 03:03:06.773196 2015] [:error] [pid 23485:tid 
140415573407488] [remote 134.95.19.174:59667]     raise KeyError(key)
[Tue Jul 14 03:03:06.773219 2015] [:error] [pid 23485:tid 
140415573407488] [remote 134.95.19.174:59667] KeyError: 'request'

Is there anything I can do to rescue the instance, I really don't want 
to wipe and reinstall including styling the layers etc... :/

Thanks and regards,
Christian



Am 10.07.2015 um 11:17 schrieb Simone Dalmasso:
> hm clearly something went wrong with the restore then. I would suggest 
> you to try to reload back the db. Everything should be preserver and 
> especially geoserver should not have changed at all since you never 
> touched it's data folder.
>
> 2015-07-10 11:05 GMT+02:00 Christian Willmes 
> <christian.willmes at googlemail.com 
> <mailto:christian.willmes at googlemail.com>>:
>
>     Hi,
>     wow cool, thats an easy fix. I can edit the metadata again. I was
>     worried, the whole DB (user rights etc.) would be messed up.
>
>     The metadata not stored also in Geoserver, such as the keywords
>     and categories are missing. Also the spatial region is not there.
>     But the descriptions/abstracts and titles are still there.
>
>     regards,
>     Christian
>
>     Am 09.07.2015 um 18:11 schrieb Simone Dalmasso:
>>     Hi your error is:
>>     Permission denied: u'/var/www/geonode/uploaded/
>>     so a:
>>     $ sudo chmod -R a+w /var/www/geonode/uploaded
>>     should fix.
>>
>>     For the metadata and categories, they shouldn't be gone at all.
>>     Not sure what went wrong there.
>>
>>     2015-07-09 16:56 GMT+02:00 Christian Willmes
>>     <christian.willmes at googlemail.com
>>     <mailto:christian.willmes at googlemail.com>>:
>>
>>         Hi,
>>
>>         first it seemed to work fine, all layers are back and
>>         accessible, but I cant edit the metadata of existing layers
>>         vie the geonode webapp anymore.
>>         The frontend dies and gives an "Internal Server Error".
>>
>>         The apache error messages look like:
>>         [Thu Jul 09 09:50:53.648422 2015] [:error] [pid 2080:tid
>>         140415632357120] Internal Server Error:
>>         /layers/geonode:sealevels_10_150m/metadata
>>         [Thu Jul 09 09:50:53.648484 2015] [:error] [pid 2080:tid
>>         140415632357120] Traceback (most recent call last):
>>         [...]
>>         [Thu Jul 09 09:50:53.648652 2015] [:error] [pid 2080:tid
>>         140415632357120] IOError: [Errno 13] Permission denied:
>>         u'/var/www/geonode/uploaded/thumbs/layer-d680d189-b46f-468e-8267-e8e5b497988c-thumb.png'
>>         [Thu Jul 09 09:50:53.664269 2015] [:error] [pid 2080:tid
>>         140415632357120] [remote 134.95.150.136:14361
>>         <http://134.95.150.136:14361>] mod_wsgi (pid=2080): Exception
>>         occurred processing WSGI script
>>         '/var/www/geonode/wsgi/geonode.wsgi'.
>>         [...]
>>         [Thu Jul 09 09:50:53.665753 2015] [:error] [pid 2080:tid
>>         140415632357120] [remote 134.95.150.136:14361
>>         <http://134.95.150.136:14361>] File
>>         "/usr/lib/python2.7/dist-packages/django/template/context.py", line
>>         56, in __getitem__
>>         [Thu Jul 09 09:50:53.665849 2015] [:error] [pid 2080:tid
>>         140415632357120] [remote 134.95.150.136:14361
>>         <http://134.95.150.136:14361>] raise KeyError(key)
>>         [Thu Jul 09 09:50:53.665872 2015] [:error] [pid 2080:tid
>>         140415632357120] [remote 134.95.150.136:14361
>>         <http://134.95.150.136:14361>] KeyError: 'request'
>>
>>
>>         It is the same account name for the superuser.
>>
>>         Additionally all the Categories and Keywords are gone...
>>         (that's why I wanted to edit the metadata in the first place...)
>>
>>         Any hint on how I can fix this?
>>
>>         Thanks and regards,
>>         Christian
>>
>>
>>         Am 07.07.2015 um 15:49 schrieb Simone Dalmasso:
>>>         Christian, in your case the backup preserver the old schema.
>>>         Although since the difference in the new schema is a single
>>>         column being added, you can use the "geonode
>>>         syncdb --no-initial-data"  before loading back the backup.
>>>         The syncdb will create the new schema and the backup should
>>>         load leaving the new column blank. The --no-initial-data
>>>         will make sure that syncdb only creates the schema without
>>>         loading any fixture.
>>>
>>>         Hope this helps.
>>>
>>>         2015-07-07 14:48 GMT+02:00 Christian Willmes
>>>         <christian.willmes at googlemail.com
>>>         <mailto:christian.willmes at googlemail.com>>:
>>>
>>>             Hi,
>>>
>>>             following up on this thread:
>>>             https://github.com/GeoNode/geonode/issues/2046
>>>
>>>             I did the sugested steps, but the upload problem
>>>             persits. No wonder, because in which step should the
>>>             'layers_uploadsession' session be created?
>>>
>>>             The erreor inthe apache log looks like:
>>>             [Tue Jul 07 07:39:11.377817 2015] [:error] [pid
>>>             22673:tid 139958275774208] column "context" of relation
>>>             "layers_uploadsession" does not exist
>>>             [Tue Jul 07 07:39:11.377877 2015] [:error] [pid
>>>             22673:tid 139958275774208] LINE 1: ...e", "user_id",
>>>             "processed", "error", "traceback", "context")...
>>>             [Tue Jul 07 07:39:11.377884 2015] [:error] [pid
>>>             22673:tid 139958275774208] ^
>>>             [Tue Jul 07 07:39:11.377898 2015] [:error] [pid
>>>             22673:tid 139958275774208] Traceback (most recent call
>>>             last):
>>>             [Tue Jul 07 07:39:11.377904 2015] [:error] [pid
>>>             22673:tid 139958275774208]   File
>>>             "/usr/local/lib/python2.7/dist-packages/geonode/layers/views.py"
>>>             [....]
>>>
>>>
>>>             I did exactly the following (from
>>>             http://docs.geonode.org/en/master/tutorials/admin/backup/index.html):
>>>
>>>             sudo -u postgres -i pg_dump -c -Fc geonode >
>>>             geonodedb.backup
>>>
>>>
>>>             sudo service apache2 stop
>>>             sudo /etc/init.d/tomcat7 stop
>>>
>>>             sudo service postgresql start
>>>             sudo -u postgres -i "psql -c 'drop database geonode;'"
>>>             sudo -u postgres -i "psql -c 'create database geonode;'"
>>>             sudo -u postgres -s "pg_restore -Fc -d geonode
>>>             /path/to/geonodedb.backup"
>>>
>>>             sudo service apache2 start
>>>             sudo /etc/init.d/tomcat7 start
>>>
>>>             ----
>>>
>>>             How can I solve this problem?
>>>
>>>             Best regards,
>>>             Christian
>>>
>>>             _______________________________________________
>>>             geonode-users mailing list
>>>             geonode-users at lists.osgeo.org
>>>             <mailto:geonode-users at lists.osgeo.org>
>>>             http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>>>
>>>
>>>
>>>
>>>         -- 
>>>         Simone
>>
>>
>>
>>
>>     -- 
>>     Simone
>
>
>
>
> -- 
> Simone

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150714/84c8071d/attachment.html>


More information about the geonode-users mailing list