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 "
cspace
" user that was created when you installed CollectionSpaceAs the "
cspace
" user on Linux/Unix/Mac OS X, at your command prompt, enter:$CSPACE_JEESERVER_HOME/bin/startup.sh
Credentials for the cspace User
If you used the Automated Installer to install CollectionSpace, you can find the password for the "cspace
" user in the file initial_password.txt
in the home directory of the cspace user. To get there you'll need to perform this command:
sudo su - cspace
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:
Jan 15, 2016 3:41:17 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 38052 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 http://localhost:8180/cspace-services/collectionobjects -u admin@core.collectionspace.org:Administrator
If successful, you should see output that looks something like this:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=745CD7316C77FF98D2474C0640009FDD; Path=/cspace-services/; HttpOnly Content-Type: application/xml Content-Length: 383 Date: Wed, 20 Jul 2016 22:24:00 GMT
If you don't see "HTTP/1.1 200 OK
" 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 passed 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 for Linux, Unix and Mac OS X systems, or the command line tasklist
or wmic
commands for Windows systems. 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 as a result:
cspace 31303 1 17 17:07 pts/0 00:01:12 /usr/lib/jvm/java-7-openjdk-amd64/bin/java -Djava.util.logging.config.file=/usr/local/share/apache-tomcat-8.5.40
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 catalina
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/collectionspace/ui/core/html
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.
Testing with the API
To see if the installation was successful and that the CollectionSpace server started up without problems. Try the following command:
curl -i http://localhost:8180/cspace-services/collectionobjects -u admin@core.collectionspace.org:Administrator
If successful, you should see output that looks something like this:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=745CD7316C77FF98D2474C0640009FDD; Path=/cspace-services/; HttpOnly Content-Type: application/xml Content-Length: 383 Date: Wed, 20 Jul 2016 22:24:00 GMT
If you don't see "HTTP/1.1 200 OK
" 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 passed 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.