talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Issues with logging into a cloned postgres instance

JM
Jesse Martinez
Thu, Feb 23, 2012 11:43 PM

I've been experimenting with cloning a postgresql instance onto a
secondary server for backup and consistency. Using postgresql's binary
replication tool I was able to copy over all the data from one
instance to another. (Both servers running the same environment and
postgresql version.) I can see and check that the data matches from a
small sampling of both instances, but when I startup cspace I see that
I can't connect to postgresql. I get this error from postgresql:

2012-02-23 18:27:43 EST FATAL:  password authentication failed for
user "postgres"
2012-02-23 18:27:45 EST FATAL:  password authentication failed for
user "postgres"

and this error from cspace:

2012-02-23 18:27:43,223 DEBUG [main]
[org.collectionspace.services.common.ServiceMain:573] SQL Exception:
Cannot create PoolableConnectionFactory (FATAL: password
authentication failed for user "postgres")

Both servers use the same postgres user and db password. I can log
into postgresql via cli. I've even changed the password in the user
environment and postgresql user table but to no avail. Any leads to
what might cause this problem?

It's worth noting that before using the binary replication tool I was
able to initialize cspace with the basic create_db import commands.

Thanks,

  • Jesse
I've been experimenting with cloning a postgresql instance onto a secondary server for backup and consistency. Using postgresql's binary replication tool I was able to copy over all the data from one instance to another. (Both servers running the same environment and postgresql version.) I can see and check that the data matches from a small sampling of both instances, but when I startup cspace I see that I can't connect to postgresql. I get this error from postgresql: 2012-02-23 18:27:43 EST FATAL: password authentication failed for user "postgres" 2012-02-23 18:27:45 EST FATAL: password authentication failed for user "postgres" and this error from cspace: 2012-02-23 18:27:43,223 DEBUG [main] [org.collectionspace.services.common.ServiceMain:573] SQL Exception: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "postgres") Both servers use the same postgres user and db password. I can log into postgresql via cli. I've even changed the password in the user environment and postgresql user table but to no avail. Any leads to what might cause this problem? It's worth noting that before using the binary replication tool I was able to initialize cspace with the basic create_db import commands. Thanks, - Jesse
NS
Nate Solas
Fri, Feb 24, 2012 5:43 PM

I would check the trust settings in pg_hba.conf. That's outside of the data
so it's not being cloned, and would override any password settings.... My
guess is things are more restrictive on the target server. Why Postgres
installs that way by default is beyond me... :)

Nate

On Thu, Feb 23, 2012 at 5:43 PM, Jesse Martinez jmartinez@movingimage.uswrote:

I've been experimenting with cloning a postgresql instance onto a
secondary server for backup and consistency. Using postgresql's binary
replication tool I was able to copy over all the data from one
instance to another. (Both servers running the same environment and
postgresql version.) I can see and check that the data matches from a
small sampling of both instances, but when I startup cspace I see that
I can't connect to postgresql. I get this error from postgresql:

2012-02-23 18:27:43 EST FATAL:  password authentication failed for
user "postgres"
2012-02-23 18:27:45 EST FATAL:  password authentication failed for
user "postgres"

and this error from cspace:

2012-02-23 18:27:43,223 DEBUG [main]
[org.collectionspace.services.common.ServiceMain:573] SQL Exception:
Cannot create PoolableConnectionFactory (FATAL: password
authentication failed for user "postgres")

Both servers use the same postgres user and db password. I can log
into postgresql via cli. I've even changed the password in the user
environment and postgresql user table but to no avail. Any leads to
what might cause this problem?

It's worth noting that before using the binary replication tool I was
able to initialize cspace with the basic create_db import commands.

Thanks,

  • Jesse

Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

I would check the trust settings in pg_hba.conf. That's outside of the data so it's not being cloned, and would override any password settings.... My guess is things are more restrictive on the target server. Why Postgres installs that way by default is beyond me... :) Nate On Thu, Feb 23, 2012 at 5:43 PM, Jesse Martinez <jmartinez@movingimage.us>wrote: > I've been experimenting with cloning a postgresql instance onto a > secondary server for backup and consistency. Using postgresql's binary > replication tool I was able to copy over all the data from one > instance to another. (Both servers running the same environment and > postgresql version.) I can see and check that the data matches from a > small sampling of both instances, but when I startup cspace I see that > I can't connect to postgresql. I get this error from postgresql: > > 2012-02-23 18:27:43 EST FATAL: password authentication failed for > user "postgres" > 2012-02-23 18:27:45 EST FATAL: password authentication failed for > user "postgres" > > and this error from cspace: > > 2012-02-23 18:27:43,223 DEBUG [main] > [org.collectionspace.services.common.ServiceMain:573] SQL Exception: > Cannot create PoolableConnectionFactory (FATAL: password > authentication failed for user "postgres") > > > Both servers use the same postgres user and db password. I can log > into postgresql via cli. I've even changed the password in the user > environment and postgresql user table but to no avail. Any leads to > what might cause this problem? > > It's worth noting that before using the binary replication tool I was > able to initialize cspace with the basic create_db import commands. > > Thanks, > > - Jesse > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
JM
Jesse Martinez
Fri, Feb 24, 2012 9:08 PM

I think my issue before was that the environments weren't exactly the
same. One was on Ubuntu 10.4 and the other on 11.10.
I corrected this and was able to create a replicate the postgresql
from one server to another and log in successfully.

From this binary replication process I was able to replicate the dbs,

