General Troubleshooting - Server running on a Linux VM via Docker
Docker-related General Troubleshooting
- Gather all current logs to share with the vFunction Support Team
### Creates a Version and Timestamped TGZ 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
- 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/
- List all Docker Containers
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
### List only Containers that are running
docker ps
### List all Containers, even those that have been stopped
docker ps -a
- 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 IDP service, the URL is: [Server URL]/version (e.g., https://vfunction.mydomain.com/version)
</div>
* Get logs from a running Container
<div style="padding-left: 50px">
Find-and-replace $CONTAINER_NAME with the actual name
```bash
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
- Inspect a running Container
Find-and-replace $CONTAINER_NAME with the actual name
docker inspect $CONTAINER_NAME
- 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:
- 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
- Make sure the hostname is defined and reachable in a DNS server or in your local hosts file
- Confirm the hostname is correct in the server-installation.yaml
- Make sure the admin account e-mail and password are correct in the server-installation.yaml
- Attempt to login from an incognito/private window. If that works, clear your browser’s cache and cookies
- 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.