vFunction Server installation generates, 'Permission Denied' error on automated-custom-env.list



Overview of the Issue

This issue occurs in the following circumstances:

  1. An organization installs Docker on a Linux VM for the vFunction Server
  2. The organization configured the required fields in the server-installation.yaml
  3. When running the install.sh script, the following error is generated:
2024-06-27 04:10:16.220 Running docker with command: docker run --name vfunction-mysql --network=vfunction --ulimit nofile=65536:65536 --env-file /etc/sysconfig/vfunction/mysql/automated-custom-env.list --add-host=vfunction-vfapi-organizations:172.18.0.1 -v mysql_vol:/opt/vfunction -p 3306:3306 --log-driver=fluentd --log-opt tag=docker.{{.Name}} --log-opt fluentd-address=172.18.0.1:24224 --restart=no --user 999:999 --security-opt no-new-privileges --cap-drop=all -d vfunction/vfunction-mysql-debian:v3.6.1418
docker: open /etc/sysconfig/vfunction/mysql/automated-custom-env.list: permission denied.
See 'docker run --help'
Waiting for mysql to initialize...
vfunction-mysql:
vfunction-mysq:
vfunction-mysql: 

The following steps can be used to resolve this issue:

  1. Remove any vFunction Containers, Networks and Volumes which may have been partially installed and may prevent the install.sh script from continuing in the future
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
  1. Check the Docker version installed
which docker
  1. If the version of Docker listed here includes “snap” in the path, remove this version of Docker:
sudo snap remove docker
sudo reboot 
  1. Follow the steps provided by Docker to install the default version of Docker based on your flavor of Linux
  2. Run the vFunction install.sh script again to complete the vFunction Server Installation