General Troubleshooting - Server running on a Linux VM via Docker



  • 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
### List only Containers that are running
docker ps

### List all Containers, even those that have been stopped
docker ps -a
  • Get logs from a running Container

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
  • 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