Starting Up the CollectionSpace Server

Task Description

This task describes how to start the CollectionSpace server.

Prerequisites

Before starting the CollectionSpace server, you should be familiar with running commands at your operating system's command prompt.

You must also have installed CollectionSpace via the relevant installation guide in Installing CollectionSpace.

In the instructions below, CSPACE_JEESERVER_HOME is an environment variable that holds the path to your CollectionSpace server home folder. If it is not set, please review your installation steps. You won't be able to continue until this and the other required environment variables are set correctly.

Starting CollectionSpace

To start up the CollectionSpace server:

  • Login to your system as the collectionspace user that was created when you installed CollectionSpace

  • As the collectionspace user on Linux/Unix/Mac OS X, at your command prompt, enter:

    $CSPACE_JEESERVER_HOME/bin/startup.sh

Validate

Check server logs

Check for a server log message indicating that the CollectionSpace server has started up. You can look for this message in the log file $CSPACE_JEESERVER_HOME/logs/catalina.out

The startup message in the log file may look something like the following:

02-Apr-2024 23:19:40.339 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8180"]
02-Apr-2024 23:19:40.346 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 590505 ms

Even though a startup message appears, this message does not absolutely indicate a working CollectionSpace system. Non-fatal but nonetheless serious errors could have occurred during the startup process. As a best practice, at each startup, System Administrators should review server logs for evidence of error conditions that could impede proper behavior of the system.

Try sending an API request

To see if the installation was successful and that the CollectionSpace server started up without problems.  Try the following command:

curl -i -u admin@core.collectionspace.org:Administrator http://localhost:8180/cspace-services/collectionobjects

Replace Administrator with the password you set for the built-in admin user, if you've already done that step.

If successful, you should see output that looks something like this:

HTTP/1.1 200 
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Type: application/xml
Content-Length: 1415
Date: Wed, 03 Apr 2024 03:03:21 GMT

If you don't see "HTTP/1.1 200" in the first line of the output, review the installation instructions to see if you missed a step.  If you are not able to get past this error, contact the CollectionSpace community "Talk" list at talk@collectionspace.org.  Please include as much detail as possible so someone in the community can try to help you.

Check the list of running processes

An entry for the CollectionSpace server process should appear in your server's list of all running processes.

You can view these processes using the command line ps command in Linux. Your operating system may also provide graphical tool(s) that you can use to view running processes. Please see your operating system documentation for details.

The following is a sample entry that illustrates how to identify a running CollectionSpace process in your server's list of all running processes.  This list, in turn, was generated by entering the ps -ef command under Linux.  (This consists of the ps command, followed by the arguments -ef: to select every process (-e) and display in full format (-f).)

ps -ef

You should see something like this in the result:

collect+   15228     298  3 Apr02 pts/4    00:09:11 /usr/lib/jvm/java-8-openjdk-arm64//bin/java -Djava.util.logging.config.file=/opt/collectionspace/apache-tomcat-8.5.51/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dnuxeo.home=/opt/collectionspace/apache-tomcat-8.5.51/nuxeo-server -Dnuxeo.home.dir=/opt/collectionspace/apache-tomcat-8.5.51/nuxeo-server -Dnuxeo.log.dir=/opt/collectionspace/apache-tomcat-8.5.51/nuxeo-server/log -Dfile.encoding=UTF-8 -Duser.timezone=UTC -Xms512m -Xmx1024m -Dorg.collectionspace.services.elasticsearch.reset=false -Dorg.collectionspace.services.authorities.reset=false -Dlog4j2.formatMsgNoLookups=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -agentlib:jdwp=transport=dt_socket,address=localhost:8000,server=y,suspend=n -Xmx1524m -Dignore.endorsed.dirs= -classpath /opt/collectionspace/apache-tomcat-8.5.51/bin/bootstrap.jar:/opt/collectionspace/apache-tomcat-8.5.51/bin/tomca-juli.jar -Dcatalina.base=/opt/collectionspace/apache-tomcat-8.5.51 -Dcatalina.home=/opt/collectionspace/apache-tomcat-8.5.51 -Djava.io.tmpdir=/opt/collectionspace/apache-tomcat-8.5.51/temp org.apache.catalina.startup.Bootstrap start

Some of the words that might appear in this process list entry, that you could use to search for and identify this process, may include collectionspace, nuxeo, java, and tomcat.

Try logging in

You can try connecting to the login page for the demonstration core tenant on your server by pointing your web browser at:

http://{hostname}:8180/cspace/core/login

where {hostname} is either localhost (if the server is running on your computer), or the hostname or IP address of the server.

If the login page appears, you can then try logging in by following the instructions on that page.

See Also