WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsAnd we're up and running!! thank you!!! I don't know which step did it, but here's what I checked:
verify postgre server is running -- yes
connect to it with psql -- yes
check DB_HOST, DB_PORT, and DB_CSADMIN_PASSWORD environment variables
DB_HOST = "localhost"
DB_PORT = "5432"
DB_CSADMIN_PASSWORD = "_____" -- reset in psql to be sure
check /etc/postgresql/9.5/main/pg_hba.conf for more entries like earlier versions would have
already had following entries
host - all - all - samehost - md5
host - cspace_default - cspace_default - samehost - md5
host - nuxeo_default - nuxeo_default - samehost - md5
host - cspace - cspace - samehost - md5
host - all - nuxeo - samehost - md5
added following
host - all - csadmin - samehost - md5
Restarted postgresql, rebuilt everything, restarted...and it worked!
Phew! Now I can get back to data entry and documentation. :)
Elayne
-------- Original Message --------
Subject: Re: [Talk] [FWD: RE: Upgrading and migrating to new server]
From: Ray Lee <rhlee@berkeley.edu>
Date: Sun, December 03, 2017 4:21 pm
To: Elayne Glantzberg <solinox@solinoxenterprises.com>
Cc: CollectionSpace Talk List <talk@lists.collectionspace.org>Also I think the 4.4 postgres installation instructions might be missing a step? It seems like there should be more entries in pg_hba.conf than just the one it tells you to add for csadmin. The pg_hba.conf entries should probably look the same as they did in your previous version.
Ray
On Sun, Dec 3, 2017 at 1:04 PM, Ray Lee <rhlee@berkeley.edu> wrote:
Hi Elayne,It looks like CollectionSpace is not able to connect to the postgres database. That sometimes will show up as this exception on getDatabaseProductType:
java.lang.NullPointerException
at org.collectionspace.services.common.storage.JDBCTools.getDatabaseProductType(JDBCTools.java:454)
at org.collectionspace.services.common.ServiceMain.createNuxeoDatabases(ServiceMain.java:552)
at org.collectionspace.services.common.ServiceMain.initialize(ServiceMain.java:181)
at org.collectionspace.services.common.ServiceMain.getInstance(ServiceMain.java:137)
at org.collectionspace.services.common.ServiceMain.getInstance(ServiceMain.java:121)
at org.collectionspace.services.common.CollectionSpaceServiceContextListener.contextInitialized(CollectionSpaceServiceContextListener.java:25)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[ERROR] ***
[ERROR] The CollectionSpace Services could not initialize. Please see the log files for details.
[ERROR] ***
I would next verify that postgres is running, you can connect to it with psql, and that your DB_HOST, DB_PORT, and DB_CSADMIN_PASSWORD environment variables were set correctly when you built the services layer.
Ray
On Sun, Dec 3, 2017 at 9:23 AM, Elayne Glantzberg <solinox@solinoxenterprises.com> wrote:
-------- Original Message --------
Subject: RE: [Talk] Upgrading and migrating to new server
From: "Elayne Glantzberg" <solinox@solinoxenterprises.com>
Date: Sun, December 03, 2017 12:22 pm
To: "Ray Lee" <rhlee@berkeley.edu>Here you go, fresh from startup.
Elayne Glantzberg
-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: Ray Lee <rhlee@berkeley.edu>
Date: Sun, December 03, 2017 3:51 am
To: Elayne Glantzberg <solinox@solinoxenterprises.com>
Cc: CollectionSpace Talk List <talk@lists.collectionspace.org>Hi Elayne,That error might be a problem, but I'm not sure if it would cause the services not to start. Could you attach your catalina.out and cspace-services.log logs? Delete all the logs first, then start tomcat, so you'll only have logs from that one startup.
Ray
On Sat, Dec 2, 2017 at 5:05 PM, Elayne Glantzberg <solinox@solinoxenterprises.com> wrote:
Ok, I quit for today. I got everything working well enough that I could run through all the mvn and ant commands without fails, and even remembered the ant import. Still I am getting the same problem: I can see the login screen, but when I try to login I get "Connection to the Services API failed. Service layer may have failed to start or needs to be restarted." The only error I can find in the logfiles is a reference in both catalina.out and cspace-app indicating "Source file for "Include" tag could not be found: local-atcmuseum-settings.xml"
help?
-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: "Elayne Glantzberg" <solinox@solinoxenterprises.com>
Date: Sat, December 02, 2017 6:21 pm
To: talk@lists.collectionspace.orgNevermind. I parsed it and it went nowhere. Going through logs now.
-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: "Elayne Glantzberg" <solinox@solinoxenterprises.com>
Date: Sat, December 02, 2017 4:20 pm
To: "Yousuf Nejati" <yousufnejati@gmail.com>
Cc: CollectionSpace Talk List <talk@lists.collectionspace.org>Took a break, went back to look at everything and realized that I accidentally ran the mvn tasks from the root user instead of the cspace user, so the permissions and things were off. So I ran mvn clean from root, then went back to run mvn clean install -DskipTests from the cspace user. Services went great, application almost runs and then it gives me this error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:exec (default) on project war-entry: Result of /bin/sh -c cd /home/cspace/collectionspace-source/application/war-entry && ant -Dconfig_destination=/usr/local/share/apache-tomcat-7.0.57/lib execution is: '1'.
I'm trying to figure out what this is on my own, but on the off-chance somebody is on this weekend...help?
Elayne Glantzberg
Database Administrator
Aquarian Tabernacle Church
-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: Yousuf Nejati <yousufnejati@gmail.com>
Date: Thu, November 16, 2017 10:04 pm
To: Elayne Glantzberg <solinox@solinoxenterprises.com>
Cc: Ray Lee <rhlee@berkeley.edu>, CollectionSpace Talk List
<talk@lists.collectionspace.org>Take a look at any errors as a result of the ant deploy task. Take a look at the services log for any errors. Post anything that seems unusual to the talk list and we should be able to help you. -Y
p.s. Don't forget to recursively set the ownership of the data directory to the cspace user.
On Thu, Nov 16, 2017 at 6:34 PM, Elayne Glantzberg <solinox@solinoxenterprises.com> wrote:
Thank you so much, guys, this was definitely the information I needed!
And yet...I'm stuck again. Everything looks beautiful until I actually go to login to the new system, at which point I get an error message saying the connection to the services API failed. So close...
Can you help me from this point? Here's a log of what I've done so far. All of the data should be on the new system and intact at this point.
- Follow v4.4 installation through psql section, then rsync dump file and restore
- Continue v4.4 installation through setting up tomcat section, then rsync apache-tomcat-7.0.57/nuxeo-server/data
- Update environment variables
- Create collectionspace-source directory, then rsync from old server
- Run build and deploy mvn commands, then "ant undeploy deploy" with no arguments (to preserve existing data)
- start up server "$CSPACE_JEESERVER_HOME/bin/startup.sh"
- Go to website homepage
- Try to login
- Got "Connection to the Services API failed. Service layer may have failed to start or needs to be restarted."
- tested ":8180/cspace-services/acquisitions" and got a failure
- shut down server
- rerun "ant undeploy deploy" as root from services folder; BUILD FAILED
- added environment variables to root bash, source
- rerun "ant undeploy deploy" as root from services folder
- start up server -- same error
- shut down server
- rerun all build and deploy commands as root, both mvn and ant -- still failed
Thank you,
Elayne Glantzberg
Database AdministratorAquarian Tabernacle Church
-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: Ray Lee <rhlee@berkeley.edu>
Date: Thu, November 16, 2017 6:09 pm
To: Yousuf Nejati <yousufnejati@gmail.com>
Cc: Elayne Glantzberg <solinox@solinoxenterprises.com>, CollectionSpace
Talk List <talk@lists.collectionspace.org>Hi Elayne,
I second everything Yousuf said. I usually do this in three steps:1. Install a fresh copy of CSpace on the new server. Make sure it's accessible by a browser, and you can save records.
2. Install your customizations, if any. This means transferring over any customizations you have in the services, application, and ui source code directories. We store our customizations in GitHub, so I do a git clone on the new server to install them. After building and deploying, you should see your customizations on the new server. If you didn't customize CollectionSpace, skip this.
3. Transfer your data. I usually rsync the nuxeo-server/data directory to transfer binaries, and then use pg_dump to dump the postgres databases, and restore them on the new server with pg_restore.Ray
On Thu, Nov 16, 2017 at 12:42 PM, Yousuf Nejati <yousufnejati@gmail.com> wrote:
Hi Elayne,
Since you are pressed for time, I would suggest sticking with v4.4 for now on the new host server and then upgrading to v4.5 at a later date. There are different ways to go about this and it varies depending on how you've implemented your system. However, my brief suggestions should work in most cases.
I would create a remote git project repository (Github, Bitbucket, Gitlab, etc.) for all three layers of CollectionSpace (ui, application, and services) and store your source code there so that you may recreate it on the new host server. I would then shut down your CollectionSpace instance and preform an all database dump. Then, I would copy and compress the data directory that contains your blobs, which is located at apache-tomcat-7.0.57/nuxeo-server/data. Both the database dump file and the compressed data directory can then be copied to your new host server for the restore. Be sure to also make a copy of the environmental variables found in your .bashrc or similar so that they can be recreated on the new host server.
On the new host server follow the CollectionSpace manual installation instructions for your host server. This time, instead of cloning the source code from the CollectionSpace remote code repository, clone your source code, that you pushed to a remote repository in the last step, locally. Add your env variables to the .bashrc of the cspace user on the new host server. Restore the database on your new host server with the database dump. Decompress and add the copy of the data directory to its location on the new host server. Finish the install. Do not recreate the database when you run the ant undeploy deploy task after you restored the database because you will lose your data. Simply run 'ant undeploy deploy', excluding '...create_db -Drecreate_db=true import'. That should be the bulk of it. You may want to deploy CollectionSpace and make sure its running properly on the new host server before doing all of this.
If you have anymore questions, let us know. Good luck.
-Yousuf
On Thu, Nov 16, 2017 at 10:29 AM, Elayne Glantzberg <solinox@solinoxenterprises.com> wrote:
I sent out a message last weekend but got no response. I've been working on this all week, and some assistance or guidance would be very helpful. I need to move our tenanted system from one server to a new server, ASAP because the host of the old server is shutting down. The original system was running postgresql-9.3, tomcat 7.0.57, cspace 4.4. The new system is going to be running postgresql-9.5, tomcat 7.0.64, and cspace 4.5. What I'm trying to do right now is upgrade the old system on all three fronts, do a full basic install on the new system, and then rsync the postgres and cspace folders from the old system to the new system. I managed to successfully upgrade the postgres system to 9.5, and verified by relaunching everything and successfully logging in and viewing data. At the moment, I'm not sure what all I should be doing to move the old system from 4.4 to 4.5, there is zero guidance available in the wiki even though it has been updated so that all the paths now point to 4.5.
Am I on the right track at least? Any help would be greatly appreciated.
Thank you,
Elayne Glantzberg
Database Administrator
Aquarian Tabernacle Church
_______________________________________________
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org--
Yousuf D. Nejati_______________________________________________
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org--
Yousuf D. Nejati
_______________________________________________
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