talk@lists.collectionspace.org

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

View all threads

Re: [Talk] space user password error

AB
Al Bersch
Fri, May 25, 2012 6:17 PM

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed message (verbose version below) and it appears that our environment variables are not being recognized, even though we can find the right path if we echo the environment variables. We continue to get the message that the cspace user password can't be authenticated. We verified that the password is set in the environment variable. We can echo and it kicks back the password. Once we set the cspace user password, we can log into postgres with that user password, until we run the script and after that we can't log in until we reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI = file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy, clean-windows, checkvars, install-unix, install-windows, install, setup_initdb.sql, deploy, package-unix, package-windows, package, eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
[sql] connecting to jdbc:postgresql://localhost:5432
[sql] Loading org.postgresql.Driver using AntClassLoader with classpath /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
[sql] Executing resource: /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
[sql] SQL: DROP database IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP database IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS reader
[sql] 0 rows affected
[sql] SQL: CREATE ROLE nuxeo WITH PASSWORD 'your_nuxeo_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE cspace WITH PASSWORD 'your_cspace_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
[sql] 0 rows affected
[sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader
[sql] 0 rows affected
[sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file /Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
[property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
[ant] Entering /Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows, install-unix, install-windows, install, deploy, doc-windows, package-unix, package-windows, package, dist_installer, import, copy-dependencies-reports, test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix, gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file /Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile /Users/admin/Downloads/services/services/authentication/build.xml with URI = file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to: /Users/admin/Downloads/services/services/authentication
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering /Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows, install-unix, install-windows, install, deploy, package-unix, package-windows, package, test-windows, dist, clean-unix, clean, test-unix, gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file /Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile /Users/admin/Downloads/services/services/authentication/pstore/build.xml with URI = file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to: /Users/admin/Downloads/services/services/authentication/pstore
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering /Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir, undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows, install, deploy, package-unix, package-windows, package, gen_ddl-unix, test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, gen_ddl, test, ]

create_db:
[sql] connecting to jdbc:postgresql://localhost:5432/cspace
[sql] Loading org.postgresql.Driver using a cached AntClassLoader.
[ant] Exiting /Users/admin/Downloads/services/services/authentication/pstore/build.xml.
[ant] Exiting /Users/admin/Downloads/services/services/authentication/build.xml.
[ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error occurred while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following error occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117: The following error occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "cspace"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468
----- Original Message -----

From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM
Subject: Re: [Talk] space user password error

Hi Al,

Many thanks - it's terrific you resolved this in this way! And
your note on the Talk list will help others who may run into the same
situation.

(Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue. So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}". That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties. If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace". In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  • Log into PostgreSQL as an administrative user, such as the
    'postgresql' user.
  • Enter:
    ALTER ROLE cspace WITH PASSWORD
    'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when we
run the ant create_db import. With the following error:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Aron and talk, It looks like I spoke too soon. We are still getting a build failed message (verbose version below) and it appears that our environment variables are not being recognized, even though we can find the right path if we echo the environment variables. We continue to get the message that the cspace user password can't be authenticated. We verified that the password is set in the environment variable. We can echo and it kicks back the password. Once we set the cspace user password, we can log into postgres with that user password, until we run the script and after that we can't log in until we reset the password. Any thoughts? Much appreciated! Thanks, Al museumcatest:services admin$ ant create_db import -v Apache Ant(TM) version 1.8.2 compiled on June 3 2011 Trying the default build file: build.xml Buildfile: /Users/admin/Downloads/services/build.xml Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Detected OS: Mac OS X parsing buildfile /Users/admin/Downloads/services/build.xml with URI = file:/Users/admin/Downloads/services/build.xml Project base dir set to: /Users/admin/Downloads/services parsing buildfile jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file [property] Loading Environment env. [property] Loading /Users/admin/Downloads/services/build.properties Build sequence for target(s) `create_db' is [create_base_db, create_db] Complete build sequence is [create_base_db, create_db, undeploy, clean-windows, checkvars, install-unix, install-windows, install, setup_initdb.sql, deploy, package-unix, package-windows, package, eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] create_base_db: [sql] connecting to jdbc:postgresql://localhost:5432 [sql] Loading org.postgresql.Driver using AntClassLoader with classpath /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar [sql] Executing resource: /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql [sql] SQL: DROP database IF EXISTS cspace [sql] 0 rows affected [sql] SQL: DROP database IF EXISTS nuxeo [sql] 0 rows affected [sql] SQL: DROP USER IF EXISTS nuxeo [sql] 0 rows affected [sql] SQL: DROP USER IF EXISTS cspace [sql] 0 rows affected [sql] SQL: DROP USER IF EXISTS reader [sql] 0 rows affected [sql] SQL: CREATE ROLE nuxeo WITH PASSWORD 'your_nuxeo_database_user_password_here' LOGIN [sql] 0 rows affected [sql] SQL: CREATE ROLE cspace WITH PASSWORD 'your_cspace_database_user_password_here' LOGIN [sql] 0 rows affected [sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN [sql] 0 rows affected [sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace [sql] 0 rows affected [sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo [sql] 0 rows affected [sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader [sql] 0 rows affected [sql] 11 of 11 SQL statements executed successfully create_db: Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Detected OS: Mac OS X [ant] calling target(s) [create_db] in build file /Users/admin/Downloads/services/services/build.xml parsing buildfile /Users/admin/Downloads/services/services/build.xml with URI = file:/Users/admin/Downloads/services/services/build.xml Project base dir set to: /Users/admin/Downloads/services/services [property] Loading /Users/admin/Downloads/services/build.properties Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.DB_PASSWORD_NUXEO" has not been set Property "env.DB_PASSWORD" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.DB_USER" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.DB_PASSWORD_CSPACE" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set Property "env.CSPACE_JEESERVER_HOME" has not been set [ant] Entering /Users/admin/Downloads/services/services/build.xml... Build sequence for target(s) `create_db' is [create_db] Complete build sequence is [create_db, undeploy, clean-windows, install-unix, install-windows, install, deploy, doc-windows, package-unix, package-windows, package, dist_installer, import, copy-dependencies-reports, test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix, gen_ddl, test, generate-dependencies-reports, ] create_db: Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Detected OS: Mac OS X [ant] calling target(s) [create_db] in build file /Users/admin/Downloads/services/services/authentication/build.xml parsing buildfile /Users/admin/Downloads/services/services/authentication/build.xml with URI = file:/Users/admin/Downloads/services/services/authentication/build.xml Project base dir set to: /Users/admin/Downloads/services/services/authentication [property] Loading Environment env. [property] Loading /Users/admin/Downloads/services/build.properties [ant] Entering /Users/admin/Downloads/services/services/authentication/build.xml... Build sequence for target(s) `create_db' is [create_db] Complete build sequence is [create_db, undeploy, clean-windows, install-unix, install-windows, install, deploy, package-unix, package-windows, package, test-windows, dist, clean-unix, clean, test-unix, gen_ddl, test, ] create_db: Detected Java version: 1.6 in: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Detected OS: Mac OS X [ant] calling target(s) [create_db] in build file /Users/admin/Downloads/services/services/authentication/pstore/build.xml parsing buildfile /Users/admin/Downloads/services/services/authentication/pstore/build.xml with URI = file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml Project base dir set to: /Users/admin/Downloads/services/services/authentication/pstore [property] Loading Environment env. [property] Loading /Users/admin/Downloads/services/build.properties [ant] Entering /Users/admin/Downloads/services/services/authentication/pstore/build.xml... Build sequence for target(s) `create_db' is [create_db] Complete build sequence is [create_db, check.db.scripts.deploy.dir, undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows, install, deploy, package-unix, package-windows, package, gen_ddl-unix, test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, gen_ddl, test, ] create_db: [sql] connecting to jdbc:postgresql://localhost:5432/cspace [sql] Loading org.postgresql.Driver using a cached AntClassLoader. [ant] Exiting /Users/admin/Downloads/services/services/authentication/pstore/build.xml. [ant] Exiting /Users/admin/Downloads/services/services/authentication/build.xml. [ant] Exiting /Users/admin/Downloads/services/services/build.xml. BUILD FAILED /Users/admin/Downloads/services/build.xml:210: The following error occurred while executing this line: /Users/admin/Downloads/services/services/build.xml:136: The following error occurred while executing this line: /Users/admin/Downloads/services/services/authentication/build.xml:117: The following error occurred while executing this line: /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "cspace" at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) at org.postgresql.Driver.makeConnection(Driver.java:393) at org.postgresql.Driver.connect(Driver.java:267) at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.Main.runBuild(Main.java:809) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Total time: 1 second Al Bersch Digital Project Coordinator Oakland Museum of California 1000 Oak Street, Oakland, CA 94607 abersch@museumca.org 510-318-8468 ----- Original Message ----- From: "Aron Roberts" <aron@socrates.berkeley.edu> To: "Al Bersch" <abersch@museumca.org> Sent: Friday, May 25, 2012 9:32:47 AM Subject: Re: [Talk] space user password error Hi Al, Many thanks - it's terrific you resolved this in this way! And your note on the Talk list will help others who may run into the same situation. (Until reading your note, I wasn't aware of the ENCRYPTED option for passwords in PostgreSQL: http://www.postgresql.org/docs/9.1/static/sql-createuser.html). Best, Aron On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron, > > Thanks for getting back to me so quickly. Shame on me - "space" was my > typo. > > We did reset the password for the PostgreSQL > > database user named "cspace" to match the value of that password in > $DB_PASSWORD_CSPACE, but were still getting error messages. > > We then tried resetting the password as unencrypted, and that seemed to > resolve the authentication issue. So I believe we are set. > > Thanks for your help! > > Al > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Cc: talk@lists.collectionspace.org > Sent: Thursday, May 24, 2012 5:03:32 PM > Subject: Re: [Talk] space user password error > > > Hi Al, > > Does that message really say, "password authentication failed for > user "space"' - rather than 'user "cspace"'? > > The script you're running when you type "ant create_db import" (an > Ant 'buildfile'), uses the value of a variable called > "${db.cspace.user}". That value is set (hard-coded) to 'cspace' in > the file /Users/admin/Downloads/services/build.properties. If you're > truly seeing "space" in the error message, you might first check the > value of 'db.cspace.user' in build.properties, and make sure it's > "cspace", not "space". > > You can also run "ant create_db import -v" (note the '-v" flag to > generate very verbose messages), and look at the value of > db.cspace.user right before the script terminates in that error. > > Second, assuming that you are using 'cspace' as your database user > name, you'll want to check that the password for the 'cspace' user > used by this script, which attempts to log into the database as that > user - which in turn is the password you've set in the > $DB_PASSWORD_CSPACE environment variable - is the same as the actual > password for the PostgreSQL database user named "cspace". In other > words, you might try resetting the password for the PostgreSQL > database user named "cspace" to match the value of that password in > $DB_PASSWORD_CSPACE. > > http://www.postgresql.org/docs/9.1/static/sql-alterrole.html > > * Log into PostgreSQL as an administrative user, such as the > 'postgresql' user. > * Enter: > ALTER ROLE cspace WITH PASSWORD > 'password_from_DB_PASSWORD_CSPACE_goes_here'; > > Aron Roberts > UC Berkeley > > > On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >> Hello, >> >> After following the steps for creating our tenant we get an error when we >> run the ant create_db import. With the following error: >> >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >> org.postgresql.util.PSQLException: FATAL: password authentication failed >> for >> user "space". >> >> We believe we verified the password is set to what our environment >> variable >> is set to: $DB_PASSWORD_CSPACE. >> >> We would appreciate any ideas/advice! >> >> Thank you! >> Al Bersch >> Digital Project Coordinator >> Oakland Museum of California >> 1000 Oak Street, Oakland, CA 94607 >> abersch@museumca.org >> 510-318-8468 >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >
AR
Aron Roberts
Fri, May 25, 2012 6:36 PM

Hi Al,

Am noticing from a quick Google search that there are some subtle /
edge cases where Ant may not pick up environment variables; am hoping
a discussion like this one may help spur some clues for you, if that's
truly the case:

http://ant.1045680.n5.nabble.com/lt-property-environment-env-gt-doesn-t-pick-up-an-environment-variable-td1353518.html

Otherwise, what versions of CollectionSpace are you attempting to
install, and on what platform (OS version)?

Thanks,
Aron

P.S. I've yet to run across this issue, in the (literally hundreds, if
not thousands) of times I've run our Ant-based build scripts on
various Linux distros and under Mac OS X.  Interesting problem :-)

On Fri, May 25, 2012 at 11:17 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo the
environment variables. We continue to get the message that the cspace user
password can't be authenticated. We verified that the password is set in the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
      [sql] connecting to jdbc:postgresql://localhost:5432
      [sql] Loading org.postgresql.Driver using AntClassLoader with
classpath
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
      [sql] Executing resource:
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
      [sql] SQL:  DROP database IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP database IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:   DROP USER IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS reader
      [sql] 0 rows affected
      [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN
      [sql] 0 rows affected
      [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
      [sql] 0 rows affected
      [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
      [sql] 0 rows affected
      [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader
      [sql] 0 rows affected
      [sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
 [property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
      [ant] Entering /Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows, package-unix,
package-windows, package, dist_installer, import, copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean, test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =
file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
      [sql] connecting to jdbc:postgresql://localhost:5432/cspace
      [sql] Loading org.postgresql.Driver using a cached AntClassLoader.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
      [ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117: The
following error occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed for
user "cspace"
at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

   Many thanks - it's terrific you resolved this in this way!  And
your note on the Talk list will help others who may run into the same
situation.

  (Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue.  So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

  Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

  The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties.  If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

  You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

  Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace".  In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

  http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  * Log into PostgreSQL as an administrative user, such as the
'postgresql' user.
  * Enter:
  ALTER ROLE cspace WITH PASSWORD
'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when we
run the ant create_db import. With the following error:

 /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Al, Am noticing from a quick Google search that there are some subtle / edge cases where Ant may not pick up environment variables; am hoping a discussion like this one may help spur some clues for you, if that's truly the case: http://ant.1045680.n5.nabble.com/lt-property-environment-env-gt-doesn-t-pick-up-an-environment-variable-td1353518.html Otherwise, what versions of CollectionSpace are you attempting to install, and on what platform (OS version)? Thanks, Aron P.S. I've yet to run across this issue, in the (literally hundreds, if not thousands) of times I've run our Ant-based build scripts on various Linux distros and under Mac OS X. Interesting problem :-) On Fri, May 25, 2012 at 11:17 AM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron and talk, > > It looks like I spoke too soon. We are still getting a build failed message > (verbose version below) and it appears that our environment variables are > not being recognized, even though we can find the right path if we echo the > environment variables. We continue to get the message that the cspace user > password can't be authenticated. We verified that the password is set in the > environment variable. We can echo and it kicks back the password. Once we > set the cspace user password, we can log into postgres with that user > password, until we run the script and after that we can't log in until we > reset the password. > > Any thoughts? Much appreciated! > > Thanks, > > Al > > museumcatest:services admin$ ant create_db import -v > Apache Ant(TM) version 1.8.2 compiled on June 3 2011 > Trying the default build file: build.xml > Buildfile: /Users/admin/Downloads/services/build.xml > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X > parsing buildfile /Users/admin/Downloads/services/build.xml with URI = > file:/Users/admin/Downloads/services/build.xml > Project base dir set to: /Users/admin/Downloads/services > parsing buildfile > jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with > URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml > from a zip file >  [property] Loading Environment env. >  [property] Loading /Users/admin/Downloads/services/build.properties > Build sequence for target(s) `create_db' is [create_base_db, create_db] > Complete build sequence is [create_base_db, create_db, undeploy, > clean-windows, checkvars, install-unix, install-windows, install, > setup_initdb.sql, deploy, package-unix, package-windows, package, > eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, > hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, > eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] > > create_base_db: >       [sql] connecting to jdbc:postgresql://localhost:5432 >       [sql] Loading org.postgresql.Driver using AntClassLoader with > classpath > /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >       [sql] Executing resource: > /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >       [sql] SQL:  DROP database IF EXISTS cspace >       [sql] 0 rows affected >       [sql] SQL:  DROP database IF EXISTS nuxeo >       [sql] 0 rows affected >       [sql] SQL:   DROP USER IF EXISTS nuxeo >       [sql] 0 rows affected >       [sql] SQL:  DROP USER IF EXISTS cspace >       [sql] 0 rows affected >       [sql] SQL:  DROP USER IF EXISTS reader >       [sql] 0 rows affected >       [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD > 'your_nuxeo_database_user_password_here' LOGIN >       [sql] 0 rows affected >       [sql] SQL:  CREATE ROLE cspace WITH PASSWORD > 'your_cspace_database_user_password_here' LOGIN >       [sql] 0 rows affected >       [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN >       [sql] 0 rows affected >       [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >       [sql] 0 rows affected >       [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >       [sql] 0 rows affected >       [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader >       [sql] 0 rows affected >       [sql] 11 of 11 SQL statements executed successfully > > create_db: > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X >       [ant] calling target(s) [create_db] in build file > /Users/admin/Downloads/services/services/build.xml > parsing buildfile /Users/admin/Downloads/services/services/build.xml with > URI = file:/Users/admin/Downloads/services/services/build.xml > Project base dir set to: /Users/admin/Downloads/services/services >  [property] Loading /Users/admin/Downloads/services/build.properties > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.DB_PASSWORD_NUXEO" has not been set > Property "env.DB_PASSWORD" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.DB_USER" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.DB_PASSWORD_CSPACE" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set >       [ant] Entering /Users/admin/Downloads/services/services/build.xml... > Build sequence for target(s) `create_db' is [create_db] > Complete build sequence is [create_db, undeploy, clean-windows, > install-unix, install-windows, install, deploy, doc-windows, package-unix, > package-windows, package, dist_installer, import, copy-dependencies-reports, > test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix, > gen_ddl, test, generate-dependencies-reports, ] > > create_db: > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X >       [ant] calling target(s) [create_db] in build file > /Users/admin/Downloads/services/services/authentication/build.xml > parsing buildfile > /Users/admin/Downloads/services/services/authentication/build.xml with URI = > file:/Users/admin/Downloads/services/services/authentication/build.xml > Project base dir set to: > /Users/admin/Downloads/services/services/authentication >  [property] Loading Environment env. >  [property] Loading /Users/admin/Downloads/services/build.properties >       [ant] Entering > /Users/admin/Downloads/services/services/authentication/build.xml... > Build sequence for target(s) `create_db' is [create_db] > Complete build sequence is [create_db, undeploy, clean-windows, > install-unix, install-windows, install, deploy, package-unix, > package-windows, package, test-windows, dist, clean-unix, clean, test-unix, > gen_ddl, test, ] > > create_db: > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X >       [ant] calling target(s) [create_db] in build file > /Users/admin/Downloads/services/services/authentication/pstore/build.xml > parsing buildfile > /Users/admin/Downloads/services/services/authentication/pstore/build.xml > with URI = > file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml > Project base dir set to: > /Users/admin/Downloads/services/services/authentication/pstore >  [property] Loading Environment env. >  [property] Loading /Users/admin/Downloads/services/build.properties >       [ant] Entering > /Users/admin/Downloads/services/services/authentication/pstore/build.xml... > Build sequence for target(s) `create_db' is [create_db] > Complete build sequence is [create_db, check.db.scripts.deploy.dir, > undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows, > install, deploy, package-unix, package-windows, package, gen_ddl-unix, > test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, > gen_ddl, test, ] > > create_db: >       [sql] connecting to jdbc:postgresql://localhost:5432/cspace >       [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >       [ant] Exiting > /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >       [ant] Exiting > /Users/admin/Downloads/services/services/authentication/build.xml. >       [ant] Exiting /Users/admin/Downloads/services/services/build.xml. > > BUILD FAILED > /Users/admin/Downloads/services/build.xml:210: The following error occurred > while executing this line: > /Users/admin/Downloads/services/services/build.xml:136: The following error > occurred while executing this line: > /Users/admin/Downloads/services/services/authentication/build.xml:117: The > following error occurred while executing this line: > /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: > org.postgresql.util.PSQLException: FATAL: password authentication failed for > user "cspace" > at > org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) > at > org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) > at > org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) > at > org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) > at > org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) > at > org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) > at > org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) > at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) > at org.postgresql.Driver.makeConnection(Driver.java:393) > at org.postgresql.Driver.connect(Driver.java:267) > at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) > at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) > at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at org.apache.tools.ant.Project.executeTarget(Project.java:1368) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.Main.runBuild(Main.java:809) > at org.apache.tools.ant.Main.startAnt(Main.java:217) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) > > Total time: 1 second > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Sent: Friday, May 25, 2012 9:32:47 AM > > Subject: Re: [Talk] space user password error > > Hi Al, > >    Many thanks - it's terrific you resolved this in this way!  And > your note on the Talk list will help others who may run into the same > situation. > >   (Until reading your note, I wasn't aware of the ENCRYPTED option for > passwords in PostgreSQL: > http://www.postgresql.org/docs/9.1/static/sql-createuser.html). > > Best, > Aron > > On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >> Hi Aron, >> >> Thanks for getting back to me so quickly. Shame on me - "space" was my >> typo. >> >> We did reset the password for the PostgreSQL >> >> database user named "cspace" to match the value of that password in >> $DB_PASSWORD_CSPACE, but were still getting error messages. >> >> We then tried resetting the password as unencrypted, and that seemed to >> resolve the authentication issue.  So I believe we are set. >> >> Thanks for your help! >> >> Al >> >> Al Bersch >> Digital Project Coordinator >> Oakland Museum of California >> 1000 Oak Street, Oakland, CA 94607 >> abersch@museumca.org >> 510-318-8468 >> ________________________________ >> From: "Aron Roberts" <aron@socrates.berkeley.edu> >> To: "Al Bersch" <abersch@museumca.org> >> Cc: talk@lists.collectionspace.org >> Sent: Thursday, May 24, 2012 5:03:32 PM >> Subject: Re: [Talk] space user password error >> >> >> Hi Al, >> >>   Does that message really say, "password authentication failed for >> user "space"' - rather than 'user "cspace"'? >> >>   The script you're running when you type "ant create_db import" (an >> Ant 'buildfile'), uses the value of a variable called >> "${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in >> the file /Users/admin/Downloads/services/build.properties.  If you're >> truly seeing "space" in the error message, you might first check the >> value of 'db.cspace.user' in build.properties, and make sure it's >> "cspace", not "space". >> >>   You can also run "ant create_db import -v" (note the '-v" flag to >> generate very verbose messages), and look at the value of >> db.cspace.user right before the script terminates in that error. >> >>   Second, assuming that you are using 'cspace' as your database user >> name, you'll want to check that the password for the 'cspace' user >> used by this script, which attempts to log into the database as that >> user - which in turn is the password you've set in the >> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >> password for the PostgreSQL database user named "cspace".  In other >> words, you might try resetting the password for the PostgreSQL >> database user named "cspace" to match the value of that password in >> $DB_PASSWORD_CSPACE. >> >>   http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >> >>   * Log into PostgreSQL as an administrative user, such as the >> 'postgresql' user. >>   * Enter: >>   ALTER ROLE cspace WITH PASSWORD >> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >> >> Aron Roberts >> UC Berkeley >> >> >> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hello, >>> >>> After following the steps for creating our tenant we get an error when we >>> run the ant create_db import. With the following error: >>> >>> >>>  /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "space". >>> >>> We believe we verified the password is set to what our environment >>> variable >>> is set to: $DB_PASSWORD_CSPACE. >>> >>> We would appreciate any ideas/advice! >>> >>> Thank you! >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
JM
Jesse Martinez
Fri, May 25, 2012 8:13 PM

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo the
environment variables. We continue to get the message that the cspace user
password can't be authenticated. We verified that the password is set in the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
      [sql] connecting to jdbc:postgresql://localhost:5432
      [sql] Loading org.postgresql.Driver using AntClassLoader with
classpath
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
      [sql] Executing resource:
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
      [sql] SQL:  DROP database IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP database IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:   DROP USER IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS reader
      [sql] 0 rows affected
      [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN
      [sql] 0 rows affected
      [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
      [sql] 0 rows affected
      [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
      [sql] 0 rows affected
      [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader
      [sql] 0 rows affected
      [sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
 [property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
      [ant] Entering /Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows, package-unix,
package-windows, package, dist_installer, import, copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean, test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =
file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
      [sql] connecting to jdbc:postgresql://localhost:5432/cspace
      [sql] Loading org.postgresql.Driver using a cached AntClassLoader.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
      [ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117: The
following error occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed for
user "cspace"
at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

   Many thanks - it's terrific you resolved this in this way!  And
your note on the Talk list will help others who may run into the same
situation.

  (Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue.  So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

  Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

  The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties.  If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

  You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

  Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace".  In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

  http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  * Log into PostgreSQL as an administrative user, such as the
'postgresql' user.
  * Enter:
  ALTER ROLE cspace WITH PASSWORD
'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when we
run the ant create_db import. With the following error:

 /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Al, Just a quick thought, are you using special characters or punctuation in your cspace password? I once had an issue using dollar signs $ in a postgresql password. - Jesse On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron and talk, > > It looks like I spoke too soon. We are still getting a build failed message > (verbose version below) and it appears that our environment variables are > not being recognized, even though we can find the right path if we echo the > environment variables. We continue to get the message that the cspace user > password can't be authenticated. We verified that the password is set in the > environment variable. We can echo and it kicks back the password. Once we > set the cspace user password, we can log into postgres with that user > password, until we run the script and after that we can't log in until we > reset the password. > > Any thoughts? Much appreciated! > > Thanks, > > Al > > museumcatest:services admin$ ant create_db import -v > Apache Ant(TM) version 1.8.2 compiled on June 3 2011 > Trying the default build file: build.xml > Buildfile: /Users/admin/Downloads/services/build.xml > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X > parsing buildfile /Users/admin/Downloads/services/build.xml with URI = > file:/Users/admin/Downloads/services/build.xml > Project base dir set to: /Users/admin/Downloads/services > parsing buildfile > jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with > URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml > from a zip file >  [property] Loading Environment env. >  [property] Loading /Users/admin/Downloads/services/build.properties > Build sequence for target(s) `create_db' is [create_base_db, create_db] > Complete build sequence is [create_base_db, create_db, undeploy, > clean-windows, checkvars, install-unix, install-windows, install, > setup_initdb.sql, deploy, package-unix, package-windows, package, > eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, > hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, > eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] > > create_base_db: >       [sql] connecting to jdbc:postgresql://localhost:5432 >       [sql] Loading org.postgresql.Driver using AntClassLoader with > classpath > /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >       [sql] Executing resource: > /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >       [sql] SQL:  DROP database IF EXISTS cspace >       [sql] 0 rows affected >       [sql] SQL:  DROP database IF EXISTS nuxeo >       [sql] 0 rows affected >       [sql] SQL:   DROP USER IF EXISTS nuxeo >       [sql] 0 rows affected >       [sql] SQL:  DROP USER IF EXISTS cspace >       [sql] 0 rows affected >       [sql] SQL:  DROP USER IF EXISTS reader >       [sql] 0 rows affected >       [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD > 'your_nuxeo_database_user_password_here' LOGIN >       [sql] 0 rows affected >       [sql] SQL:  CREATE ROLE cspace WITH PASSWORD > 'your_cspace_database_user_password_here' LOGIN >       [sql] 0 rows affected >       [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN >       [sql] 0 rows affected >       [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >       [sql] 0 rows affected >       [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >       [sql] 0 rows affected >       [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader >       [sql] 0 rows affected >       [sql] 11 of 11 SQL statements executed successfully > > create_db: > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X >       [ant] calling target(s) [create_db] in build file > /Users/admin/Downloads/services/services/build.xml > parsing buildfile /Users/admin/Downloads/services/services/build.xml with > URI = file:/Users/admin/Downloads/services/services/build.xml > Project base dir set to: /Users/admin/Downloads/services/services >  [property] Loading /Users/admin/Downloads/services/build.properties > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.DB_PASSWORD_NUXEO" has not been set > Property "env.DB_PASSWORD" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.DB_USER" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.DB_PASSWORD_CSPACE" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set > Property "env.CSPACE_JEESERVER_HOME" has not been set >       [ant] Entering /Users/admin/Downloads/services/services/build.xml... > Build sequence for target(s) `create_db' is [create_db] > Complete build sequence is [create_db, undeploy, clean-windows, > install-unix, install-windows, install, deploy, doc-windows, package-unix, > package-windows, package, dist_installer, import, copy-dependencies-reports, > test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix, > gen_ddl, test, generate-dependencies-reports, ] > > create_db: > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X >       [ant] calling target(s) [create_db] in build file > /Users/admin/Downloads/services/services/authentication/build.xml > parsing buildfile > /Users/admin/Downloads/services/services/authentication/build.xml with URI = > file:/Users/admin/Downloads/services/services/authentication/build.xml > Project base dir set to: > /Users/admin/Downloads/services/services/authentication >  [property] Loading Environment env. >  [property] Loading /Users/admin/Downloads/services/build.properties >       [ant] Entering > /Users/admin/Downloads/services/services/authentication/build.xml... > Build sequence for target(s) `create_db' is [create_db] > Complete build sequence is [create_db, undeploy, clean-windows, > install-unix, install-windows, install, deploy, package-unix, > package-windows, package, test-windows, dist, clean-unix, clean, test-unix, > gen_ddl, test, ] > > create_db: > Detected Java version: 1.6 in: > /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > Detected OS: Mac OS X >       [ant] calling target(s) [create_db] in build file > /Users/admin/Downloads/services/services/authentication/pstore/build.xml > parsing buildfile > /Users/admin/Downloads/services/services/authentication/pstore/build.xml > with URI = > file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml > Project base dir set to: > /Users/admin/Downloads/services/services/authentication/pstore >  [property] Loading Environment env. >  [property] Loading /Users/admin/Downloads/services/build.properties >       [ant] Entering > /Users/admin/Downloads/services/services/authentication/pstore/build.xml... > Build sequence for target(s) `create_db' is [create_db] > Complete build sequence is [create_db, check.db.scripts.deploy.dir, > undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows, > install, deploy, package-unix, package-windows, package, gen_ddl-unix, > test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, > gen_ddl, test, ] > > create_db: >       [sql] connecting to jdbc:postgresql://localhost:5432/cspace >       [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >       [ant] Exiting > /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >       [ant] Exiting > /Users/admin/Downloads/services/services/authentication/build.xml. >       [ant] Exiting /Users/admin/Downloads/services/services/build.xml. > > BUILD FAILED > /Users/admin/Downloads/services/build.xml:210: The following error occurred > while executing this line: > /Users/admin/Downloads/services/services/build.xml:136: The following error > occurred while executing this line: > /Users/admin/Downloads/services/services/authentication/build.xml:117: The > following error occurred while executing this line: > /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: > org.postgresql.util.PSQLException: FATAL: password authentication failed for > user "cspace" > at > org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) > at > org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) > at > org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) > at > org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) > at > org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) > at > org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) > at > org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) > at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) > at org.postgresql.Driver.makeConnection(Driver.java:393) > at org.postgresql.Driver.connect(Driver.java:267) > at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) > at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) > at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:390) > at org.apache.tools.ant.Target.performTasks(Target.java:411) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) > at org.apache.tools.ant.Project.executeTarget(Project.java:1368) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1251) > at org.apache.tools.ant.Main.runBuild(Main.java:809) > at org.apache.tools.ant.Main.startAnt(Main.java:217) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) > > Total time: 1 second > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Sent: Friday, May 25, 2012 9:32:47 AM > > Subject: Re: [Talk] space user password error > > Hi Al, > >    Many thanks - it's terrific you resolved this in this way!  And > your note on the Talk list will help others who may run into the same > situation. > >   (Until reading your note, I wasn't aware of the ENCRYPTED option for > passwords in PostgreSQL: > http://www.postgresql.org/docs/9.1/static/sql-createuser.html). > > Best, > Aron > > > On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >> Hi Aron, >> >> Thanks for getting back to me so quickly. Shame on me - "space" was my >> typo. >> >> We did reset the password for the PostgreSQL >> >> database user named "cspace" to match the value of that password in >> $DB_PASSWORD_CSPACE, but were still getting error messages. >> >> We then tried resetting the password as unencrypted, and that seemed to >> resolve the authentication issue.  So I believe we are set. >> >> Thanks for your help! >> >> Al >> >> Al Bersch >> Digital Project Coordinator >> Oakland Museum of California >> 1000 Oak Street, Oakland, CA 94607 >> abersch@museumca.org >> 510-318-8468 >> ________________________________ >> From: "Aron Roberts" <aron@socrates.berkeley.edu> >> To: "Al Bersch" <abersch@museumca.org> >> Cc: talk@lists.collectionspace.org >> Sent: Thursday, May 24, 2012 5:03:32 PM >> Subject: Re: [Talk] space user password error >> >> >> Hi Al, >> >>   Does that message really say, "password authentication failed for >> user "space"' - rather than 'user "cspace"'? >> >>   The script you're running when you type "ant create_db import" (an >> Ant 'buildfile'), uses the value of a variable called >> "${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in >> the file /Users/admin/Downloads/services/build.properties.  If you're >> truly seeing "space" in the error message, you might first check the >> value of 'db.cspace.user' in build.properties, and make sure it's >> "cspace", not "space". >> >>   You can also run "ant create_db import -v" (note the '-v" flag to >> generate very verbose messages), and look at the value of >> db.cspace.user right before the script terminates in that error. >> >>   Second, assuming that you are using 'cspace' as your database user >> name, you'll want to check that the password for the 'cspace' user >> used by this script, which attempts to log into the database as that >> user - which in turn is the password you've set in the >> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >> password for the PostgreSQL database user named "cspace".  In other >> words, you might try resetting the password for the PostgreSQL >> database user named "cspace" to match the value of that password in >> $DB_PASSWORD_CSPACE. >> >>   http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >> >>   * Log into PostgreSQL as an administrative user, such as the >> 'postgresql' user. >>   * Enter: >>   ALTER ROLE cspace WITH PASSWORD >> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >> >> Aron Roberts >> UC Berkeley >> >> >> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hello, >>> >>> After following the steps for creating our tenant we get an error when we >>> run the ant create_db import. With the following error: >>> >>> >>>  /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "space". >>> >>> We believe we verified the password is set to what our environment >>> variable >>> is set to: $DB_PASSWORD_CSPACE. >>> >>> We would appreciate any ideas/advice! >>> >>> Thank you! >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
AR
Aron Roberts
Fri, May 25, 2012 8:22 PM

Al,

You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir="."> <!-- environment should be declared first --> <property environment="env" /> <target name="test-env-vars"> <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> </target> </project>

and then invoke it, from that directory, via 'ant'.  This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables.  If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo the
environment variables. We continue to get the message that the cspace user
password can't be authenticated. We verified that the password is set in the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
      [sql] connecting to jdbc:postgresql://localhost:5432
      [sql] Loading org.postgresql.Driver using AntClassLoader with
classpath
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
      [sql] Executing resource:
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
      [sql] SQL:  DROP database IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP database IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:   DROP USER IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS reader
      [sql] 0 rows affected
      [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN
      [sql] 0 rows affected
      [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
      [sql] 0 rows affected
      [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
      [sql] 0 rows affected
      [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader
      [sql] 0 rows affected
      [sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
 [property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
      [ant] Entering /Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows, package-unix,
package-windows, package, dist_installer, import, copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean, test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =
file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
      [sql] connecting to jdbc:postgresql://localhost:5432/cspace
      [sql] Loading org.postgresql.Driver using a cached AntClassLoader.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
      [ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117: The
following error occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed for
user "cspace"
at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

   Many thanks - it's terrific you resolved this in this way!  And
your note on the Talk list will help others who may run into the same
situation.

  (Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue.  So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

  Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

  The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties.  If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

  You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

  Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace".  In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

  http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  * Log into PostgreSQL as an administrative user, such as the
'postgresql' user.
  * Enter:
  ALTER ROLE cspace WITH PASSWORD
'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when we
run the ant create_db import. With the following error:

 /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Al, You can try pasting this simple Ant buildfile into a file named "build.xml" in some temporary directory: <project name="test-env-vars" default="test-env-vars" basedir="."> <!-- environment should be declared first --> <property environment="env" /> <target name="test-env-vars"> <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> </target> </project> and then invoke it, from that directory, via 'ant'. This will let you know - in a simple way, without any filtering - whether Ant can 'see' your environment variables. If it succeeds at finding the values in your environment variables, you'll see something like: test-env-vars: [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 BUILD SUCCESSFUL and if it fails, you'll see: test-env-vars: [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} BUILD SUCCESSFUL If it can't find the values in your environment variables, then you might look into that discussion thread in that Nabble-archived post, included in a previous message on this topic, to see if any of the issues mentioned there might apply in your situation. Aron On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez <jmartinez@movingimage.us> wrote: > Hi Al, > > Just a quick thought, are you using special characters or punctuation > in your cspace password? I once had an issue using dollar signs $ in a > postgresql password. > > - Jesse > > On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >> Hi Aron and talk, >> >> It looks like I spoke too soon. We are still getting a build failed message >> (verbose version below) and it appears that our environment variables are >> not being recognized, even though we can find the right path if we echo the >> environment variables. We continue to get the message that the cspace user >> password can't be authenticated. We verified that the password is set in the >> environment variable. We can echo and it kicks back the password. Once we >> set the cspace user password, we can log into postgres with that user >> password, until we run the script and after that we can't log in until we >> reset the password. >> >> Any thoughts? Much appreciated! >> >> Thanks, >> >> Al >> >> museumcatest:services admin$ ant create_db import -v >> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >> Trying the default build file: build.xml >> Buildfile: /Users/admin/Downloads/services/build.xml >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >> file:/Users/admin/Downloads/services/build.xml >> Project base dir set to: /Users/admin/Downloads/services >> parsing buildfile >> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >> URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >> from a zip file >>  [property] Loading Environment env. >>  [property] Loading /Users/admin/Downloads/services/build.properties >> Build sequence for target(s) `create_db' is [create_base_db, create_db] >> Complete build sequence is [create_base_db, create_db, undeploy, >> clean-windows, checkvars, install-unix, install-windows, install, >> setup_initdb.sql, deploy, package-unix, package-windows, package, >> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >> >> create_base_db: >>       [sql] connecting to jdbc:postgresql://localhost:5432 >>       [sql] Loading org.postgresql.Driver using AntClassLoader with >> classpath >> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >>       [sql] Executing resource: >> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >>       [sql] SQL:  DROP database IF EXISTS cspace >>       [sql] 0 rows affected >>       [sql] SQL:  DROP database IF EXISTS nuxeo >>       [sql] 0 rows affected >>       [sql] SQL:   DROP USER IF EXISTS nuxeo >>       [sql] 0 rows affected >>       [sql] SQL:  DROP USER IF EXISTS cspace >>       [sql] 0 rows affected >>       [sql] SQL:  DROP USER IF EXISTS reader >>       [sql] 0 rows affected >>       [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD >> 'your_nuxeo_database_user_password_here' LOGIN >>       [sql] 0 rows affected >>       [sql] SQL:  CREATE ROLE cspace WITH PASSWORD >> 'your_cspace_database_user_password_here' LOGIN >>       [sql] 0 rows affected >>       [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN >>       [sql] 0 rows affected >>       [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >>       [sql] 0 rows affected >>       [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >>       [sql] 0 rows affected >>       [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader >>       [sql] 0 rows affected >>       [sql] 11 of 11 SQL statements executed successfully >> >> create_db: >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >>       [ant] calling target(s) [create_db] in build file >> /Users/admin/Downloads/services/services/build.xml >> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >> URI = file:/Users/admin/Downloads/services/services/build.xml >> Project base dir set to: /Users/admin/Downloads/services/services >>  [property] Loading /Users/admin/Downloads/services/build.properties >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.DB_PASSWORD_NUXEO" has not been set >> Property "env.DB_PASSWORD" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.DB_USER" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.DB_PASSWORD_CSPACE" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >>       [ant] Entering /Users/admin/Downloads/services/services/build.xml... >> Build sequence for target(s) `create_db' is [create_db] >> Complete build sequence is [create_db, undeploy, clean-windows, >> install-unix, install-windows, install, deploy, doc-windows, package-unix, >> package-windows, package, dist_installer, import, copy-dependencies-reports, >> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix, >> gen_ddl, test, generate-dependencies-reports, ] >> >> create_db: >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >>       [ant] calling target(s) [create_db] in build file >> /Users/admin/Downloads/services/services/authentication/build.xml >> parsing buildfile >> /Users/admin/Downloads/services/services/authentication/build.xml with URI = >> file:/Users/admin/Downloads/services/services/authentication/build.xml >> Project base dir set to: >> /Users/admin/Downloads/services/services/authentication >>  [property] Loading Environment env. >>  [property] Loading /Users/admin/Downloads/services/build.properties >>       [ant] Entering >> /Users/admin/Downloads/services/services/authentication/build.xml... >> Build sequence for target(s) `create_db' is [create_db] >> Complete build sequence is [create_db, undeploy, clean-windows, >> install-unix, install-windows, install, deploy, package-unix, >> package-windows, package, test-windows, dist, clean-unix, clean, test-unix, >> gen_ddl, test, ] >> >> create_db: >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >>       [ant] calling target(s) [create_db] in build file >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >> parsing buildfile >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >> with URI = >> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >> Project base dir set to: >> /Users/admin/Downloads/services/services/authentication/pstore >>  [property] Loading Environment env. >>  [property] Loading /Users/admin/Downloads/services/build.properties >>       [ant] Entering >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >> Build sequence for target(s) `create_db' is [create_db] >> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >> undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows, >> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >> gen_ddl, test, ] >> >> create_db: >>       [sql] connecting to jdbc:postgresql://localhost:5432/cspace >>       [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >>       [ant] Exiting >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >>       [ant] Exiting >> /Users/admin/Downloads/services/services/authentication/build.xml. >>       [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >> >> BUILD FAILED >> /Users/admin/Downloads/services/build.xml:210: The following error occurred >> while executing this line: >> /Users/admin/Downloads/services/services/build.xml:136: The following error >> occurred while executing this line: >> /Users/admin/Downloads/services/services/authentication/build.xml:117: The >> following error occurred while executing this line: >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >> org.postgresql.util.PSQLException: FATAL: password authentication failed for >> user "cspace" >> at >> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >> at >> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >> at >> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >> at >> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >> at >> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >> at >> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >> at >> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >> at org.postgresql.Driver.makeConnection(Driver.java:393) >> at org.postgresql.Driver.connect(Driver.java:267) >> at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >> at >> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.Main.runBuild(Main.java:809) >> at org.apache.tools.ant.Main.startAnt(Main.java:217) >> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >> >> Total time: 1 second >> >> Al Bersch >> Digital Project Coordinator >> Oakland Museum of California >> 1000 Oak Street, Oakland, CA 94607 >> abersch@museumca.org >> 510-318-8468 >> ________________________________ >> From: "Aron Roberts" <aron@socrates.berkeley.edu> >> To: "Al Bersch" <abersch@museumca.org> >> Sent: Friday, May 25, 2012 9:32:47 AM >> >> Subject: Re: [Talk] space user password error >> >> Hi Al, >> >>    Many thanks - it's terrific you resolved this in this way!  And >> your note on the Talk list will help others who may run into the same >> situation. >> >>   (Until reading your note, I wasn't aware of the ENCRYPTED option for >> passwords in PostgreSQL: >> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >> >> Best, >> Aron >> >> >> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron, >>> >>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>> typo. >>> >>> We did reset the password for the PostgreSQL >>> >>> database user named "cspace" to match the value of that password in >>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>> >>> We then tried resetting the password as unencrypted, and that seemed to >>> resolve the authentication issue.  So I believe we are set. >>> >>> Thanks for your help! >>> >>> Al >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Cc: talk@lists.collectionspace.org >>> Sent: Thursday, May 24, 2012 5:03:32 PM >>> Subject: Re: [Talk] space user password error >>> >>> >>> Hi Al, >>> >>>   Does that message really say, "password authentication failed for >>> user "space"' - rather than 'user "cspace"'? >>> >>>   The script you're running when you type "ant create_db import" (an >>> Ant 'buildfile'), uses the value of a variable called >>> "${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in >>> the file /Users/admin/Downloads/services/build.properties.  If you're >>> truly seeing "space" in the error message, you might first check the >>> value of 'db.cspace.user' in build.properties, and make sure it's >>> "cspace", not "space". >>> >>>   You can also run "ant create_db import -v" (note the '-v" flag to >>> generate very verbose messages), and look at the value of >>> db.cspace.user right before the script terminates in that error. >>> >>>   Second, assuming that you are using 'cspace' as your database user >>> name, you'll want to check that the password for the 'cspace' user >>> used by this script, which attempts to log into the database as that >>> user - which in turn is the password you've set in the >>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>> password for the PostgreSQL database user named "cspace".  In other >>> words, you might try resetting the password for the PostgreSQL >>> database user named "cspace" to match the value of that password in >>> $DB_PASSWORD_CSPACE. >>> >>>   http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>> >>>   * Log into PostgreSQL as an administrative user, such as the >>> 'postgresql' user. >>>   * Enter: >>>   ALTER ROLE cspace WITH PASSWORD >>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>> >>> Aron Roberts >>> UC Berkeley >>> >>> >>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>> Hello, >>>> >>>> After following the steps for creating our tenant we get an error when we >>>> run the ant create_db import. With the following error: >>>> >>>> >>>>  /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>>> for >>>> user "space". >>>> >>>> We believe we verified the password is set to what our environment >>>> variable >>>> is set to: $DB_PASSWORD_CSPACE. >>>> >>>> We would appreciate any ideas/advice! >>>> >>>> Thank you! >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> >>>> _______________________________________________ >>>> Talk mailing list >>>> Talk@lists.collectionspace.org >>>> >>>> >>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>> >>> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
AB
Al Bersch
Fri, May 25, 2012 9:21 PM

Hi Aron, Jesse,

Thanks for getting back. We ended up hard-coding our password to the variable, and that worked. So ant create_db import ran successfully. However, I still want to run the Ant buildfile you sent to try to locate the problem the environment variables.

We started the servers, but can't find our tenant, which leaves us with more questions (and thanks again for all your help). What should we have in our Tables, and what should we have listed for Tenants? After we created our tenant, our tenant table is showing up empty.

Also, can someone share an example of a host file (we didn't put in a DNS, just used localhost)? It would be great to see what it is supposed to look like.

Thank you,

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468
----- Original Message -----

From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 1:22:50 PM
Subject: Re: [Talk] space user password error

Al,

You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir="."> <!-- environment should be declared first --> <property environment="env" /> <target name="test-env-vars"> <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> </target> </project>

and then invoke it, from that directory, via 'ant'. This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables. If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo the
environment variables. We continue to get the message that the cspace user
password can't be authenticated. We verified that the password is set in the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
[sql] connecting to jdbc:postgresql://localhost:5432
[sql] Loading org.postgresql.Driver using AntClassLoader with
classpath
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
[sql] Executing resource:
/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
[sql] SQL: DROP database IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP database IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS reader
[sql] 0 rows affected
[sql] SQL: CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
[sql] 0 rows affected
[sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader
[sql] 0 rows affected
[sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
[property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
[ant] Entering /Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows, package-unix,
package-windows, package, dist_installer, import, copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean, test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =
file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering
/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
[sql] connecting to jdbc:postgresql://localhost:5432/cspace
[sql] Loading org.postgresql.Driver using a cached AntClassLoader.
[ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
[ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
[ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117: The
following error occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed for
user "cspace"
at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

Many thanks - it's terrific you resolved this in this way! And
your note on the Talk list will help others who may run into the same
situation.

(Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue. So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}". That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties. If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace". In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  • Log into PostgreSQL as an administrative user, such as the
    'postgresql' user.
  • Enter:
    ALTER ROLE cspace WITH PASSWORD
    'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when we
run the ant create_db import. With the following error:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Aron, Jesse, Thanks for getting back. We ended up hard-coding our password to the variable, and that worked. So ant create_db import ran successfully. However, I still want to run the Ant buildfile you sent to try to locate the problem the environment variables. We started the servers, but can't find our tenant, which leaves us with more questions (and thanks again for all your help). What should we have in our Tables, and what should we have listed for Tenants? After we created our tenant, our tenant table is showing up empty. Also, can someone share an example of a host file (we didn't put in a DNS, just used localhost)? It would be great to see what it is supposed to look like. Thank you, Al Bersch Digital Project Coordinator Oakland Museum of California 1000 Oak Street, Oakland, CA 94607 abersch@museumca.org 510-318-8468 ----- Original Message ----- From: "Aron Roberts" <aron@socrates.berkeley.edu> To: "Al Bersch" <abersch@museumca.org> Cc: talk@lists.collectionspace.org Sent: Friday, May 25, 2012 1:22:50 PM Subject: Re: [Talk] space user password error Al, You can try pasting this simple Ant buildfile into a file named "build.xml" in some temporary directory: <project name="test-env-vars" default="test-env-vars" basedir="."> <!-- environment should be declared first --> <property environment="env" /> <target name="test-env-vars"> <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> </target> </project> and then invoke it, from that directory, via 'ant'. This will let you know - in a simple way, without any filtering - whether Ant can 'see' your environment variables. If it succeeds at finding the values in your environment variables, you'll see something like: test-env-vars: [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 BUILD SUCCESSFUL and if it fails, you'll see: test-env-vars: [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} BUILD SUCCESSFUL If it can't find the values in your environment variables, then you might look into that discussion thread in that Nabble-archived post, included in a previous message on this topic, to see if any of the issues mentioned there might apply in your situation. Aron On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez <jmartinez@movingimage.us> wrote: > Hi Al, > > Just a quick thought, are you using special characters or punctuation > in your cspace password? I once had an issue using dollar signs $ in a > postgresql password. > > - Jesse > > On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >> Hi Aron and talk, >> >> It looks like I spoke too soon. We are still getting a build failed message >> (verbose version below) and it appears that our environment variables are >> not being recognized, even though we can find the right path if we echo the >> environment variables. We continue to get the message that the cspace user >> password can't be authenticated. We verified that the password is set in the >> environment variable. We can echo and it kicks back the password. Once we >> set the cspace user password, we can log into postgres with that user >> password, until we run the script and after that we can't log in until we >> reset the password. >> >> Any thoughts? Much appreciated! >> >> Thanks, >> >> Al >> >> museumcatest:services admin$ ant create_db import -v >> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >> Trying the default build file: build.xml >> Buildfile: /Users/admin/Downloads/services/build.xml >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >> file:/Users/admin/Downloads/services/build.xml >> Project base dir set to: /Users/admin/Downloads/services >> parsing buildfile >> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >> URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >> from a zip file >> [property] Loading Environment env. >> [property] Loading /Users/admin/Downloads/services/build.properties >> Build sequence for target(s) `create_db' is [create_base_db, create_db] >> Complete build sequence is [create_base_db, create_db, undeploy, >> clean-windows, checkvars, install-unix, install-windows, install, >> setup_initdb.sql, deploy, package-unix, package-windows, package, >> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >> >> create_base_db: >> [sql] connecting to jdbc:postgresql://localhost:5432 >> [sql] Loading org.postgresql.Driver using AntClassLoader with >> classpath >> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >> [sql] Executing resource: >> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >> [sql] SQL: DROP database IF EXISTS cspace >> [sql] 0 rows affected >> [sql] SQL: DROP database IF EXISTS nuxeo >> [sql] 0 rows affected >> [sql] SQL: DROP USER IF EXISTS nuxeo >> [sql] 0 rows affected >> [sql] SQL: DROP USER IF EXISTS cspace >> [sql] 0 rows affected >> [sql] SQL: DROP USER IF EXISTS reader >> [sql] 0 rows affected >> [sql] SQL: CREATE ROLE nuxeo WITH PASSWORD >> 'your_nuxeo_database_user_password_here' LOGIN >> [sql] 0 rows affected >> [sql] SQL: CREATE ROLE cspace WITH PASSWORD >> 'your_cspace_database_user_password_here' LOGIN >> [sql] 0 rows affected >> [sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN >> [sql] 0 rows affected >> [sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >> [sql] 0 rows affected >> [sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >> [sql] 0 rows affected >> [sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader >> [sql] 0 rows affected >> [sql] 11 of 11 SQL statements executed successfully >> >> create_db: >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >> [ant] calling target(s) [create_db] in build file >> /Users/admin/Downloads/services/services/build.xml >> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >> URI = file:/Users/admin/Downloads/services/services/build.xml >> Project base dir set to: /Users/admin/Downloads/services/services >> [property] Loading /Users/admin/Downloads/services/build.properties >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.DB_PASSWORD_NUXEO" has not been set >> Property "env.DB_PASSWORD" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.DB_USER" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.DB_PASSWORD_CSPACE" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> Property "env.CSPACE_JEESERVER_HOME" has not been set >> [ant] Entering /Users/admin/Downloads/services/services/build.xml... >> Build sequence for target(s) `create_db' is [create_db] >> Complete build sequence is [create_db, undeploy, clean-windows, >> install-unix, install-windows, install, deploy, doc-windows, package-unix, >> package-windows, package, dist_installer, import, copy-dependencies-reports, >> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, test-unix, >> gen_ddl, test, generate-dependencies-reports, ] >> >> create_db: >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >> [ant] calling target(s) [create_db] in build file >> /Users/admin/Downloads/services/services/authentication/build.xml >> parsing buildfile >> /Users/admin/Downloads/services/services/authentication/build.xml with URI = >> file:/Users/admin/Downloads/services/services/authentication/build.xml >> Project base dir set to: >> /Users/admin/Downloads/services/services/authentication >> [property] Loading Environment env. >> [property] Loading /Users/admin/Downloads/services/build.properties >> [ant] Entering >> /Users/admin/Downloads/services/services/authentication/build.xml... >> Build sequence for target(s) `create_db' is [create_db] >> Complete build sequence is [create_db, undeploy, clean-windows, >> install-unix, install-windows, install, deploy, package-unix, >> package-windows, package, test-windows, dist, clean-unix, clean, test-unix, >> gen_ddl, test, ] >> >> create_db: >> Detected Java version: 1.6 in: >> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >> Detected OS: Mac OS X >> [ant] calling target(s) [create_db] in build file >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >> parsing buildfile >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >> with URI = >> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >> Project base dir set to: >> /Users/admin/Downloads/services/services/authentication/pstore >> [property] Loading Environment env. >> [property] Loading /Users/admin/Downloads/services/build.properties >> [ant] Entering >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >> Build sequence for target(s) `create_db' is [create_db] >> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >> undeploy, clean-windows, setup_hibernate.cfg, install-unix, install-windows, >> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >> gen_ddl, test, ] >> >> create_db: >> [sql] connecting to jdbc:postgresql://localhost:5432/cspace >> [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >> [ant] Exiting >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >> [ant] Exiting >> /Users/admin/Downloads/services/services/authentication/build.xml. >> [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >> >> BUILD FAILED >> /Users/admin/Downloads/services/build.xml:210: The following error occurred >> while executing this line: >> /Users/admin/Downloads/services/services/build.xml:136: The following error >> occurred while executing this line: >> /Users/admin/Downloads/services/services/authentication/build.xml:117: The >> following error occurred while executing this line: >> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >> org.postgresql.util.PSQLException: FATAL: password authentication failed for >> user "cspace" >> at >> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >> at >> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >> at >> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >> at >> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >> at >> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >> at >> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >> at >> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >> at org.postgresql.Driver.makeConnection(Driver.java:393) >> at org.postgresql.Driver.connect(Driver.java:267) >> at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> at org.apache.tools.ant.Task.perform(Task.java:348) >> at org.apache.tools.ant.Target.execute(Target.java:390) >> at org.apache.tools.ant.Target.performTasks(Target.java:411) >> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >> at >> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >> at org.apache.tools.ant.Main.runBuild(Main.java:809) >> at org.apache.tools.ant.Main.startAnt(Main.java:217) >> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >> >> Total time: 1 second >> >> Al Bersch >> Digital Project Coordinator >> Oakland Museum of California >> 1000 Oak Street, Oakland, CA 94607 >> abersch@museumca.org >> 510-318-8468 >> ________________________________ >> From: "Aron Roberts" <aron@socrates.berkeley.edu> >> To: "Al Bersch" <abersch@museumca.org> >> Sent: Friday, May 25, 2012 9:32:47 AM >> >> Subject: Re: [Talk] space user password error >> >> Hi Al, >> >> Many thanks - it's terrific you resolved this in this way! And >> your note on the Talk list will help others who may run into the same >> situation. >> >> (Until reading your note, I wasn't aware of the ENCRYPTED option for >> passwords in PostgreSQL: >> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >> >> Best, >> Aron >> >> >> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron, >>> >>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>> typo. >>> >>> We did reset the password for the PostgreSQL >>> >>> database user named "cspace" to match the value of that password in >>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>> >>> We then tried resetting the password as unencrypted, and that seemed to >>> resolve the authentication issue. So I believe we are set. >>> >>> Thanks for your help! >>> >>> Al >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Cc: talk@lists.collectionspace.org >>> Sent: Thursday, May 24, 2012 5:03:32 PM >>> Subject: Re: [Talk] space user password error >>> >>> >>> Hi Al, >>> >>> Does that message really say, "password authentication failed for >>> user "space"' - rather than 'user "cspace"'? >>> >>> The script you're running when you type "ant create_db import" (an >>> Ant 'buildfile'), uses the value of a variable called >>> "${db.cspace.user}". That value is set (hard-coded) to 'cspace' in >>> the file /Users/admin/Downloads/services/build.properties. If you're >>> truly seeing "space" in the error message, you might first check the >>> value of 'db.cspace.user' in build.properties, and make sure it's >>> "cspace", not "space". >>> >>> You can also run "ant create_db import -v" (note the '-v" flag to >>> generate very verbose messages), and look at the value of >>> db.cspace.user right before the script terminates in that error. >>> >>> Second, assuming that you are using 'cspace' as your database user >>> name, you'll want to check that the password for the 'cspace' user >>> used by this script, which attempts to log into the database as that >>> user - which in turn is the password you've set in the >>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>> password for the PostgreSQL database user named "cspace". In other >>> words, you might try resetting the password for the PostgreSQL >>> database user named "cspace" to match the value of that password in >>> $DB_PASSWORD_CSPACE. >>> >>> http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>> >>> * Log into PostgreSQL as an administrative user, such as the >>> 'postgresql' user. >>> * Enter: >>> ALTER ROLE cspace WITH PASSWORD >>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>> >>> Aron Roberts >>> UC Berkeley >>> >>> >>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>> Hello, >>>> >>>> After following the steps for creating our tenant we get an error when we >>>> run the ant create_db import. With the following error: >>>> >>>> >>>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>>> for >>>> user "space". >>>> >>>> We believe we verified the password is set to what our environment >>>> variable >>>> is set to: $DB_PASSWORD_CSPACE. >>>> >>>> We would appreciate any ideas/advice! >>>> >>>> Thank you! >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> >>>> _______________________________________________ >>>> Talk mailing list >>>> Talk@lists.collectionspace.org >>>> >>>> >>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>> >>> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
AR
Aron Roberts
Fri, May 25, 2012 9:33 PM

Al,

Thanks much for this update!

There are a number of environment variables that must be available
to Ant in order to successfully build the CollectionSpace services
layer, create and populate databases, and import roles, permissions,
etc.  If any of those is missing, you may not have a completely
working CollectionSpace system.

It's likely to be more productive to resolve the environment
variables problem once and for all, and get a clean installation, then
to try to resolve individual problems caused by their absence, one
after the other.  That will, I'm concerned, be more consuming of your
time than getting an environment in place where the installation steps
'just work.'

Just to start out, is it the case that:

  • The installation is occurring on a Unix-like system (Linux, Mac OS
    X, or even a Unix variant)?
  • There are entries in the appropriate shell configuration file to
    export these environment variables, so that they're present in every
    new instance of your command shell?
  • When you open a new shell / terminal window, you can type the
    command 'env', and, in the output from that command, see each and
    every one of the environment variables listed in the "Setting Up
    CollectionSpace" section of the various installation documents, such
    as http://wiki.collectionspace.org/x/1oHyBQ ?

Aron

On Fri, May 25, 2012 at 2:21 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron, Jesse,

Thanks for getting back. We ended up hard-coding our password to the
variable, and that worked. So ant create_db import ran successfully.
However, I still want to run the Ant buildfile you sent to try to locate the
problem the environment variables.

 We started the servers, but can't find our tenant, which leaves us with
more questions (and thanks again for all your help). What should we have in
our Tables, and what should we have listed for Tenants? After we created our
tenant, our tenant table is showing up empty.

Also, can someone share an example of a host file (we didn't put in a DNS,
just used localhost)? It would be great to see what it is supposed to look
like.

Thank you,

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 1:22:50 PM

Subject: Re: [Talk] space user password error

Al,

  You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir=".">     <!-- environment should be declared first -->     <property environment="env" />     <target name="test-env-vars">         <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/>     </target> </project>

and then invoke it, from that directory, via 'ant'.  This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables.  If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
     [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
     [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

  If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed
message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo
the
environment variables. We continue to get the message that the cspace
user
password can't be authenticated. We verified that the password is set in
the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI =
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
      [sql] connecting to jdbc:postgresql://localhost:5432
      [sql] Loading org.postgresql.Driver using AntClassLoader with
classpath

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
      [sql] Executing resource:

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
      [sql] SQL:  DROP database IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP database IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:   DROP USER IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS reader
      [sql] 0 rows affected
      [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN
      [sql] 0 rows affected
      [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
      [sql] 0 rows affected
      [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
      [sql] 0 rows affected
      [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader
      [sql] 0 rows affected
      [sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
 [property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
      [ant] Entering
/Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows,
package-unix,
package-windows, package, dist_installer, import,
copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean,
test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with
URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean,
test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =

file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering

/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix,
install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
      [sql] connecting to jdbc:postgresql://localhost:5432/cspace
      [sql] Loading org.postgresql.Driver using a cached AntClassLoader.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
      [ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error
occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following
error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117:
The
following error occurred while executing this line:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "cspace"
at

org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at

org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at

org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at

org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at

org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at

org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at

org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at

org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

   Many thanks - it's terrific you resolved this in this way!  And
your note on the Talk list will help others who may run into the same
situation.

  (Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue.  So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

  Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

  The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties.  If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

  You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

  Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace".  In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

  http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  * Log into PostgreSQL as an administrative user, such as the
'postgresql' user.
  * Enter:
  ALTER ROLE cspace WITH PASSWORD
'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when
we
run the ant create_db import. With the following error:

 /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication
failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Al, Thanks much for this update! There are a number of environment variables that must be available to Ant in order to successfully build the CollectionSpace services layer, create and populate databases, and import roles, permissions, etc. If any of those is missing, you may not have a completely working CollectionSpace system. It's likely to be more productive to resolve the environment variables problem once and for all, and get a clean installation, then to try to resolve individual problems caused by their absence, one after the other. That will, I'm concerned, be more consuming of your time than getting an environment in place where the installation steps 'just work.' Just to start out, is it the case that: * The installation is occurring on a Unix-like system (Linux, Mac OS X, or even a Unix variant)? * There are entries in the appropriate shell configuration file to export these environment variables, so that they're present in every new instance of your command shell? * When you open a new shell / terminal window, you can type the command 'env', and, in the output from that command, see each and every one of the environment variables listed in the "Setting Up CollectionSpace" section of the various installation documents, such as http://wiki.collectionspace.org/x/1oHyBQ ? Aron On Fri, May 25, 2012 at 2:21 PM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron, Jesse, > > Thanks for getting back. We ended up hard-coding our password to the > variable, and that worked. So ant create_db import ran successfully. > However, I still want to run the Ant buildfile you sent to try to locate the > problem the environment variables. > >  We started the servers, but can't find our tenant, which leaves us with > more questions (and thanks again for all your help). What should we have in > our Tables, and what should we have listed for Tenants? After we created our > tenant, our tenant table is showing up empty. > > Also, can someone share an example of a host file (we didn't put in a DNS, > just used localhost)? It would be great to see what it is supposed to look > like. > > Thank you, > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Cc: talk@lists.collectionspace.org > Sent: Friday, May 25, 2012 1:22:50 PM > > Subject: Re: [Talk] space user password error > > Al, > >   You can try pasting this simple Ant buildfile into a file named > "build.xml" in some temporary directory: > > <project name="test-env-vars" default="test-env-vars" basedir="."> >     <!-- environment should be declared first --> >     <property environment="env" /> >     <target name="test-env-vars"> >         <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> >     </target> > </project> > > and then invoke it, from that directory, via 'ant'.  This will let you > know - in a simple way, without any filtering - whether Ant can 'see' > your environment variables.  If it succeeds at finding the values in > your environment variables, you'll see something like: > > test-env-vars: >      [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 > BUILD SUCCESSFUL > > and if it fails, you'll see: > > test-env-vars: >      [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} > BUILD SUCCESSFUL > >   If it can't find the values in your environment variables, then you > might look into that discussion thread in that Nabble-archived post, > included in a previous message on this topic, to see if any of the > issues mentioned there might apply in your situation. > > Aron > > On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez > <jmartinez@movingimage.us> wrote: >> Hi Al, >> >> Just a quick thought, are you using special characters or punctuation >> in your cspace password? I once had an issue using dollar signs $ in a >> postgresql password. >> >> - Jesse >> >> On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron and talk, >>> >>> It looks like I spoke too soon. We are still getting a build failed >>> message >>> (verbose version below) and it appears that our environment variables are >>> not being recognized, even though we can find the right path if we echo >>> the >>> environment variables. We continue to get the message that the cspace >>> user >>> password can't be authenticated. We verified that the password is set in >>> the >>> environment variable. We can echo and it kicks back the password. Once we >>> set the cspace user password, we can log into postgres with that user >>> password, until we run the script and after that we can't log in until we >>> reset the password. >>> >>> Any thoughts? Much appreciated! >>> >>> Thanks, >>> >>> Al >>> >>> museumcatest:services admin$ ant create_db import -v >>> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >>> Trying the default build file: build.xml >>> Buildfile: /Users/admin/Downloads/services/build.xml >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >>> file:/Users/admin/Downloads/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services >>> parsing buildfile >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >>> URI = >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >>> from a zip file >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>> Build sequence for target(s) `create_db' is [create_base_db, create_db] >>> Complete build sequence is [create_base_db, create_db, undeploy, >>> clean-windows, checkvars, install-unix, install-windows, install, >>> setup_initdb.sql, deploy, package-unix, package-windows, package, >>> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >>> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >>> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >>> >>> create_base_db: >>>       [sql] connecting to jdbc:postgresql://localhost:5432 >>>       [sql] Loading org.postgresql.Driver using AntClassLoader with >>> classpath >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >>>       [sql] Executing resource: >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >>>       [sql] SQL:  DROP database IF EXISTS cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP database IF EXISTS nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:   DROP USER IF EXISTS nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP USER IF EXISTS cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP USER IF EXISTS reader >>>       [sql] 0 rows affected >>>       [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD >>> 'your_nuxeo_database_user_password_here' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE ROLE cspace WITH PASSWORD >>> 'your_cspace_database_user_password_here' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader >>>       [sql] 0 rows affected >>>       [sql] 11 of 11 SQL statements executed successfully >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/build.xml >>> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >>> URI = file:/Users/admin/Downloads/services/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services/services >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_NUXEO" has not been set >>> Property "env.DB_PASSWORD" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_USER" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_CSPACE" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>>       [ant] Entering >>> /Users/admin/Downloads/services/services/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, doc-windows, >>> package-unix, >>> package-windows, package, dist_installer, import, >>> copy-dependencies-reports, >>> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, generate-dependencies-reports, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/build.xml with >>> URI = >>> file:/Users/admin/Downloads/services/services/authentication/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>>       [ant] Entering >>> /Users/admin/Downloads/services/services/authentication/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, package-unix, >>> package-windows, package, test-windows, dist, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> with URI = >>> >>> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication/pstore >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>>       [ant] Entering >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >>> undeploy, clean-windows, setup_hibernate.cfg, install-unix, >>> install-windows, >>> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >>> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>>       [sql] connecting to jdbc:postgresql://localhost:5432/cspace >>>       [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >>>       [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >>>       [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/build.xml. >>>       [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >>> >>> BUILD FAILED >>> /Users/admin/Downloads/services/build.xml:210: The following error >>> occurred >>> while executing this line: >>> /Users/admin/Downloads/services/services/build.xml:136: The following >>> error >>> occurred while executing this line: >>> /Users/admin/Downloads/services/services/authentication/build.xml:117: >>> The >>> following error occurred while executing this line: >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "cspace" >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >>> at >>> >>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >>> at >>> >>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >>> at >>> >>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >>> at >>> >>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >>> at >>> >>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >>> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >>> at org.postgresql.Driver.makeConnection(Driver.java:393) >>> at org.postgresql.Driver.connect(Driver.java:267) >>> at >>> org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >>> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >>> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >>> at >>> >>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.Main.runBuild(Main.java:809) >>> at org.apache.tools.ant.Main.startAnt(Main.java:217) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >>> >>> Total time: 1 second >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Sent: Friday, May 25, 2012 9:32:47 AM >>> >>> Subject: Re: [Talk] space user password error >>> >>> Hi Al, >>> >>>    Many thanks - it's terrific you resolved this in this way!  And >>> your note on the Talk list will help others who may run into the same >>> situation. >>> >>>   (Until reading your note, I wasn't aware of the ENCRYPTED option for >>> passwords in PostgreSQL: >>> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >>> >>> Best, >>> Aron >>> >>> >>> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>>> Hi Aron, >>>> >>>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>>> typo. >>>> >>>> We did reset the password for the PostgreSQL >>>> >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>>> >>>> We then tried resetting the password as unencrypted, and that seemed to >>>> resolve the authentication issue.  So I believe we are set. >>>> >>>> Thanks for your help! >>>> >>>> Al >>>> >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> ________________________________ >>>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>>> To: "Al Bersch" <abersch@museumca.org> >>>> Cc: talk@lists.collectionspace.org >>>> Sent: Thursday, May 24, 2012 5:03:32 PM >>>> Subject: Re: [Talk] space user password error >>>> >>>> >>>> Hi Al, >>>> >>>>   Does that message really say, "password authentication failed for >>>> user "space"' - rather than 'user "cspace"'? >>>> >>>>   The script you're running when you type "ant create_db import" (an >>>> Ant 'buildfile'), uses the value of a variable called >>>> "${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in >>>> the file /Users/admin/Downloads/services/build.properties.  If you're >>>> truly seeing "space" in the error message, you might first check the >>>> value of 'db.cspace.user' in build.properties, and make sure it's >>>> "cspace", not "space". >>>> >>>>   You can also run "ant create_db import -v" (note the '-v" flag to >>>> generate very verbose messages), and look at the value of >>>> db.cspace.user right before the script terminates in that error. >>>> >>>>   Second, assuming that you are using 'cspace' as your database user >>>> name, you'll want to check that the password for the 'cspace' user >>>> used by this script, which attempts to log into the database as that >>>> user - which in turn is the password you've set in the >>>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>>> password for the PostgreSQL database user named "cspace".  In other >>>> words, you might try resetting the password for the PostgreSQL >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE. >>>> >>>>   http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>>> >>>>   * Log into PostgreSQL as an administrative user, such as the >>>> 'postgresql' user. >>>>   * Enter: >>>>   ALTER ROLE cspace WITH PASSWORD >>>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>>> >>>> Aron Roberts >>>> UC Berkeley >>>> >>>> >>>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>>> Hello, >>>>> >>>>> After following the steps for creating our tenant we get an error when >>>>> we >>>>> run the ant create_db import. With the following error: >>>>> >>>>> >>>>> >>>>>  /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>>> org.postgresql.util.PSQLException: FATAL: password authentication >>>>> failed >>>>> for >>>>> user "space". >>>>> >>>>> We believe we verified the password is set to what our environment >>>>> variable >>>>> is set to: $DB_PASSWORD_CSPACE. >>>>> >>>>> We would appreciate any ideas/advice! >>>>> >>>>> Thank you! >>>>> Al Bersch >>>>> Digital Project Coordinator >>>>> Oakland Museum of California >>>>> 1000 Oak Street, Oakland, CA 94607 >>>>> abersch@museumca.org >>>>> 510-318-8468 >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> >>>>> >>>>> >>>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>>> >>>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
AR
Aron Roberts
Fri, May 25, 2012 9:48 PM

From an 'out-of-the-box' CollectionSpace system:

  • psql -U postgres
  • (enter password for the 'postgres' database user)

At the PostgreSQL '#' prompt:

  • \c cspace
  • select * from tenants;

id |        created_at        |            name            | updated_at
----+----------------------------+-----------------------------+------------
2  | 2012-05-21 16:15:33.047057 | lifesci.collectionspace.org |
1  | 2012-05-21 16:15:33.050144 | core.collectionspace.org    |

On Fri, May 25, 2012 at 2:21 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron, Jesse,

Thanks for getting back. We ended up hard-coding our password to the
variable, and that worked. So ant create_db import ran successfully.
However, I still want to run the Ant buildfile you sent to try to locate the
problem the environment variables.

 We started the servers, but can't find our tenant, which leaves us with
more questions (and thanks again for all your help). What should we have in
our Tables, and what should we have listed for Tenants? After we created our
tenant, our tenant table is showing up empty.

Also, can someone share an example of a host file (we didn't put in a DNS,
just used localhost)? It would be great to see what it is supposed to look
like.

Thank you,

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 1:22:50 PM

Subject: Re: [Talk] space user password error

Al,

  You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir=".">     <!-- environment should be declared first -->     <property environment="env" />     <target name="test-env-vars">         <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/>     </target> </project>

and then invoke it, from that directory, via 'ant'.  This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables.  If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
     [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
     [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

  If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed
message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo
the
environment variables. We continue to get the message that the cspace
user
password can't be authenticated. We verified that the password is set in
the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI =
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
      [sql] connecting to jdbc:postgresql://localhost:5432
      [sql] Loading org.postgresql.Driver using AntClassLoader with
classpath

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
      [sql] Executing resource:

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
      [sql] SQL:  DROP database IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP database IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:   DROP USER IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS reader
      [sql] 0 rows affected
      [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN
      [sql] 0 rows affected
      [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
      [sql] 0 rows affected
      [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
      [sql] 0 rows affected
      [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader
      [sql] 0 rows affected
      [sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
 [property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
      [ant] Entering
/Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows,
package-unix,
package-windows, package, dist_installer, import,
copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean,
test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with
URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean,
test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =

file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering

/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix,
install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
      [sql] connecting to jdbc:postgresql://localhost:5432/cspace
      [sql] Loading org.postgresql.Driver using a cached AntClassLoader.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
      [ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error
occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following
error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117:
The
following error occurred while executing this line:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "cspace"
at

org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at

org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at

org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at

org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at

org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at

org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at

org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at

org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

   Many thanks - it's terrific you resolved this in this way!  And
your note on the Talk list will help others who may run into the same
situation.

  (Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue.  So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

  Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

  The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties.  If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

  You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

  Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace".  In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

  http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  * Log into PostgreSQL as an administrative user, such as the
'postgresql' user.
  * Enter:
  ALTER ROLE cspace WITH PASSWORD
'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when
we
run the ant create_db import. With the following error:

 /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication
failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

>From an 'out-of-the-box' CollectionSpace system: * psql -U postgres * (enter password for the 'postgres' database user) At the PostgreSQL '#' prompt: * \c cspace * select * from tenants; id | created_at | name | updated_at ----+----------------------------+-----------------------------+------------ 2 | 2012-05-21 16:15:33.047057 | lifesci.collectionspace.org | 1 | 2012-05-21 16:15:33.050144 | core.collectionspace.org | On Fri, May 25, 2012 at 2:21 PM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron, Jesse, > > Thanks for getting back. We ended up hard-coding our password to the > variable, and that worked. So ant create_db import ran successfully. > However, I still want to run the Ant buildfile you sent to try to locate the > problem the environment variables. > >  We started the servers, but can't find our tenant, which leaves us with > more questions (and thanks again for all your help). What should we have in > our Tables, and what should we have listed for Tenants? After we created our > tenant, our tenant table is showing up empty. > > Also, can someone share an example of a host file (we didn't put in a DNS, > just used localhost)? It would be great to see what it is supposed to look > like. > > Thank you, > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Cc: talk@lists.collectionspace.org > Sent: Friday, May 25, 2012 1:22:50 PM > > Subject: Re: [Talk] space user password error > > Al, > >   You can try pasting this simple Ant buildfile into a file named > "build.xml" in some temporary directory: > > <project name="test-env-vars" default="test-env-vars" basedir="."> >     <!-- environment should be declared first --> >     <property environment="env" /> >     <target name="test-env-vars"> >         <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> >     </target> > </project> > > and then invoke it, from that directory, via 'ant'.  This will let you > know - in a simple way, without any filtering - whether Ant can 'see' > your environment variables.  If it succeeds at finding the values in > your environment variables, you'll see something like: > > test-env-vars: >      [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 > BUILD SUCCESSFUL > > and if it fails, you'll see: > > test-env-vars: >      [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} > BUILD SUCCESSFUL > >   If it can't find the values in your environment variables, then you > might look into that discussion thread in that Nabble-archived post, > included in a previous message on this topic, to see if any of the > issues mentioned there might apply in your situation. > > Aron > > On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez > <jmartinez@movingimage.us> wrote: >> Hi Al, >> >> Just a quick thought, are you using special characters or punctuation >> in your cspace password? I once had an issue using dollar signs $ in a >> postgresql password. >> >> - Jesse >> >> On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron and talk, >>> >>> It looks like I spoke too soon. We are still getting a build failed >>> message >>> (verbose version below) and it appears that our environment variables are >>> not being recognized, even though we can find the right path if we echo >>> the >>> environment variables. We continue to get the message that the cspace >>> user >>> password can't be authenticated. We verified that the password is set in >>> the >>> environment variable. We can echo and it kicks back the password. Once we >>> set the cspace user password, we can log into postgres with that user >>> password, until we run the script and after that we can't log in until we >>> reset the password. >>> >>> Any thoughts? Much appreciated! >>> >>> Thanks, >>> >>> Al >>> >>> museumcatest:services admin$ ant create_db import -v >>> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >>> Trying the default build file: build.xml >>> Buildfile: /Users/admin/Downloads/services/build.xml >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >>> file:/Users/admin/Downloads/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services >>> parsing buildfile >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >>> URI = >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >>> from a zip file >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>> Build sequence for target(s) `create_db' is [create_base_db, create_db] >>> Complete build sequence is [create_base_db, create_db, undeploy, >>> clean-windows, checkvars, install-unix, install-windows, install, >>> setup_initdb.sql, deploy, package-unix, package-windows, package, >>> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >>> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >>> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >>> >>> create_base_db: >>>       [sql] connecting to jdbc:postgresql://localhost:5432 >>>       [sql] Loading org.postgresql.Driver using AntClassLoader with >>> classpath >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >>>       [sql] Executing resource: >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >>>       [sql] SQL:  DROP database IF EXISTS cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP database IF EXISTS nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:   DROP USER IF EXISTS nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP USER IF EXISTS cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP USER IF EXISTS reader >>>       [sql] 0 rows affected >>>       [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD >>> 'your_nuxeo_database_user_password_here' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE ROLE cspace WITH PASSWORD >>> 'your_cspace_database_user_password_here' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader >>>       [sql] 0 rows affected >>>       [sql] 11 of 11 SQL statements executed successfully >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/build.xml >>> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >>> URI = file:/Users/admin/Downloads/services/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services/services >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_NUXEO" has not been set >>> Property "env.DB_PASSWORD" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_USER" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_CSPACE" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>>       [ant] Entering >>> /Users/admin/Downloads/services/services/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, doc-windows, >>> package-unix, >>> package-windows, package, dist_installer, import, >>> copy-dependencies-reports, >>> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, generate-dependencies-reports, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/build.xml with >>> URI = >>> file:/Users/admin/Downloads/services/services/authentication/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>>       [ant] Entering >>> /Users/admin/Downloads/services/services/authentication/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, package-unix, >>> package-windows, package, test-windows, dist, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> with URI = >>> >>> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication/pstore >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>>       [ant] Entering >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >>> undeploy, clean-windows, setup_hibernate.cfg, install-unix, >>> install-windows, >>> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >>> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>>       [sql] connecting to jdbc:postgresql://localhost:5432/cspace >>>       [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >>>       [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >>>       [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/build.xml. >>>       [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >>> >>> BUILD FAILED >>> /Users/admin/Downloads/services/build.xml:210: The following error >>> occurred >>> while executing this line: >>> /Users/admin/Downloads/services/services/build.xml:136: The following >>> error >>> occurred while executing this line: >>> /Users/admin/Downloads/services/services/authentication/build.xml:117: >>> The >>> following error occurred while executing this line: >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "cspace" >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >>> at >>> >>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >>> at >>> >>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >>> at >>> >>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >>> at >>> >>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >>> at >>> >>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >>> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >>> at org.postgresql.Driver.makeConnection(Driver.java:393) >>> at org.postgresql.Driver.connect(Driver.java:267) >>> at >>> org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >>> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >>> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >>> at >>> >>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.Main.runBuild(Main.java:809) >>> at org.apache.tools.ant.Main.startAnt(Main.java:217) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >>> >>> Total time: 1 second >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Sent: Friday, May 25, 2012 9:32:47 AM >>> >>> Subject: Re: [Talk] space user password error >>> >>> Hi Al, >>> >>>    Many thanks - it's terrific you resolved this in this way!  And >>> your note on the Talk list will help others who may run into the same >>> situation. >>> >>>   (Until reading your note, I wasn't aware of the ENCRYPTED option for >>> passwords in PostgreSQL: >>> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >>> >>> Best, >>> Aron >>> >>> >>> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>>> Hi Aron, >>>> >>>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>>> typo. >>>> >>>> We did reset the password for the PostgreSQL >>>> >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>>> >>>> We then tried resetting the password as unencrypted, and that seemed to >>>> resolve the authentication issue.  So I believe we are set. >>>> >>>> Thanks for your help! >>>> >>>> Al >>>> >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> ________________________________ >>>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>>> To: "Al Bersch" <abersch@museumca.org> >>>> Cc: talk@lists.collectionspace.org >>>> Sent: Thursday, May 24, 2012 5:03:32 PM >>>> Subject: Re: [Talk] space user password error >>>> >>>> >>>> Hi Al, >>>> >>>>   Does that message really say, "password authentication failed for >>>> user "space"' - rather than 'user "cspace"'? >>>> >>>>   The script you're running when you type "ant create_db import" (an >>>> Ant 'buildfile'), uses the value of a variable called >>>> "${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in >>>> the file /Users/admin/Downloads/services/build.properties.  If you're >>>> truly seeing "space" in the error message, you might first check the >>>> value of 'db.cspace.user' in build.properties, and make sure it's >>>> "cspace", not "space". >>>> >>>>   You can also run "ant create_db import -v" (note the '-v" flag to >>>> generate very verbose messages), and look at the value of >>>> db.cspace.user right before the script terminates in that error. >>>> >>>>   Second, assuming that you are using 'cspace' as your database user >>>> name, you'll want to check that the password for the 'cspace' user >>>> used by this script, which attempts to log into the database as that >>>> user - which in turn is the password you've set in the >>>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>>> password for the PostgreSQL database user named "cspace".  In other >>>> words, you might try resetting the password for the PostgreSQL >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE. >>>> >>>>   http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>>> >>>>   * Log into PostgreSQL as an administrative user, such as the >>>> 'postgresql' user. >>>>   * Enter: >>>>   ALTER ROLE cspace WITH PASSWORD >>>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>>> >>>> Aron Roberts >>>> UC Berkeley >>>> >>>> >>>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>>> Hello, >>>>> >>>>> After following the steps for creating our tenant we get an error when >>>>> we >>>>> run the ant create_db import. With the following error: >>>>> >>>>> >>>>> >>>>>  /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>>> org.postgresql.util.PSQLException: FATAL: password authentication >>>>> failed >>>>> for >>>>> user "space". >>>>> >>>>> We believe we verified the password is set to what our environment >>>>> variable >>>>> is set to: $DB_PASSWORD_CSPACE. >>>>> >>>>> We would appreciate any ideas/advice! >>>>> >>>>> Thank you! >>>>> Al Bersch >>>>> Digital Project Coordinator >>>>> Oakland Museum of California >>>>> 1000 Oak Street, Oakland, CA 94607 >>>>> abersch@museumca.org >>>>> 510-318-8468 >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> >>>>> >>>>> >>>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>>> >>>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
JM
Jesse Martinez
Fri, May 25, 2012 10:01 PM

Hi Al,

Thanks for your updates.

I don't use a hosts file for my development since I just use
'localhost' for my local work machine or the IP address of a remote
staging/production server. We use subdomains for a lot of our project
servers that use the collectionspace.org domain, but this is project
specific.
I don't believe a hosts file (or even a DNS record edit) is required
for CSpace, but perhaps this is related to postgresql configuration?
Could you clarify what you wish to use a hosts file for?

  • Jesse

On Fri, May 25, 2012 at 5:21 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron, Jesse,

Thanks for getting back. We ended up hard-coding our password to the
variable, and that worked. So ant create_db import ran successfully.
However, I still want to run the Ant buildfile you sent to try to locate the
problem the environment variables.

 We started the servers, but can't find our tenant, which leaves us with
more questions (and thanks again for all your help). What should we have in
our Tables, and what should we have listed for Tenants? After we created our
tenant, our tenant table is showing up empty.

Also, can someone share an example of a host file (we didn't put in a DNS,
just used localhost)? It would be great to see what it is supposed to look
like.

Thank you,

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 1:22:50 PM

Subject: Re: [Talk] space user password error

Al,

  You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir=".">     <!-- environment should be declared first -->     <property environment="env" />     <target name="test-env-vars">         <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/>     </target> </project>

and then invoke it, from that directory, via 'ant'.  This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables.  If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
     [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
     [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

  If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed
message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo
the
environment variables. We continue to get the message that the cspace
user
password can't be authenticated. We verified that the password is set in
the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI =
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
      [sql] connecting to jdbc:postgresql://localhost:5432
      [sql] Loading org.postgresql.Driver using AntClassLoader with
classpath

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
      [sql] Executing resource:

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
      [sql] SQL:  DROP database IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP database IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:   DROP USER IF EXISTS nuxeo
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS cspace
      [sql] 0 rows affected
      [sql] SQL:  DROP USER IF EXISTS reader
      [sql] 0 rows affected
      [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
      [sql] 0 rows affected
      [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN
      [sql] 0 rows affected
      [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
      [sql] 0 rows affected
      [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
      [sql] 0 rows affected
      [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader
      [sql] 0 rows affected
      [sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
 [property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
      [ant] Entering
/Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows,
package-unix,
package-windows, package, dist_installer, import,
copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean,
test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with
URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean,
test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
      [ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =

file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
 [property] Loading Environment env.
 [property] Loading /Users/admin/Downloads/services/build.properties
      [ant] Entering

/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix,
install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
      [sql] connecting to jdbc:postgresql://localhost:5432/cspace
      [sql] Loading org.postgresql.Driver using a cached AntClassLoader.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
      [ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
      [ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error
occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following
error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117:
The
following error occurred while executing this line:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "cspace"
at

org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at

org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at

org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at

org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at

org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at

org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at

org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at

org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

   Many thanks - it's terrific you resolved this in this way!  And
your note on the Talk list will help others who may run into the same
situation.

  (Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue.  So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

  Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

  The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties.  If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

  You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

  Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace".  In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

  http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  * Log into PostgreSQL as an administrative user, such as the
'postgresql' user.
  * Enter:
  ALTER ROLE cspace WITH PASSWORD
'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when
we
run the ant create_db import. With the following error:

 /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication
failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Al, Thanks for your updates. I don't use a hosts file for my development since I just use 'localhost' for my local work machine or the IP address of a remote staging/production server. We use subdomains for a lot of our project servers that use the collectionspace.org domain, but this is project specific. I don't believe a hosts file (or even a DNS record edit) is required for CSpace, but perhaps this is related to postgresql configuration? Could you clarify what you wish to use a hosts file for? - Jesse On Fri, May 25, 2012 at 5:21 PM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron, Jesse, > > Thanks for getting back. We ended up hard-coding our password to the > variable, and that worked. So ant create_db import ran successfully. > However, I still want to run the Ant buildfile you sent to try to locate the > problem the environment variables. > >  We started the servers, but can't find our tenant, which leaves us with > more questions (and thanks again for all your help). What should we have in > our Tables, and what should we have listed for Tenants? After we created our > tenant, our tenant table is showing up empty. > > Also, can someone share an example of a host file (we didn't put in a DNS, > just used localhost)? It would be great to see what it is supposed to look > like. > > Thank you, > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Cc: talk@lists.collectionspace.org > Sent: Friday, May 25, 2012 1:22:50 PM > > Subject: Re: [Talk] space user password error > > Al, > >   You can try pasting this simple Ant buildfile into a file named > "build.xml" in some temporary directory: > > <project name="test-env-vars" default="test-env-vars" basedir="."> >     <!-- environment should be declared first --> >     <property environment="env" /> >     <target name="test-env-vars"> >         <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> >     </target> > </project> > > and then invoke it, from that directory, via 'ant'.  This will let you > know - in a simple way, without any filtering - whether Ant can 'see' > your environment variables.  If it succeeds at finding the values in > your environment variables, you'll see something like: > > test-env-vars: >      [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 > BUILD SUCCESSFUL > > and if it fails, you'll see: > > test-env-vars: >      [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} > BUILD SUCCESSFUL > >   If it can't find the values in your environment variables, then you > might look into that discussion thread in that Nabble-archived post, > included in a previous message on this topic, to see if any of the > issues mentioned there might apply in your situation. > > Aron > > On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez > <jmartinez@movingimage.us> wrote: >> Hi Al, >> >> Just a quick thought, are you using special characters or punctuation >> in your cspace password? I once had an issue using dollar signs $ in a >> postgresql password. >> >> - Jesse >> >> On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron and talk, >>> >>> It looks like I spoke too soon. We are still getting a build failed >>> message >>> (verbose version below) and it appears that our environment variables are >>> not being recognized, even though we can find the right path if we echo >>> the >>> environment variables. We continue to get the message that the cspace >>> user >>> password can't be authenticated. We verified that the password is set in >>> the >>> environment variable. We can echo and it kicks back the password. Once we >>> set the cspace user password, we can log into postgres with that user >>> password, until we run the script and after that we can't log in until we >>> reset the password. >>> >>> Any thoughts? Much appreciated! >>> >>> Thanks, >>> >>> Al >>> >>> museumcatest:services admin$ ant create_db import -v >>> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >>> Trying the default build file: build.xml >>> Buildfile: /Users/admin/Downloads/services/build.xml >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >>> file:/Users/admin/Downloads/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services >>> parsing buildfile >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >>> URI = >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >>> from a zip file >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>> Build sequence for target(s) `create_db' is [create_base_db, create_db] >>> Complete build sequence is [create_base_db, create_db, undeploy, >>> clean-windows, checkvars, install-unix, install-windows, install, >>> setup_initdb.sql, deploy, package-unix, package-windows, package, >>> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >>> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >>> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >>> >>> create_base_db: >>>       [sql] connecting to jdbc:postgresql://localhost:5432 >>>       [sql] Loading org.postgresql.Driver using AntClassLoader with >>> classpath >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >>>       [sql] Executing resource: >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >>>       [sql] SQL:  DROP database IF EXISTS cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP database IF EXISTS nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:   DROP USER IF EXISTS nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP USER IF EXISTS cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  DROP USER IF EXISTS reader >>>       [sql] 0 rows affected >>>       [sql] SQL:   CREATE ROLE nuxeo WITH PASSWORD >>> 'your_nuxeo_database_user_password_here' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE ROLE cspace WITH PASSWORD >>> 'your_cspace_database_user_password_here' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE ROLE reader WITH PASSWORD 'read' LOGIN >>>       [sql] 0 rows affected >>>       [sql] SQL:   CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >>>       [sql] 0 rows affected >>>       [sql] SQL:  CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >>>       [sql] 0 rows affected >>>       [sql] SQL:   GRANT CONNECT ON DATABASE nuxeo TO reader >>>       [sql] 0 rows affected >>>       [sql] 11 of 11 SQL statements executed successfully >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/build.xml >>> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >>> URI = file:/Users/admin/Downloads/services/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services/services >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_NUXEO" has not been set >>> Property "env.DB_PASSWORD" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_USER" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_CSPACE" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>>       [ant] Entering >>> /Users/admin/Downloads/services/services/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, doc-windows, >>> package-unix, >>> package-windows, package, dist_installer, import, >>> copy-dependencies-reports, >>> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, generate-dependencies-reports, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/build.xml with >>> URI = >>> file:/Users/admin/Downloads/services/services/authentication/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>>       [ant] Entering >>> /Users/admin/Downloads/services/services/authentication/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, package-unix, >>> package-windows, package, test-windows, dist, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>>       [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> with URI = >>> >>> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication/pstore >>>  [property] Loading Environment env. >>>  [property] Loading /Users/admin/Downloads/services/build.properties >>>       [ant] Entering >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >>> undeploy, clean-windows, setup_hibernate.cfg, install-unix, >>> install-windows, >>> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >>> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>>       [sql] connecting to jdbc:postgresql://localhost:5432/cspace >>>       [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >>>       [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >>>       [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/build.xml. >>>       [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >>> >>> BUILD FAILED >>> /Users/admin/Downloads/services/build.xml:210: The following error >>> occurred >>> while executing this line: >>> /Users/admin/Downloads/services/services/build.xml:136: The following >>> error >>> occurred while executing this line: >>> /Users/admin/Downloads/services/services/authentication/build.xml:117: >>> The >>> following error occurred while executing this line: >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "cspace" >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >>> at >>> >>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >>> at >>> >>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >>> at >>> >>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >>> at >>> >>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >>> at >>> >>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >>> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >>> at org.postgresql.Driver.makeConnection(Driver.java:393) >>> at org.postgresql.Driver.connect(Driver.java:267) >>> at >>> org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >>> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >>> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >>> at >>> >>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.Main.runBuild(Main.java:809) >>> at org.apache.tools.ant.Main.startAnt(Main.java:217) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >>> >>> Total time: 1 second >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Sent: Friday, May 25, 2012 9:32:47 AM >>> >>> Subject: Re: [Talk] space user password error >>> >>> Hi Al, >>> >>>    Many thanks - it's terrific you resolved this in this way!  And >>> your note on the Talk list will help others who may run into the same >>> situation. >>> >>>   (Until reading your note, I wasn't aware of the ENCRYPTED option for >>> passwords in PostgreSQL: >>> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >>> >>> Best, >>> Aron >>> >>> >>> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>>> Hi Aron, >>>> >>>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>>> typo. >>>> >>>> We did reset the password for the PostgreSQL >>>> >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>>> >>>> We then tried resetting the password as unencrypted, and that seemed to >>>> resolve the authentication issue.  So I believe we are set. >>>> >>>> Thanks for your help! >>>> >>>> Al >>>> >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> ________________________________ >>>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>>> To: "Al Bersch" <abersch@museumca.org> >>>> Cc: talk@lists.collectionspace.org >>>> Sent: Thursday, May 24, 2012 5:03:32 PM >>>> Subject: Re: [Talk] space user password error >>>> >>>> >>>> Hi Al, >>>> >>>>   Does that message really say, "password authentication failed for >>>> user "space"' - rather than 'user "cspace"'? >>>> >>>>   The script you're running when you type "ant create_db import" (an >>>> Ant 'buildfile'), uses the value of a variable called >>>> "${db.cspace.user}".  That value is set (hard-coded) to 'cspace' in >>>> the file /Users/admin/Downloads/services/build.properties.  If you're >>>> truly seeing "space" in the error message, you might first check the >>>> value of 'db.cspace.user' in build.properties, and make sure it's >>>> "cspace", not "space". >>>> >>>>   You can also run "ant create_db import -v" (note the '-v" flag to >>>> generate very verbose messages), and look at the value of >>>> db.cspace.user right before the script terminates in that error. >>>> >>>>   Second, assuming that you are using 'cspace' as your database user >>>> name, you'll want to check that the password for the 'cspace' user >>>> used by this script, which attempts to log into the database as that >>>> user - which in turn is the password you've set in the >>>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>>> password for the PostgreSQL database user named "cspace".  In other >>>> words, you might try resetting the password for the PostgreSQL >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE. >>>> >>>>   http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>>> >>>>   * Log into PostgreSQL as an administrative user, such as the >>>> 'postgresql' user. >>>>   * Enter: >>>>   ALTER ROLE cspace WITH PASSWORD >>>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>>> >>>> Aron Roberts >>>> UC Berkeley >>>> >>>> >>>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>>> Hello, >>>>> >>>>> After following the steps for creating our tenant we get an error when >>>>> we >>>>> run the ant create_db import. With the following error: >>>>> >>>>> >>>>> >>>>>  /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>>> org.postgresql.util.PSQLException: FATAL: password authentication >>>>> failed >>>>> for >>>>> user "space". >>>>> >>>>> We believe we verified the password is set to what our environment >>>>> variable >>>>> is set to: $DB_PASSWORD_CSPACE. >>>>> >>>>> We would appreciate any ideas/advice! >>>>> >>>>> Thank you! >>>>> Al Bersch >>>>> Digital Project Coordinator >>>>> Oakland Museum of California >>>>> 1000 Oak Street, Oakland, CA 94607 >>>>> abersch@museumca.org >>>>> 510-318-8468 >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> >>>>> >>>>> >>>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>>> >>>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
AB
Al Bersch
Fri, May 25, 2012 11:10 PM

Hi Jesse,

Thanks. We're also using "localhost" - we don't have it set up in DNS. We just wanted to know if routing it to localhost is outside normal, but sounds like there's not usually a problem with that.

Thanks,

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468
----- Original Message -----

From: "Jesse Martinez" jmartinez@movingimage.us
To: "Al Bersch" abersch@museumca.org
Cc: "Aron Roberts" aron@socrates.berkeley.edu, talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 3:01:43 PM
Subject: Re: [Talk] space user password error

Hi Al,

Thanks for your updates.

I don't use a hosts file for my development since I just use
'localhost' for my local work machine or the IP address of a remote
staging/production server. We use subdomains for a lot of our project
servers that use the collectionspace.org domain, but this is project
specific.
I don't believe a hosts file (or even a DNS record edit) is required
for CSpace, but perhaps this is related to postgresql configuration?
Could you clarify what you wish to use a hosts file for?

  • Jesse

On Fri, May 25, 2012 at 5:21 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron, Jesse,

Thanks for getting back. We ended up hard-coding our password to the
variable, and that worked. So ant create_db import ran successfully.
However, I still want to run the Ant buildfile you sent to try to locate the
problem the environment variables.

We started the servers, but can't find our tenant, which leaves us with
more questions (and thanks again for all your help). What should we have in
our Tables, and what should we have listed for Tenants? After we created our
tenant, our tenant table is showing up empty.

Also, can someone share an example of a host file (we didn't put in a DNS,
just used localhost)? It would be great to see what it is supposed to look
like.

Thank you,

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 1:22:50 PM

Subject: Re: [Talk] space user password error

Al,

You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir="."> <!-- environment should be declared first --> <property environment="env" /> <target name="test-env-vars"> <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> </target> </project>

and then invoke it, from that directory, via 'ant'. This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables. If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed
message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo
the
environment variables. We continue to get the message that the cspace
user
password can't be authenticated. We verified that the password is set in
the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI =
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
[sql] connecting to jdbc:postgresql://localhost:5432
[sql] Loading org.postgresql.Driver using AntClassLoader with
classpath

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
[sql] Executing resource:

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
[sql] SQL: DROP database IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP database IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS reader
[sql] 0 rows affected
[sql] SQL: CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
[sql] 0 rows affected
[sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader
[sql] 0 rows affected
[sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
[property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
[ant] Entering
/Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows,
package-unix,
package-windows, package, dist_installer, import,
copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean,
test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with
URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean,
test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =

file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering

/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix,
install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
[sql] connecting to jdbc:postgresql://localhost:5432/cspace
[sql] Loading org.postgresql.Driver using a cached AntClassLoader.
[ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
[ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
[ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error
occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following
error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117:
The
following error occurred while executing this line:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "cspace"
at

org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at

org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at

org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at

org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at

org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at

org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at

org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at

org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

Many thanks - it's terrific you resolved this in this way! And
your note on the Talk list will help others who may run into the same
situation.

(Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue. So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}". That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties. If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace". In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  • Log into PostgreSQL as an administrative user, such as the
    'postgresql' user.
  • Enter:
    ALTER ROLE cspace WITH PASSWORD
    'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when
we
run the ant create_db import. With the following error:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication
failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Jesse, Thanks. We're also using "localhost" - we don't have it set up in DNS. We just wanted to know if routing it to localhost is outside normal, but sounds like there's not usually a problem with that. Thanks, Al Al Bersch Digital Project Coordinator Oakland Museum of California 1000 Oak Street, Oakland, CA 94607 abersch@museumca.org 510-318-8468 ----- Original Message ----- From: "Jesse Martinez" <jmartinez@movingimage.us> To: "Al Bersch" <abersch@museumca.org> Cc: "Aron Roberts" <aron@socrates.berkeley.edu>, talk@lists.collectionspace.org Sent: Friday, May 25, 2012 3:01:43 PM Subject: Re: [Talk] space user password error Hi Al, Thanks for your updates. I don't use a hosts file for my development since I just use 'localhost' for my local work machine or the IP address of a remote staging/production server. We use subdomains for a lot of our project servers that use the collectionspace.org domain, but this is project specific. I don't believe a hosts file (or even a DNS record edit) is required for CSpace, but perhaps this is related to postgresql configuration? Could you clarify what you wish to use a hosts file for? - Jesse On Fri, May 25, 2012 at 5:21 PM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron, Jesse, > > Thanks for getting back. We ended up hard-coding our password to the > variable, and that worked. So ant create_db import ran successfully. > However, I still want to run the Ant buildfile you sent to try to locate the > problem the environment variables. > > We started the servers, but can't find our tenant, which leaves us with > more questions (and thanks again for all your help). What should we have in > our Tables, and what should we have listed for Tenants? After we created our > tenant, our tenant table is showing up empty. > > Also, can someone share an example of a host file (we didn't put in a DNS, > just used localhost)? It would be great to see what it is supposed to look > like. > > Thank you, > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Cc: talk@lists.collectionspace.org > Sent: Friday, May 25, 2012 1:22:50 PM > > Subject: Re: [Talk] space user password error > > Al, > > You can try pasting this simple Ant buildfile into a file named > "build.xml" in some temporary directory: > > <project name="test-env-vars" default="test-env-vars" basedir="."> > <!-- environment should be declared first --> > <property environment="env" /> > <target name="test-env-vars"> > <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> > </target> > </project> > > and then invoke it, from that directory, via 'ant'. This will let you > know - in a simple way, without any filtering - whether Ant can 'see' > your environment variables. If it succeeds at finding the values in > your environment variables, you'll see something like: > > test-env-vars: > [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 > BUILD SUCCESSFUL > > and if it fails, you'll see: > > test-env-vars: > [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} > BUILD SUCCESSFUL > > If it can't find the values in your environment variables, then you > might look into that discussion thread in that Nabble-archived post, > included in a previous message on this topic, to see if any of the > issues mentioned there might apply in your situation. > > Aron > > On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez > <jmartinez@movingimage.us> wrote: >> Hi Al, >> >> Just a quick thought, are you using special characters or punctuation >> in your cspace password? I once had an issue using dollar signs $ in a >> postgresql password. >> >> - Jesse >> >> On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron and talk, >>> >>> It looks like I spoke too soon. We are still getting a build failed >>> message >>> (verbose version below) and it appears that our environment variables are >>> not being recognized, even though we can find the right path if we echo >>> the >>> environment variables. We continue to get the message that the cspace >>> user >>> password can't be authenticated. We verified that the password is set in >>> the >>> environment variable. We can echo and it kicks back the password. Once we >>> set the cspace user password, we can log into postgres with that user >>> password, until we run the script and after that we can't log in until we >>> reset the password. >>> >>> Any thoughts? Much appreciated! >>> >>> Thanks, >>> >>> Al >>> >>> museumcatest:services admin$ ant create_db import -v >>> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >>> Trying the default build file: build.xml >>> Buildfile: /Users/admin/Downloads/services/build.xml >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >>> file:/Users/admin/Downloads/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services >>> parsing buildfile >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >>> URI = >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >>> from a zip file >>> [property] Loading Environment env. >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> Build sequence for target(s) `create_db' is [create_base_db, create_db] >>> Complete build sequence is [create_base_db, create_db, undeploy, >>> clean-windows, checkvars, install-unix, install-windows, install, >>> setup_initdb.sql, deploy, package-unix, package-windows, package, >>> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >>> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >>> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >>> >>> create_base_db: >>> [sql] connecting to jdbc:postgresql://localhost:5432 >>> [sql] Loading org.postgresql.Driver using AntClassLoader with >>> classpath >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >>> [sql] Executing resource: >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >>> [sql] SQL: DROP database IF EXISTS cspace >>> [sql] 0 rows affected >>> [sql] SQL: DROP database IF EXISTS nuxeo >>> [sql] 0 rows affected >>> [sql] SQL: DROP USER IF EXISTS nuxeo >>> [sql] 0 rows affected >>> [sql] SQL: DROP USER IF EXISTS cspace >>> [sql] 0 rows affected >>> [sql] SQL: DROP USER IF EXISTS reader >>> [sql] 0 rows affected >>> [sql] SQL: CREATE ROLE nuxeo WITH PASSWORD >>> 'your_nuxeo_database_user_password_here' LOGIN >>> [sql] 0 rows affected >>> [sql] SQL: CREATE ROLE cspace WITH PASSWORD >>> 'your_cspace_database_user_password_here' LOGIN >>> [sql] 0 rows affected >>> [sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN >>> [sql] 0 rows affected >>> [sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >>> [sql] 0 rows affected >>> [sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >>> [sql] 0 rows affected >>> [sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader >>> [sql] 0 rows affected >>> [sql] 11 of 11 SQL statements executed successfully >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/build.xml >>> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >>> URI = file:/Users/admin/Downloads/services/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services/services >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_NUXEO" has not been set >>> Property "env.DB_PASSWORD" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_USER" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_CSPACE" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> [ant] Entering >>> /Users/admin/Downloads/services/services/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, doc-windows, >>> package-unix, >>> package-windows, package, dist_installer, import, >>> copy-dependencies-reports, >>> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, generate-dependencies-reports, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/build.xml with >>> URI = >>> file:/Users/admin/Downloads/services/services/authentication/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication >>> [property] Loading Environment env. >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> [ant] Entering >>> /Users/admin/Downloads/services/services/authentication/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, package-unix, >>> package-windows, package, test-windows, dist, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> with URI = >>> >>> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication/pstore >>> [property] Loading Environment env. >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> [ant] Entering >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >>> undeploy, clean-windows, setup_hibernate.cfg, install-unix, >>> install-windows, >>> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >>> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> [sql] connecting to jdbc:postgresql://localhost:5432/cspace >>> [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >>> [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >>> [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/build.xml. >>> [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >>> >>> BUILD FAILED >>> /Users/admin/Downloads/services/build.xml:210: The following error >>> occurred >>> while executing this line: >>> /Users/admin/Downloads/services/services/build.xml:136: The following >>> error >>> occurred while executing this line: >>> /Users/admin/Downloads/services/services/authentication/build.xml:117: >>> The >>> following error occurred while executing this line: >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "cspace" >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >>> at >>> >>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >>> at >>> >>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >>> at >>> >>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >>> at >>> >>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >>> at >>> >>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >>> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >>> at org.postgresql.Driver.makeConnection(Driver.java:393) >>> at org.postgresql.Driver.connect(Driver.java:267) >>> at >>> org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >>> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >>> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >>> at >>> >>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.Main.runBuild(Main.java:809) >>> at org.apache.tools.ant.Main.startAnt(Main.java:217) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >>> >>> Total time: 1 second >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Sent: Friday, May 25, 2012 9:32:47 AM >>> >>> Subject: Re: [Talk] space user password error >>> >>> Hi Al, >>> >>> Many thanks - it's terrific you resolved this in this way! And >>> your note on the Talk list will help others who may run into the same >>> situation. >>> >>> (Until reading your note, I wasn't aware of the ENCRYPTED option for >>> passwords in PostgreSQL: >>> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >>> >>> Best, >>> Aron >>> >>> >>> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>>> Hi Aron, >>>> >>>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>>> typo. >>>> >>>> We did reset the password for the PostgreSQL >>>> >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>>> >>>> We then tried resetting the password as unencrypted, and that seemed to >>>> resolve the authentication issue. So I believe we are set. >>>> >>>> Thanks for your help! >>>> >>>> Al >>>> >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> ________________________________ >>>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>>> To: "Al Bersch" <abersch@museumca.org> >>>> Cc: talk@lists.collectionspace.org >>>> Sent: Thursday, May 24, 2012 5:03:32 PM >>>> Subject: Re: [Talk] space user password error >>>> >>>> >>>> Hi Al, >>>> >>>> Does that message really say, "password authentication failed for >>>> user "space"' - rather than 'user "cspace"'? >>>> >>>> The script you're running when you type "ant create_db import" (an >>>> Ant 'buildfile'), uses the value of a variable called >>>> "${db.cspace.user}". That value is set (hard-coded) to 'cspace' in >>>> the file /Users/admin/Downloads/services/build.properties. If you're >>>> truly seeing "space" in the error message, you might first check the >>>> value of 'db.cspace.user' in build.properties, and make sure it's >>>> "cspace", not "space". >>>> >>>> You can also run "ant create_db import -v" (note the '-v" flag to >>>> generate very verbose messages), and look at the value of >>>> db.cspace.user right before the script terminates in that error. >>>> >>>> Second, assuming that you are using 'cspace' as your database user >>>> name, you'll want to check that the password for the 'cspace' user >>>> used by this script, which attempts to log into the database as that >>>> user - which in turn is the password you've set in the >>>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>>> password for the PostgreSQL database user named "cspace". In other >>>> words, you might try resetting the password for the PostgreSQL >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE. >>>> >>>> http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>>> >>>> * Log into PostgreSQL as an administrative user, such as the >>>> 'postgresql' user. >>>> * Enter: >>>> ALTER ROLE cspace WITH PASSWORD >>>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>>> >>>> Aron Roberts >>>> UC Berkeley >>>> >>>> >>>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>>> Hello, >>>>> >>>>> After following the steps for creating our tenant we get an error when >>>>> we >>>>> run the ant create_db import. With the following error: >>>>> >>>>> >>>>> >>>>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>>> org.postgresql.util.PSQLException: FATAL: password authentication >>>>> failed >>>>> for >>>>> user "space". >>>>> >>>>> We believe we verified the password is set to what our environment >>>>> variable >>>>> is set to: $DB_PASSWORD_CSPACE. >>>>> >>>>> We would appreciate any ideas/advice! >>>>> >>>>> Thank you! >>>>> Al Bersch >>>>> Digital Project Coordinator >>>>> Oakland Museum of California >>>>> 1000 Oak Street, Oakland, CA 94607 >>>>> abersch@museumca.org >>>>> 510-318-8468 >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> >>>>> >>>>> >>>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>>> >>>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
AB
Al Bersch
Fri, May 25, 2012 11:18 PM

Hi Aron,

Thanks for your response.

In answer to your questions - yes, the installation is on a Mac OS X system, and yes, there entries in the appropriate shell configuration file to export the environment variables (we thinks so - we put them in the .bash profile). As for the third question, I believe that each and every one of the environment variables is visible upon the command 'env'.

Our plan is to reinstall and see if we can resolve the issue that way. I'll let you know what we find out.

Thanks again,

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468
----- Original Message -----

From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 2:33:32 PM
Subject: Re: [Talk] space user password error

Al,

Thanks much for this update!

There are a number of environment variables that must be available
to Ant in order to successfully build the CollectionSpace services
layer, create and populate databases, and import roles, permissions,
etc. If any of those is missing, you may not have a completely
working CollectionSpace system.

It's likely to be more productive to resolve the environment
variables problem once and for all, and get a clean installation, then
to try to resolve individual problems caused by their absence, one
after the other. That will, I'm concerned, be more consuming of your
time than getting an environment in place where the installation steps
'just work.'

Just to start out, is it the case that:

  • The installation is occurring on a Unix-like system (Linux, Mac OS
    X, or even a Unix variant)?
  • There are entries in the appropriate shell configuration file to
    export these environment variables, so that they're present in every
    new instance of your command shell?
  • When you open a new shell / terminal window, you can type the
    command 'env', and, in the output from that command, see each and
    every one of the environment variables listed in the "Setting Up
    CollectionSpace" section of the various installation documents, such
    as http://wiki.collectionspace.org/x/1oHyBQ ?

Aron

On Fri, May 25, 2012 at 2:21 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron, Jesse,

Thanks for getting back. We ended up hard-coding our password to the
variable, and that worked. So ant create_db import ran successfully.
However, I still want to run the Ant buildfile you sent to try to locate the
problem the environment variables.

We started the servers, but can't find our tenant, which leaves us with
more questions (and thanks again for all your help). What should we have in
our Tables, and what should we have listed for Tenants? After we created our
tenant, our tenant table is showing up empty.

Also, can someone share an example of a host file (we didn't put in a DNS,
just used localhost)? It would be great to see what it is supposed to look
like.

Thank you,

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Friday, May 25, 2012 1:22:50 PM

Subject: Re: [Talk] space user password error

Al,

You can try pasting this simple Ant buildfile into a file named
"build.xml" in some temporary directory:

<project name="test-env-vars" default="test-env-vars" basedir="."> <!-- environment should be declared first --> <property environment="env" /> <target name="test-env-vars"> <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> </target> </project>

and then invoke it, from that directory, via 'ant'. This will let you
know - in a simple way, without any filtering - whether Ant can 'see'
your environment variables. If it succeeds at finding the values in
your environment variables, you'll see something like:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33
BUILD SUCCESSFUL

and if it fails, you'll see:

test-env-vars:
[echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}
BUILD SUCCESSFUL

If it can't find the values in your environment variables, then you
might look into that discussion thread in that Nabble-archived post,
included in a previous message on this topic, to see if any of the
issues mentioned there might apply in your situation.

Aron

On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez
jmartinez@movingimage.us wrote:

Hi Al,

Just a quick thought, are you using special characters or punctuation
in your cspace password? I once had an issue using dollar signs $ in a
postgresql password.

  • Jesse

On Fri, May 25, 2012 at 2:17 PM, Al Bersch abersch@museumca.org wrote:

Hi Aron and talk,

It looks like I spoke too soon. We are still getting a build failed
message
(verbose version below) and it appears that our environment variables are
not being recognized, even though we can find the right path if we echo
the
environment variables. We continue to get the message that the cspace
user
password can't be authenticated. We verified that the password is set in
the
environment variable. We can echo and it kicks back the password. Once we
set the cspace user password, we can log into postgres with that user
password, until we run the script and after that we can't log in until we
reset the password.

Any thoughts? Much appreciated!

Thanks,

Al

museumcatest:services admin$ ant create_db import -v
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
Trying the default build file: build.xml
Buildfile: /Users/admin/Downloads/services/build.xml
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
parsing buildfile /Users/admin/Downloads/services/build.xml with URI =
file:/Users/admin/Downloads/services/build.xml
Project base dir set to: /Users/admin/Downloads/services
parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI =
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
Build sequence for target(s) `create_db' is [create_base_db, create_db]
Complete build sequence is [create_base_db, create_db, undeploy,
clean-windows, checkvars, install-unix, install-windows, install,
setup_initdb.sql, deploy, package-unix, package-windows, package,
eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows,
hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows,
eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ]

create_base_db:
[sql] connecting to jdbc:postgresql://localhost:5432
[sql] Loading org.postgresql.Driver using AntClassLoader with
classpath

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar
[sql] Executing resource:

/usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql
[sql] SQL: DROP database IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP database IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS nuxeo
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS cspace
[sql] 0 rows affected
[sql] SQL: DROP USER IF EXISTS reader
[sql] 0 rows affected
[sql] SQL: CREATE ROLE nuxeo WITH PASSWORD
'your_nuxeo_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE cspace WITH PASSWORD
'your_cspace_database_user_password_here' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace
[sql] 0 rows affected
[sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo
[sql] 0 rows affected
[sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader
[sql] 0 rows affected
[sql] 11 of 11 SQL statements executed successfully

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/build.xml
parsing buildfile /Users/admin/Downloads/services/services/build.xml with
URI = file:/Users/admin/Downloads/services/services/build.xml
Project base dir set to: /Users/admin/Downloads/services/services
[property] Loading /Users/admin/Downloads/services/build.properties
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_NUXEO" has not been set
Property "env.DB_PASSWORD" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_USER" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.DB_PASSWORD_CSPACE" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
Property "env.CSPACE_JEESERVER_HOME" has not been set
[ant] Entering
/Users/admin/Downloads/services/services/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, doc-windows,
package-unix,
package-windows, package, dist_installer, import,
copy-dependencies-reports,
test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean,
test-unix,
gen_ddl, test, generate-dependencies-reports, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/build.xml with
URI =
file:/Users/admin/Downloads/services/services/authentication/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering
/Users/admin/Downloads/services/services/authentication/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, undeploy, clean-windows,
install-unix, install-windows, install, deploy, package-unix,
package-windows, package, test-windows, dist, clean-unix, clean,
test-unix,
gen_ddl, test, ]

create_db:
Detected Java version: 1.6 in:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Detected OS: Mac OS X
[ant] calling target(s) [create_db] in build file
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
parsing buildfile
/Users/admin/Downloads/services/services/authentication/pstore/build.xml
with URI =

file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml
Project base dir set to:
/Users/admin/Downloads/services/services/authentication/pstore
[property] Loading Environment env.
[property] Loading /Users/admin/Downloads/services/build.properties
[ant] Entering

/Users/admin/Downloads/services/services/authentication/pstore/build.xml...
Build sequence for target(s) `create_db' is [create_db]
Complete build sequence is [create_db, check.db.scripts.deploy.dir,
undeploy, clean-windows, setup_hibernate.cfg, install-unix,
install-windows,
install, deploy, package-unix, package-windows, package, gen_ddl-unix,
test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix,
gen_ddl, test, ]

create_db:
[sql] connecting to jdbc:postgresql://localhost:5432/cspace
[sql] Loading org.postgresql.Driver using a cached AntClassLoader.
[ant] Exiting
/Users/admin/Downloads/services/services/authentication/pstore/build.xml.
[ant] Exiting
/Users/admin/Downloads/services/services/authentication/build.xml.
[ant] Exiting /Users/admin/Downloads/services/services/build.xml.

BUILD FAILED
/Users/admin/Downloads/services/build.xml:210: The following error
occurred
while executing this line:
/Users/admin/Downloads/services/services/build.xml:136: The following
error
occurred while executing this line:
/Users/admin/Downloads/services/services/authentication/build.xml:117:
The
following error occurred while executing this line:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication failed
for
user "cspace"
at

org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at

org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at

org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at

org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at

org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at

org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
at

org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at

org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at

org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at

org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Sent: Friday, May 25, 2012 9:32:47 AM

Subject: Re: [Talk] space user password error

Hi Al,

Many thanks - it's terrific you resolved this in this way! And
your note on the Talk list will help others who may run into the same
situation.

(Until reading your note, I wasn't aware of the ENCRYPTED option for
passwords in PostgreSQL:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html).

Best,
Aron

On Fri, May 25, 2012 at 8:56 AM, Al Bersch abersch@museumca.org wrote:

Hi Aron,

Thanks for getting back to me so quickly. Shame on me - "space" was my
typo.

We did reset the password for the PostgreSQL

database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE, but were still getting error messages.

We then tried resetting the password as unencrypted, and that seemed to
resolve the authentication issue. So I believe we are set.

Thanks for your help!

Al

Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


From: "Aron Roberts" aron@socrates.berkeley.edu
To: "Al Bersch" abersch@museumca.org
Cc: talk@lists.collectionspace.org
Sent: Thursday, May 24, 2012 5:03:32 PM
Subject: Re: [Talk] space user password error

Hi Al,

Does that message really say, "password authentication failed for
user "space"' - rather than 'user "cspace"'?

The script you're running when you type "ant create_db import" (an
Ant 'buildfile'), uses the value of a variable called
"${db.cspace.user}". That value is set (hard-coded) to 'cspace' in
the file /Users/admin/Downloads/services/build.properties. If you're
truly seeing "space" in the error message, you might first check the
value of 'db.cspace.user' in build.properties, and make sure it's
"cspace", not "space".

You can also run "ant create_db import -v" (note the '-v" flag to
generate very verbose messages), and look at the value of
db.cspace.user right before the script terminates in that error.

Second, assuming that you are using 'cspace' as your database user
name, you'll want to check that the password for the 'cspace' user
used by this script, which attempts to log into the database as that
user - which in turn is the password you've set in the
$DB_PASSWORD_CSPACE environment variable - is the same as the actual
password for the PostgreSQL database user named "cspace". In other
words, you might try resetting the password for the PostgreSQL
database user named "cspace" to match the value of that password in
$DB_PASSWORD_CSPACE.

http://www.postgresql.org/docs/9.1/static/sql-alterrole.html

  • Log into PostgreSQL as an administrative user, such as the
    'postgresql' user.
  • Enter:
    ALTER ROLE cspace WITH PASSWORD
    'password_from_DB_PASSWORD_CSPACE_goes_here';

Aron Roberts
UC Berkeley

On Thu, May 24, 2012 at 4:27 PM, Al Bersch abersch@museumca.org wrote:

Hello,

After following the steps for creating our tenant we get an error when
we
run the ant create_db import. With the following error:

/Users/admin/Downloads/services/services/authentication/pstore/build.xml:160:
org.postgresql.util.PSQLException: FATAL: password authentication
failed
for
user "space".

We believe we verified the password is set to what our environment
variable
is set to: $DB_PASSWORD_CSPACE.

We would appreciate any ideas/advice!

Thank you!
Al Bersch
Digital Project Coordinator
Oakland Museum of California
1000 Oak Street, Oakland, CA 94607
abersch@museumca.org
510-318-8468


Talk mailing list
Talk@lists.collectionspace.org

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

Hi Aron, Thanks for your response. In answer to your questions - yes, the installation is on a Mac OS X system, and yes, there entries in the appropriate shell configuration file to export the environment variables (we thinks so - we put them in the .bash profile). As for the third question, I believe that each and every one of the environment variables is visible upon the command 'env'. Our plan is to reinstall and see if we can resolve the issue that way. I'll let you know what we find out. Thanks again, Al Al Bersch Digital Project Coordinator Oakland Museum of California 1000 Oak Street, Oakland, CA 94607 abersch@museumca.org 510-318-8468 ----- Original Message ----- From: "Aron Roberts" <aron@socrates.berkeley.edu> To: "Al Bersch" <abersch@museumca.org> Cc: talk@lists.collectionspace.org Sent: Friday, May 25, 2012 2:33:32 PM Subject: Re: [Talk] space user password error Al, Thanks much for this update! There are a number of environment variables that must be available to Ant in order to successfully build the CollectionSpace services layer, create and populate databases, and import roles, permissions, etc. If any of those is missing, you may not have a completely working CollectionSpace system. It's likely to be more productive to resolve the environment variables problem once and for all, and get a clean installation, then to try to resolve individual problems caused by their absence, one after the other. That will, I'm concerned, be more consuming of your time than getting an environment in place where the installation steps 'just work.' Just to start out, is it the case that: * The installation is occurring on a Unix-like system (Linux, Mac OS X, or even a Unix variant)? * There are entries in the appropriate shell configuration file to export these environment variables, so that they're present in every new instance of your command shell? * When you open a new shell / terminal window, you can type the command 'env', and, in the output from that command, see each and every one of the environment variables listed in the "Setting Up CollectionSpace" section of the various installation documents, such as http://wiki.collectionspace.org/x/1oHyBQ ? Aron On Fri, May 25, 2012 at 2:21 PM, Al Bersch <abersch@museumca.org> wrote: > Hi Aron, Jesse, > > Thanks for getting back. We ended up hard-coding our password to the > variable, and that worked. So ant create_db import ran successfully. > However, I still want to run the Ant buildfile you sent to try to locate the > problem the environment variables. > > We started the servers, but can't find our tenant, which leaves us with > more questions (and thanks again for all your help). What should we have in > our Tables, and what should we have listed for Tenants? After we created our > tenant, our tenant table is showing up empty. > > Also, can someone share an example of a host file (we didn't put in a DNS, > just used localhost)? It would be great to see what it is supposed to look > like. > > Thank you, > > Al Bersch > Digital Project Coordinator > Oakland Museum of California > 1000 Oak Street, Oakland, CA 94607 > abersch@museumca.org > 510-318-8468 > ________________________________ > From: "Aron Roberts" <aron@socrates.berkeley.edu> > To: "Al Bersch" <abersch@museumca.org> > Cc: talk@lists.collectionspace.org > Sent: Friday, May 25, 2012 1:22:50 PM > > Subject: Re: [Talk] space user password error > > Al, > > You can try pasting this simple Ant buildfile into a file named > "build.xml" in some temporary directory: > > <project name="test-env-vars" default="test-env-vars" basedir="."> > <!-- environment should be declared first --> > <property environment="env" /> > <target name="test-env-vars"> > <echo message="CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME}"/> > </target> > </project> > > and then invoke it, from that directory, via 'ant'. This will let you > know - in a simple way, without any filtering - whether Ant can 'see' > your environment variables. If it succeeds at finding the values in > your environment variables, you'll see something like: > > test-env-vars: > [echo] CSPACE_JEESERVER_HOME=/usr/local/share/apache-tomcat-6.0.33 > BUILD SUCCESSFUL > > and if it fails, you'll see: > > test-env-vars: > [echo] CSPACE_JEESERVER_HOME=${env.CSPACE_JEESERVER_HOME} > BUILD SUCCESSFUL > > If it can't find the values in your environment variables, then you > might look into that discussion thread in that Nabble-archived post, > included in a previous message on this topic, to see if any of the > issues mentioned there might apply in your situation. > > Aron > > On Fri, May 25, 2012 at 1:13 PM, Jesse Martinez > <jmartinez@movingimage.us> wrote: >> Hi Al, >> >> Just a quick thought, are you using special characters or punctuation >> in your cspace password? I once had an issue using dollar signs $ in a >> postgresql password. >> >> - Jesse >> >> On Fri, May 25, 2012 at 2:17 PM, Al Bersch <abersch@museumca.org> wrote: >>> Hi Aron and talk, >>> >>> It looks like I spoke too soon. We are still getting a build failed >>> message >>> (verbose version below) and it appears that our environment variables are >>> not being recognized, even though we can find the right path if we echo >>> the >>> environment variables. We continue to get the message that the cspace >>> user >>> password can't be authenticated. We verified that the password is set in >>> the >>> environment variable. We can echo and it kicks back the password. Once we >>> set the cspace user password, we can log into postgres with that user >>> password, until we run the script and after that we can't log in until we >>> reset the password. >>> >>> Any thoughts? Much appreciated! >>> >>> Thanks, >>> >>> Al >>> >>> museumcatest:services admin$ ant create_db import -v >>> Apache Ant(TM) version 1.8.2 compiled on June 3 2011 >>> Trying the default build file: build.xml >>> Buildfile: /Users/admin/Downloads/services/build.xml >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> parsing buildfile /Users/admin/Downloads/services/build.xml with URI = >>> file:/Users/admin/Downloads/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services >>> parsing buildfile >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with >>> URI = >>> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml >>> from a zip file >>> [property] Loading Environment env. >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> Build sequence for target(s) `create_db' is [create_base_db, create_db] >>> Complete build sequence is [create_base_db, create_db, undeploy, >>> clean-windows, checkvars, install-unix, install-windows, install, >>> setup_initdb.sql, deploy, package-unix, package-windows, package, >>> eclipse-unix, dist_installer, dist, dist-jee-nuxeo, import, test-windows, >>> hotdeploy, init, dist-jee-domains, clean-unix, clean, eclipse-windows, >>> eclipse, test-unix, gen_ddl, test, dist-jee-cspace, doc, ] >>> >>> create_base_db: >>> [sql] connecting to jdbc:postgresql://localhost:5432 >>> [sql] Loading org.postgresql.Driver using AntClassLoader with >>> classpath >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/jdbc_drivers/postgresql-8.4-702.jdbc4.jar >>> [sql] Executing resource: >>> >>> /usr/local/share/apache-tomcat-6.0.33/cspace/services/db/postgresql/init_db.sql >>> [sql] SQL: DROP database IF EXISTS cspace >>> [sql] 0 rows affected >>> [sql] SQL: DROP database IF EXISTS nuxeo >>> [sql] 0 rows affected >>> [sql] SQL: DROP USER IF EXISTS nuxeo >>> [sql] 0 rows affected >>> [sql] SQL: DROP USER IF EXISTS cspace >>> [sql] 0 rows affected >>> [sql] SQL: DROP USER IF EXISTS reader >>> [sql] 0 rows affected >>> [sql] SQL: CREATE ROLE nuxeo WITH PASSWORD >>> 'your_nuxeo_database_user_password_here' LOGIN >>> [sql] 0 rows affected >>> [sql] SQL: CREATE ROLE cspace WITH PASSWORD >>> 'your_cspace_database_user_password_here' LOGIN >>> [sql] 0 rows affected >>> [sql] SQL: CREATE ROLE reader WITH PASSWORD 'read' LOGIN >>> [sql] 0 rows affected >>> [sql] SQL: CREATE DATABASE cspace ENCODING 'UTF8' OWNER cspace >>> [sql] 0 rows affected >>> [sql] SQL: CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo >>> [sql] 0 rows affected >>> [sql] SQL: GRANT CONNECT ON DATABASE nuxeo TO reader >>> [sql] 0 rows affected >>> [sql] 11 of 11 SQL statements executed successfully >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/build.xml >>> parsing buildfile /Users/admin/Downloads/services/services/build.xml with >>> URI = file:/Users/admin/Downloads/services/services/build.xml >>> Project base dir set to: /Users/admin/Downloads/services/services >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_NUXEO" has not been set >>> Property "env.DB_PASSWORD" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_USER" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.DB_PASSWORD_CSPACE" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> Property "env.CSPACE_JEESERVER_HOME" has not been set >>> [ant] Entering >>> /Users/admin/Downloads/services/services/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, doc-windows, >>> package-unix, >>> package-windows, package, dist_installer, import, >>> copy-dependencies-reports, >>> test-windows, doc-unix, doc, dist, hotdeploy, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, generate-dependencies-reports, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/build.xml with >>> URI = >>> file:/Users/admin/Downloads/services/services/authentication/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication >>> [property] Loading Environment env. >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> [ant] Entering >>> /Users/admin/Downloads/services/services/authentication/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, undeploy, clean-windows, >>> install-unix, install-windows, install, deploy, package-unix, >>> package-windows, package, test-windows, dist, clean-unix, clean, >>> test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> Detected Java version: 1.6 in: >>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home >>> Detected OS: Mac OS X >>> [ant] calling target(s) [create_db] in build file >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> parsing buildfile >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> with URI = >>> >>> file:/Users/admin/Downloads/services/services/authentication/pstore/build.xml >>> Project base dir set to: >>> /Users/admin/Downloads/services/services/authentication/pstore >>> [property] Loading Environment env. >>> [property] Loading /Users/admin/Downloads/services/build.properties >>> [ant] Entering >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml... >>> Build sequence for target(s) `create_db' is [create_db] >>> Complete build sequence is [create_db, check.db.scripts.deploy.dir, >>> undeploy, clean-windows, setup_hibernate.cfg, install-unix, >>> install-windows, >>> install, deploy, package-unix, package-windows, package, gen_ddl-unix, >>> test-windows, gen_ddl-windows, dist, clean-unix, clean, init, test-unix, >>> gen_ddl, test, ] >>> >>> create_db: >>> [sql] connecting to jdbc:postgresql://localhost:5432/cspace >>> [sql] Loading org.postgresql.Driver using a cached AntClassLoader. >>> [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml. >>> [ant] Exiting >>> /Users/admin/Downloads/services/services/authentication/build.xml. >>> [ant] Exiting /Users/admin/Downloads/services/services/build.xml. >>> >>> BUILD FAILED >>> /Users/admin/Downloads/services/build.xml:210: The following error >>> occurred >>> while executing this line: >>> /Users/admin/Downloads/services/services/build.xml:136: The following >>> error >>> occurred while executing this line: >>> /Users/admin/Downloads/services/services/authentication/build.xml:117: >>> The >>> following error occurred while executing this line: >>> >>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>> org.postgresql.util.PSQLException: FATAL: password authentication failed >>> for >>> user "cspace" >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291) >>> at >>> >>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108) >>> at >>> >>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) >>> at >>> >>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) >>> at >>> >>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) >>> at >>> >>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22) >>> at >>> >>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30) >>> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) >>> at org.postgresql.Driver.makeConnection(Driver.java:393) >>> at org.postgresql.Driver.connect(Driver.java:267) >>> at >>> org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370) >>> at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942) >>> at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at >>> >>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:390) >>> at org.apache.tools.ant.Target.performTasks(Target.java:411) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1368) >>> at >>> >>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251) >>> at org.apache.tools.ant.Main.runBuild(Main.java:809) >>> at org.apache.tools.ant.Main.startAnt(Main.java:217) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >>> >>> Total time: 1 second >>> >>> Al Bersch >>> Digital Project Coordinator >>> Oakland Museum of California >>> 1000 Oak Street, Oakland, CA 94607 >>> abersch@museumca.org >>> 510-318-8468 >>> ________________________________ >>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>> To: "Al Bersch" <abersch@museumca.org> >>> Sent: Friday, May 25, 2012 9:32:47 AM >>> >>> Subject: Re: [Talk] space user password error >>> >>> Hi Al, >>> >>> Many thanks - it's terrific you resolved this in this way! And >>> your note on the Talk list will help others who may run into the same >>> situation. >>> >>> (Until reading your note, I wasn't aware of the ENCRYPTED option for >>> passwords in PostgreSQL: >>> http://www.postgresql.org/docs/9.1/static/sql-createuser.html). >>> >>> Best, >>> Aron >>> >>> >>> On Fri, May 25, 2012 at 8:56 AM, Al Bersch <abersch@museumca.org> wrote: >>>> Hi Aron, >>>> >>>> Thanks for getting back to me so quickly. Shame on me - "space" was my >>>> typo. >>>> >>>> We did reset the password for the PostgreSQL >>>> >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE, but were still getting error messages. >>>> >>>> We then tried resetting the password as unencrypted, and that seemed to >>>> resolve the authentication issue. So I believe we are set. >>>> >>>> Thanks for your help! >>>> >>>> Al >>>> >>>> Al Bersch >>>> Digital Project Coordinator >>>> Oakland Museum of California >>>> 1000 Oak Street, Oakland, CA 94607 >>>> abersch@museumca.org >>>> 510-318-8468 >>>> ________________________________ >>>> From: "Aron Roberts" <aron@socrates.berkeley.edu> >>>> To: "Al Bersch" <abersch@museumca.org> >>>> Cc: talk@lists.collectionspace.org >>>> Sent: Thursday, May 24, 2012 5:03:32 PM >>>> Subject: Re: [Talk] space user password error >>>> >>>> >>>> Hi Al, >>>> >>>> Does that message really say, "password authentication failed for >>>> user "space"' - rather than 'user "cspace"'? >>>> >>>> The script you're running when you type "ant create_db import" (an >>>> Ant 'buildfile'), uses the value of a variable called >>>> "${db.cspace.user}". That value is set (hard-coded) to 'cspace' in >>>> the file /Users/admin/Downloads/services/build.properties. If you're >>>> truly seeing "space" in the error message, you might first check the >>>> value of 'db.cspace.user' in build.properties, and make sure it's >>>> "cspace", not "space". >>>> >>>> You can also run "ant create_db import -v" (note the '-v" flag to >>>> generate very verbose messages), and look at the value of >>>> db.cspace.user right before the script terminates in that error. >>>> >>>> Second, assuming that you are using 'cspace' as your database user >>>> name, you'll want to check that the password for the 'cspace' user >>>> used by this script, which attempts to log into the database as that >>>> user - which in turn is the password you've set in the >>>> $DB_PASSWORD_CSPACE environment variable - is the same as the actual >>>> password for the PostgreSQL database user named "cspace". In other >>>> words, you might try resetting the password for the PostgreSQL >>>> database user named "cspace" to match the value of that password in >>>> $DB_PASSWORD_CSPACE. >>>> >>>> http://www.postgresql.org/docs/9.1/static/sql-alterrole.html >>>> >>>> * Log into PostgreSQL as an administrative user, such as the >>>> 'postgresql' user. >>>> * Enter: >>>> ALTER ROLE cspace WITH PASSWORD >>>> 'password_from_DB_PASSWORD_CSPACE_goes_here'; >>>> >>>> Aron Roberts >>>> UC Berkeley >>>> >>>> >>>> On Thu, May 24, 2012 at 4:27 PM, Al Bersch <abersch@museumca.org> wrote: >>>>> Hello, >>>>> >>>>> After following the steps for creating our tenant we get an error when >>>>> we >>>>> run the ant create_db import. With the following error: >>>>> >>>>> >>>>> >>>>> /Users/admin/Downloads/services/services/authentication/pstore/build.xml:160: >>>>> org.postgresql.util.PSQLException: FATAL: password authentication >>>>> failed >>>>> for >>>>> user "space". >>>>> >>>>> We believe we verified the password is set to what our environment >>>>> variable >>>>> is set to: $DB_PASSWORD_CSPACE. >>>>> >>>>> We would appreciate any ideas/advice! >>>>> >>>>> Thank you! >>>>> Al Bersch >>>>> Digital Project Coordinator >>>>> Oakland Museum of California >>>>> 1000 Oak Street, Oakland, CA 94607 >>>>> abersch@museumca.org >>>>> 510-318-8468 >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> >>>>> >>>>> >>>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>>> >>>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >