[Geoserver-users] GeoServer 2.3.0 & PostGis tables connection

Hi,

I have a problem while migrating from GeoServer 2.2.2 to 2.3.0. In my old version of GS, I had PostGis datasource : I could see these sources within the folder .../geoserver/data_dir/workspaces/myworkspaceName
each data source (ie each database) has its own folder, and in the folder : datastore.wml + folder for each published layer. That's ok.

Now, for migrating to 2.3.0 I copied my whole data_dir, minus security folder, to new server. All my layers are here, nice, EXCEPT the PostGis tables.... strange!
So I tried creating a new datasource from PostGis, as usual. Except this time, I don't have any folder for this datastore. It seems that the way PostGis tables and layers are stored has changed in 2.3.0.

Could you tell me how to deal with this problem, to have all my PostGis layers back on GS 2.3.0 : should I start from scratch with these layers publication? How are they configured in the GS folders?

Thank you !

Gabriel Vatin

On Wed, Mar 20, 2013 at 5:49 PM, Gabriel Vatin
<gabriel.vatin@anonymised.com> wrote:

Hi,

I have a problem while migrating from GeoServer 2.2.2 to 2.3.0. In my
old version of GS, I had PostGis datasource : I could see these sources
within the folder .../geoserver/data_dir/workspaces/myworkspaceName
each data source (ie each database) has its own folder, and in the
folder : datastore.wml + folder for each published layer. That's ok.

Now, for migrating to 2.3.0 I copied my whole data_dir, minus security
folder, to new server. All my layers are here, nice, EXCEPT the PostGis
tables.... strange!
So I tried creating a new datasource from PostGis, as usual. Except this
time, I don't have any folder for this datastore. It seems that the way
PostGis tables and layers are stored has changed in 2.3.0.

Nope, it did not change in 2.3.0.
No idea what might not be working there though...

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Actually, when creating a new datastore from PostGis, all the folders are here, it's true. But still, the "old" folders coming from my GS 2.2.2 aren't recognized by 2.3.0. Even if it is the exact same structure, I compared both (new created datastore vs original datastore).
Maybe it can come from the encryption of password for DB connection ? I've seen that the authentification panel has changed in 2.3.0, and I can't see the digest method.

Gabriel

On 20/03/2013 18:12, Andrea Aime wrote:

On Wed, Mar 20, 2013 at 5:49 PM, Gabriel Vatin
<gabriel.vatin@anonymised.com> wrote:

Hi,

I have a problem while migrating from GeoServer 2.2.2 to 2.3.0. In my
old version of GS, I had PostGis datasource : I could see these sources
within the folder .../geoserver/data_dir/workspaces/myworkspaceName
each data source (ie each database) has its own folder, and in the
folder : datastore.wml + folder for each published layer. That's ok.

Now, for migrating to 2.3.0 I copied my whole data_dir, minus security
folder, to new server. All my layers are here, nice, EXCEPT the PostGis
tables.... strange!
So I tried creating a new datasource from PostGis, as usual. Except this
time, I don't have any folder for this datastore. It seems that the way
PostGis tables and layers are stored has changed in 2.3.0.

Nope, it did not change in 2.3.0.
No idea what might not be working there though...

Cheers
Andrea

On Thu, Mar 21, 2013 at 9:30 AM, Gabriel Vatin
<gabriel.vatin@anonymised.com> wrote:

Actually, when creating a new datastore from PostGis, all the folders are
here, it's true. But still, the "old" folders coming from my GS 2.2.2 aren't
recognized by 2.3.0. Even if it is the exact same structure, I compared both
(new created datastore vs original datastore).
Maybe it can come from the encryption of password for DB connection ? I've
seen that the authentification panel has changed in 2.3.0, and I can't see
the digest method.

Let's ask Christian (cc'ed) about that

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi Garbiel, can you send me the datastore.xml from the new created datastore and from the old one.

Second, which “password encryption” do you use (global Security Settings).

Cheers
Christian

···

2013/3/21 Andrea Aime <andrea.aime@anonymised.com>

On Thu, Mar 21, 2013 at 9:30 AM, Gabriel Vatin
<gabriel.vatin@anonymised.com> wrote:

Actually, when creating a new datastore from PostGis, all the folders are
here, it’s true. But still, the “old” folders coming from my GS 2.2.2 aren’t
recognized by 2.3.0. Even if it is the exact same structure, I compared both
(new created datastore vs original datastore).
Maybe it can come from the encryption of password for DB connection ? I’ve
seen that the authentification panel has changed in 2.3.0, and I can’t see
the digest method.

Let’s ask Christian (cc’ed) about that

Cheers
Andrea

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks Aime. The digest method was added "at hand" in 2.2.2 version. Now, I guess the tutorial on GS webite should be updated, as authentification panel has changed :
http://docs.geoserver.org/latest/en/user/security/tutorials/digest/index.html

And about my PostGis problem, that was indeed a problem of encryption. I used the new encrypted password of my published PostGis datastore, copied it into the old published datastore, and now it works. So the password wasn't encrypted the same way.

