chaifeng/ufw-docker

Error on ufw-docker-agent

MrT3acher opened this issue · 2 comments

I get this error on the ufw-docker-agents:

ERROR: UFW is disabled or you are not root user.

possible causes:

  • readonly=true mount of /etc/ufw (I changed it manually, but it didn't solve the problem):

    ufw-docker/ufw-docker

    Lines 216 to 224 in 9df291d

    if ! docker service inspect "$ufw_docker_agent" &>/dev/null; then
    err "Not found ufw-docker-agent service, creating ..."
    docker service create --name "$ufw_docker_agent" --mode global \
    --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
    --mount type=bind,source=/etc/ufw,target=/etc/ufw,readonly=true \
    --env ufw_docker_agent_image="${ufw_docker_agent_image}" \
    --env DEBUG="${DEBUG:-}" \
    --env "${service_env}" \
    "${ufw_docker_agent_image}"
  • ufw-docker-agents hasn't access to iptables:
    image

Just fix it, check out the latest commit.

Get a similar error:
ufw-docker-agent.0.uqfesppjxm0p@a12 | ERROR: UFW is disabled or you are not root user, or mismatched iptables legacy/nf_tables, current iptables v1.8.7 (nf_tables)