Unable to detect docker driver

I have nomad running under non-root user and docker running as root user.

but my docker driver is not detected and getting error as driver not found while running jobs

[root@server4 nomad.d]# ps -ef|grep nomad
nomad       3403       1  0 03:55 ?        00:00:01 /usr/local/bin/nomad agent -config /etc/nomad.d
root        3439    1718  0 03:59 pts/0    00:00:00 grep --color=auto nomad
[root@server4 nomad.d]# ps -ef|grep docker
root        3268       1  0 03:55 ?        00:00:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root        3441    1718  0 03:59 pts/0    00:00:00 grep --color=auto docker
[root@server4 nomad.d]#

Error: * Constraint missing drivers filtered 2 nodes

I resolved the issued.

Nomad clients should always run as root user.

Nomad servers should always run as nomad user.

2 Likes

Exactly, more details:

Nomad servers and Nomad clients have different requirements for permissions.

Nomad servers should be run with the lowest possible permissions. They need access to their own data directory and the ability to bind to their ports. You should create a nomad user with the minimal set of required privileges.

Nomad clients should be run as root due to the OS isolation mechanisms that require root privileges. While it is possible to run Nomad as an unprivileged user, careful testing must be done to ensure the task drivers and features you use function as expected. The Nomad client’s data directory should be owned by root with filesystem permissions set to 0700.

Reference: Nomad Agent | Nomad | HashiCorp Developer