Gabriel

On 21/03/2013 09:40, Andrea Aime wrote:

On Thu, Mar 21, 2013 at 9:30 AM, Gabriel Vatin
<gabriel.vatin@anonymised.com> wrote:

Actually, when creating a new datastore from PostGis, all the folders are
here, it's true. But still, the "old" folders coming from my GS 2.2.2 aren't
recognized by 2.3.0. Even if it is the exact same structure, I compared both
(new created datastore vs original datastore).
Maybe it can come from the encryption of password for DB connection ? I've
seen that the authentification panel has changed in 2.3.0, and I can't see
the digest method.

Let's ask Christian (cc'ed) about that

Cheers
Andrea

Now, for migrating to 2.3.0 I copied my whole data_dir, minus security
folder, to new server

And here is the problem. Geoserver 2.3.0 did not find its keystore “geoserver.jceks”, as a consequence a new one was created.

Within the keystore, there is a key labeled

config:password:key

This key is used for password encryption and is created on demand. (on a random basis).

Solutions:

  1. Copy your old security dir to the new installation, GeoServer 2.3.0 should migrate this directory properly.

or

  1. Use the java keytools to export/import the old key into the new keystore.

Hope this helps

···

2013/3/21 Gabriel Vatin <gabriel.vatin@anonymised.com>

Thanks Aime. The digest method was added “at hand” in 2.2.2 version.
Now, I guess the tutorial on GS webite should be updated, as
authentification panel has changed :
http://docs.geoserver.org/latest/en/user/security/tutorials/digest/index.html

And about my PostGis problem, that was indeed a problem of encryption. I
used the new encrypted password of my published PostGis datastore,
copied it into the old published datastore, and now it works. So the
password wasn’t encrypted the same way.

Gabriel

On 21/03/2013 09:40, Andrea Aime wrote:

On Thu, Mar 21, 2013 at 9:30 AM, Gabriel Vatin
<gabriel.vatin@anonymised.com…> wrote:

Actually, when creating a new datastore from PostGis, all the folders are
here, it’s true. But still, the “old” folders coming from my GS 2.2.2 aren’t
recognized by 2.3.0. Even if it is the exact same structure, I compared both
(new created datastore vs original datastore).
Maybe it can come from the encryption of password for DB connection ? I’ve
seen that the authentification panel has changed in 2.3.0, and I can’t see
the digest method.
Let’s ask Christian (cc’ed) about that

Cheers
Andrea


Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

That's it, great ! I used solution 1, copying security dir from 2.2.2 to 2.3.0 without extra of modified files from 2.3.0. Now I have all my PostGis layers.
Thanks Christian !

Gabriel

On 21/03/2013 11:25, Christian Mueller wrote:

Now, for migrating to 2.3.0 I copied my whole data_dir, minus security
folder, to new server

And here is the problem. Geoserver 2.3.0 did not find its keystore
"geoserver.jceks", as a consequence a new one was created.

Within the keystore, there is a key labeled

config:password:key

This key is used for password encryption and is created on demand. (on a
random basis).

Solutions:

1) Copy your old security dir to the new installation, GeoServer 2.3.0
should migrate this directory properly.

or

2) Use the java keytools to export/import the old key into the new keystore.

Hope this helps

2013/3/21 Gabriel Vatin <gabriel.vatin@anonymised.com
<mailto:gabriel.vatin@anonymised.com>>

    Thanks Aime. The digest method was added "at hand" in 2.2.2 version.
    Now, I guess the tutorial on GS webite should be updated, as
    authentification panel has changed :
    http://docs.geoserver.org/latest/en/user/security/tutorials/digest/index.html

    And about my PostGis problem, that was indeed a problem of encryption. I
    used the new encrypted password of my published PostGis datastore,
    copied it into the old published datastore, and now it works. So the
    password wasn't encrypted the same way.

    Gabriel

    On 21/03/2013 09:40, Andrea Aime wrote:
     > On Thu, Mar 21, 2013 at 9:30 AM, Gabriel Vatin
     > <gabriel.vatin@anonymised.com
    <mailto:gabriel.vatin@anonymised.com>> wrote:
     >> Actually, when creating a new datastore from PostGis, all the
    folders are
     >> here, it's true. But still, the "old" folders coming from my GS
    2.2.2 aren't
     >> recognized by 2.3.0. Even if it is the exact same structure, I
    compared both
     >> (new created datastore vs original datastore).
     >> Maybe it can come from the encryption of password for DB
    connection ? I've
     >> seen that the authentification panel has changed in 2.3.0, and I
    can't see
     >> the digest method.
     > Let's ask Christian (cc'ed) about that
     >
     > Cheers
     > Andrea
     >

    ------------------------------------------------------------------------------
    Everyone hates slow websites. So do we.
    Make your web apps faster with AppDynamics
    Download AppDynamics Lite for free today:
    http://p.sf.net/sfu/appdyn_d2d_mar
    _______________________________________________
    Geoserver-users mailing list
    Geoserver-users@lists.sourceforge.net
    <mailto:Geoserver-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geoserver-users