tables and data from one server to another, but CollectionSpace
doesn't pull out all the data as expected. I can see the procedural
records just fine and I can see the authorities but none of the item
records list in the UI or services REST API. The authority items exist
in the nuxeo db, i.e.  I see data in the persons_common table et al.,
but for some reason don't exist to CSpace. Might there be a reason
this would happen? Are authorities maybe defined outside of the
database somewhere?

  • Jesse

More info about this process:

The following guide shows the steps used for binary replication:
http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial
Similar tutorial:
http://www.howtoforge.com/how-to-easily-migrate-a-postgresql-server-with-minimal-downtime

An important step I was initially ignoring was to turn off hot standby
on the second server and then convert it from a read-only "standby"
into its own read-write "master". This is probably not the simplest
way to clone a db but it affords me the ability to convert the test
development server into its own stand-alone server with minimal
trouble -- excluding the initial setup costs.

(Hot standby is useful, I believe, for creating a read-only slave
instance and for separating collections browsing from the actual
record editing instance.)

On Fri, Feb 24, 2012 at 12:43 PM, Nate Solas nate.solas@walkerart.org wrote:

I would check the trust settings in pg_hba.conf. That's outside of the data
so it's not being cloned, and would override any password settings.... My
guess is things are more restrictive on the target server. Why Postgres
installs that way by default is beyond me... :)

Nate

On Thu, Feb 23, 2012 at 5:43 PM, Jesse Martinez jmartinez@movingimage.us
wrote:

I've been experimenting with cloning a postgresql instance onto a
secondary server for backup and consistency. Using postgresql's binary
replication tool I was able to copy over all the data from one
instance to another. (Both servers running the same environment and
postgresql version.) I can see and check that the data matches from a
small sampling of both instances, but when I startup cspace I see that
I can't connect to postgresql. I get this error from postgresql:

2012-02-23 18:27:43 EST FATAL:  password authentication failed for
user "postgres"
2012-02-23 18:27:45 EST FATAL:  password authentication failed for
user "postgres"

and this error from cspace:

2012-02-23 18:27:43,223 DEBUG [main]
[org.collectionspace.services.common.ServiceMain:573] SQL Exception:
Cannot create PoolableConnectionFactory (FATAL: password
authentication failed for user "postgres")

Both servers use the same postgres user and db password. I can log
into postgresql via cli. I've even changed the password in the user
environment and postgresql user table but to no avail. Any leads to
what might cause this problem?

It's worth noting that before using the binary replication tool I was
able to initialize cspace with the basic create_db import commands.

Thanks,

 - Jesse


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

I think my issue before was that the environments weren't exactly the same. One was on Ubuntu 10.4 and the other on 11.10. I corrected this and was able to create a replicate the postgresql from one server to another and log in successfully. >From this binary replication process I was able to replicate the dbs, tables and data from one server to another, but CollectionSpace doesn't pull out all the data as expected. I can see the procedural records just fine and I can see the authorities but none of the item records list in the UI or services REST API. The authority items exist in the nuxeo db, i.e. I see data in the persons_common table et al., but for some reason don't exist to CSpace. Might there be a reason this would happen? Are authorities maybe defined outside of the database somewhere? - Jesse More info about this process: The following guide shows the steps used for binary replication: http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial Similar tutorial: http://www.howtoforge.com/how-to-easily-migrate-a-postgresql-server-with-minimal-downtime An important step I was initially ignoring was to turn off hot standby on the second server and then convert it from a read-only "standby" into its own read-write "master". This is probably not the simplest way to clone a db but it affords me the ability to convert the test development server into its own stand-alone server with minimal trouble -- excluding the initial setup costs. (Hot standby is useful, I believe, for creating a read-only slave instance and for separating collections browsing from the actual record editing instance.) On Fri, Feb 24, 2012 at 12:43 PM, Nate Solas <nate.solas@walkerart.org> wrote: > I would check the trust settings in pg_hba.conf. That's outside of the data > so it's not being cloned, and would override any password settings.... My > guess is things are more restrictive on the target server. Why Postgres > installs that way by default is beyond me... :) > > Nate > > > On Thu, Feb 23, 2012 at 5:43 PM, Jesse Martinez <jmartinez@movingimage.us> > wrote: >> >> I've been experimenting with cloning a postgresql instance onto a >> secondary server for backup and consistency. Using postgresql's binary >> replication tool I was able to copy over all the data from one >> instance to another. (Both servers running the same environment and >> postgresql version.) I can see and check that the data matches from a >> small sampling of both instances, but when I startup cspace I see that >> I can't connect to postgresql. I get this error from postgresql: >> >> 2012-02-23 18:27:43 EST FATAL:  password authentication failed for >> user "postgres" >> 2012-02-23 18:27:45 EST FATAL:  password authentication failed for >> user "postgres" >> >> and this error from cspace: >> >> 2012-02-23 18:27:43,223 DEBUG [main] >> [org.collectionspace.services.common.ServiceMain:573] SQL Exception: >> Cannot create PoolableConnectionFactory (FATAL: password >> authentication failed for user "postgres") >> >> >> Both servers use the same postgres user and db password. I can log >> into postgresql via cli. I've even changed the password in the user >> environment and postgresql user table but to no avail. Any leads to >> what might cause this problem? >> >> It's worth noting that before using the binary replication tool I was >> able to initialize cspace with the basic create_db import commands. >> >> Thanks, >> >>  - Jesse >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > >