General Troubleshooting - Server running on a Linux VM via Docker



Gather all Container Logs

  1. Generate a TGZ with all Docker Container logs in the /tmp directory
### Root / Sudo Installation
sudo bash /opt/vfunction/server-installation/collect-logs.sh

### Sudoless Installation - Find-and-replace $BASE_DIRECTORY with the Installation Location
bash $BASE_DIRECTORY/vfunction/opt/vfunction/server-installation/collect-logs.sh
  1. Unpack the TGZ and review the logs
  2. Share the logs files with the vFunction Customer Success team

Review only relevant Container Logs

  1. Navigate to the directory where vFunction writes logging
### Root / Sudo Installation
cd /var/log/vfunction/

### Sudoless Installation - Find-and-replace $BASE_DIRECTORY with the Installation Location
cd $BASE_DIRECTORY/vfunction/var/log/vfunction/
  1. Open the Logs from the relevant Container(s). For example:
### Root / Sudo Installation
less vfapi.log

List all Docker Container and Inspect any in a Problematic State

  1. List all Docker Containers
### List only Containers that are running
docker ps

### List all Containers, even those that have been stopped
docker ps -a
  1. The expected vFunction Containers are:
  • vfunction-fluentd (optional)
  • Vfunction-monit (optional)
  • vfunction-mysql
  • vfunction-nginx
  • vfunction-vfapi-dm
  • vfunction-vfapi-idp
  • vfunction-vfapi-measurements
  • vfunction-vfapi-organizations
  • vfunction-vfapi-otlp
  • vfunction-vfapi-parser
  • vfunction-vfapi-users
  1. Inspect a Container that is Unhealthy. For example:
docker inspect vfunction-vfapi-measurements

Confirm vFunction API Services are up-and-running

For each service, you can check the status of the process using the URL in the form

[server URL]/api/unauth/[service name]/version

Examples:

https://vfunction.mydomain.com/api/unauth/users/version
https://vfunction.mydomain.com/api/unauth/measurements/version
https://vfunction.mydomain.com/api/unauth/organizations/versión

For the IDP service, the URL is: [Server URL]/version (e.g., https://vfunction.mydomain.com/version)


Gather Recent Container Logs

Find-and-replace $CONTAINER_NAME with the actual name

docker logs $CONTAINER_NAME

### Show new log output as the Container runs
docker logs $CONTAINER_NAME --follow

### Show log entries in the last 10 minutes
docker logs $CONTAINER_NAME --since=10m

See resources for a running Container

Find-and-replace $CONTAINER_NAME with the actual name

docker stats $CONTAINER_NAME

Execute commands on a running Container

Find-and-replace $CONTAINER_NAME with the actual name

### Access a running Container
docker exec -it $CONTAINER_NAME bash

Uninstall vFunction

docker stop vfunction-monit
systemctl restart docker
docker rm $(docker ps -a -f "name=vfunction" -q)
docker network rm vfunction
docker volume rm mysql_vol vfapi_measurements_storage_vol
docker system prune --all
rm -rf /etc/sysconfig/vfunction
rm -rf /opt/vfunction
rm -rf /var/log/vfunction

Login Issues

Take the following steps to debug issues logging into the vFunction Server UI:

  1. Confirm the hostname and IP Address used to login in a browser are identical to the one defined in /etc/sysconfig/vfunction/installation/server-installation.yaml
  2. Make sure the hostname is defined and reachable in a DNS server or in your local hosts file
  3. Confirm the hostname is correct in the server-installation.yaml
  4. Make sure the admin account e-mail and password are correct in the server-installation.yaml
  5. Attempt to login from an incognito/private window. If that works, clear your browser’s cache and cookies
  6. If you are not an admin and still have problems to login in, contact your admin to make sure your user credentials are defined correctly.