How to Check if a Datameer Service is Running and Accessible

Goal

When troubleshooting Datameer service startup and connectivity issues, using the command line interface (CLI) may be required.

This guide will explain the commands that are helpful for debugging.

Learn

Check if a service is running

You want to check if there is a process running which belongs to Datameer.

You can do this either via the conductor check option:

bin/conductor.sh check

This command will print the process ID (PID) under which the Datameer service is running on the last line.

Example

$ bin/conductor.sh check
Java 7 found
DeployMode: live
DAS Options:  -Ddb.name=dap
Java native libraries: /Users/<user>/Development/Datameer/Datameer-<version>-<dist>/lib/native
Checking arguments to Jetty:
JETTY_HOME     =  /Users/<user>/Development/Datameer/Datameer-<version>-<dist>
JETTY_CONF     =  /Users/<user>/Development/Datameer/Datameer-<version>-<dist>/etc/jetty.conf
JETTY_RUN      =  /tmp
JETTY_PID      =  /tmp/jetty-dap.pid
JETTY_PORT     =  8443
JETTY_LOGS     =
CONFIGS        =  /Users/<user>/Development/Datameer/Datameer-<version>-<dist>/etc/jetty.xml
JAVA           =  /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java
JAVA_OPTIONS   =  -Xmx2048m -XX:MaxPermSize=384m -Xms256m -XX:MaxNewSize=448m -XX:SurvivorRatio=6 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Dfile.encoding=utf-8 -server -Ddeploy.mode=live  -Ddb.name=dap -Djetty.port=8443
CLASSPATH      =
Jetty running pid=<PID>

Or using the CLI command:

ps -ef | grep -i "java.*jetty.*datameer" | grep -v grep | tr -s " " | cut -d " " -f 2
<PID>

whereby you use 2 for Linux systems and 3 for OS X 10.x

Check if service is listening

Now you should verify that the service is listening on the correct port.

lsof -i tcp@<hostname>:<port>
lsof -i tcp | grep 'datameer' 

Check if service is accessible

1) HTTP

You can access the service via REST API calls:

curl --verbose -u '<user>:<pass>' -X GET "http://`hostname`:<port>/license/product-id" 

2) HTTPS/SSL

To connect to the service you can use:

curl --verbose --insecure -u '<user>:<pass>' -X GET "https://`hostname`:<port>/license/product-id"

or check if the login page gives a response

echo -e "GET /login \n\n" | openssl s_client -connect `hostname`:<port> -quiet | grep -io 'datameer'
echo -e "GET /login \n\n" | openssl s_client -connect `hostname`:<port> -state -msg