[GeoNode-users] "layers_uploadsession" does not exist

Christian Willmes christian.willmes at googlemail.com
Fri Jul 10 04:09:54 PDT 2015


Hi,
yes, I can confirm, that geoserver did not change, only the keywords and 
categorys werent preserved. I had some warning messages during the 
pg_restore of the data base, unfortunately I did not save them...
This were the steps i did:

sudo  service  postgresql  start
sudo  -u  postgres  -i  "psql  -c  'drop database geonode;'"
sudo  -u  postgres  -i  "psql  -c  'create database geonode;'"
geonode  syncdb  --no-initial-data
sudo  -u  postgres  -s  "pg_restore  -Fc  -d  geonode  /media/data/backup/geonode20150709/geonodedb.backup"


  now I manually edited the metadata to have the keywords and categories 
back...

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/20150710/cff30e25/attachment.html>


More information about the geonode-users mailing list