Pryv.io platform validation guide

This procedure describes the steps to validate that a Pryv.io platform is up and running. You can directly jump to the Checklist section to proceed to a quick check-up of your Pryv.io platform. Troubleshooting steps can be found at the end of this document in case of validation failure.

Table of contents

  1. Variables
  2. Tools
    1. DNS checks:
    2. HTTP checks:
  3. Checklist
    1. DNS is set as domain name server
    2. DNS
    3. Core
    4. Register
  4. Troubleshoot
    1. File permissions
    2. DNS issues
      1. Redis database unreachable
      2. Configuration error
      3. Port is unreachable from the Internet
    3. Core issues
      1. Configuration error
      2. Waiting on database connection
    4. NGINX issues
      1. Configuration error
    5. Register issues
      1. Configuration error
      2. Redis database unreachable

Variables

As this guide is platform-agnostic, we will use variables ${VARIABLE_NAME} which must be replaced in the commands.

In particular, the following variables should be replaced :

Tools

Depending on your skill set, this can be done using CLI tools or a web interface.

DNS checks:

HTTP checks:

Checklist

DNS is set as domain name server

Run the following command:

dig NS +trace +nodnssec ${DOMAIN}

The 2 last blocks should display hostnames that resolve to the machine running your Pryv.io DNS such as:

${YOUR-DOMAIN}.		SOME_TTL_VALUE	IN	NS	dns1-pryv.${YOUR-DOMAIN}.
${YOUR-DOMAIN}.		SOME_TTL_VALUE	IN	NS	dns2-pryv.${YOUR-DOMAIN}.

The last block should be followed by a line indicating that it is coming from your Pryv.io DNS such as:

;; Received 123 bytes from ${YOUR-DNS-IP-ADDRESS}#53(dns1-pryv.${YOUR-DOMAIN}) in 15 ms

DNS

Run the following command:

dig reg.${DOMAIN}

The ANSWER section should exist and list a hostname such as:

;; ANSWER :
reg.${DOMAIN}.  SOME_TTL_NUMBER  IN  A  ${REGISTER_MACHINE_IP_ADDRESS}

If there is no ANSWER section, this means that the DNS is not running or is unreachable. See DNS section.

Core

Run curl -i https://${CORE_MACHINE_HOSTNAME}/status or open https://${CORE_MACHINE_HOSTNAME}/status.

The hostname of the first core should be co1.${DOMAIN} by default (co2.${DOMAIN} and so on for the other ones in case of cluster deployment).

Register

Run curl -i https://reg.${DOMAIN}/wactiv/check_username or open https://reg.${DOMAIN}/wactiv/check_username. For DNS-less, use curl -i https://${HOSTNAME}/reg/wactiv/check_username or open https://${HOSTNAME}/reg/wactiv/check_username.

HTTP status:

Troubleshoot

File permissions

If you encounter permission issues on data and log files, those handy scripts make sure they are set correctly:

DNS issues

  1. SSH to the machine
  2. Access the DNS container logs on the register machine: docker logs -f --tail 50 ${DNS_CONTAINER_NAME}.

Redis database unreachable

The logs contain the following error Error: Redis connection to redis:6379 failed - getaddrinfo ENOTFOUND redis redis:6379.
See the Redis logs: tail -f ${PRYV_CONF_ROOT}/reg-master/redis/log/redis.log
Fix issue if possible, otherwise send the last 100 lines of the log file to your Pryv tech contact. Run tail -n 100 ${PRYV_CONF_ROOT}/reg-master/redis/log/redis.log > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Configuration error

If the service keeps rebooting with an error message, fix configuration if possible.
Otherwise, send the last 100 lines of the DNS log file to your Pryv tech contact. Run docker logs --tail 100 ${DNS_CONTAINER_NAME} > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Port is unreachable from the Internet

If there are no errors in the logs, the machine might simply not be reachable from the Internet on port UDP/53.

  1. SSH to the register machine
  2. Make a DNS request: dig @localhost reg.${DOMAIN}

If the request yields an answer, your firewall settings might be set wrong. You must allow INGRESS UDP/53 as defined in the Infrastructure procurement guide from the Customer Resources page.

Core issues

  1. SSH to core machine
  2. Read logs & fix issue if possible: docker logs -f --tail 50 ${CORE_CONTAINER_NAME}
  3. Reboot if necessary: docker stop ${CORE_CONTAINER_NAME} && ./run-core
  4. Send container log to your Pryv tech contact. Run docker logs --tail 100 ${CORE_CONTAINER_NAME} > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Configuration error

If the service keeps rebooting with an error message, fix configuration if possible.
Otherwise, send the last 100 lines of the container log to your Pryv tech contact. Run docker logs --tail 100 ${CORE_CONTAINER_NAME} > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Waiting on database connection

If the service is waiting on the database to be available for connection: [database] Cannot connect to mongodb://mongodb:27017/pryv-node, retrying in a sec
check MongoDB status: tail -f ${PRYV_CONF_ROOT}/core/mongodb/log/mongodb.log

NGINX issues

  1. SSH to core/register machine
  2. Read logs & fix issue if possible: docker logs ${NGINX_CONTAINER_NAME}
  3. Reboot if necessary: docker stop ${NGINX_CONTAINER_NAME} && ./run-core
  4. Send error log to your Pryv tech contact. Run docker logs --tail 100 ${NGINX_CONTAINER_NAME} > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Configuration error

If the log file has a line such as: 2019/01/28 12:44:07 [emerg] ERROR MESSAGE ..., fix issue if possible.
Otherwise, send error log to your Pryv tech contact. Run docker logs --tail 100 ${NGINX_CONTAINER_NAME} > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Register issues

  1. SSH to the register machine
  2. Read logs & fix issue if possible: docker logs -f --tail 50 ${REGISTER_CONTAINER_NAME}
  3. Reboot if necessary: docker stop ${REGISTER_CONTAINER_NAME} && ./run-reg-master
  4. Send error log to your Pryv tech contact. Run docker logs --tail 100 ${REGISTER_CONTAINER_NAME} > ${DATE}-${ISSUE_NAME}.log to generate the log file.

Configuration error

Service keeps rebooting with an error message - fix configuration if possible and reboot the service.

Redis database unreachable

See this section under DNS.