Skip to content

Nomad Exception: no route to host on one node

Nomad Exception: no route to host on one node in Nomad Issues.

3 min read Updated SS RS

Nomad Exception: no route to host on one node#

Error querying jobs: Get https://localhost:4646/v1/jobs: dial tcp [::1]:4646: connect: no route to host
Error querying jobs: Get https://localhost:4646/v1/jobs: dial tcp [::1]:4646: connect: no route to host

Solution: A stray G character had been added to the /etc/hosts file. After removing it, the localhost route resolved correctly and connectivity was restored.

Nomad agent error log around the /etc/hosts entry (red-highlighted) before the fix is applied

Nomad Port 4646 VAPT#

Solution: Set the TLS http tag to false in the .hcl file (located under /etc/nomad/), set the Nomad address to HTTP in .bash_profile, and restart the Nomad services.

.hcl TLS block (lines 24-27) with http = false highlighted and rpc = true
ls -l / pwd confirming nomad_192.0.2.99.hcl (owned by appsone) under /etc/nomad

Bash profile:

Bash Profile: NOMAD exports (NOMAD_ADDR=http://localhost:4646) and a1nomad/a1home aliases set to http

Also change https to http for the NOMAD_URL variable in the startService.sh file.

Unable to Start Nomad Services Post Installation on RHEL 8.5 with Podman#

After installing Nomad services on RHEL 8.5 using Podman, the services fail to start, indicated by a “Response 500” error in the allocation ID.

Podman registry/allocation log showing the Response 500 allocation failure

Solution:

1. Run the Podman registry with the necessary configuration:

podman run --privileged -d --name podman-registry -p 8090:5000 \
  -v /appnomic/podmanrepo:/var/lib/registry \
  -e "REGISTRY_HTTP_TLS_CERTIFICATE=/var/lib/registry/appnomic.crt" \
  -e "REGISTRY_HTTP_TLS_KEY=/var/lib/registry/appnomic-key.pem" \
  -e REGISTRY_COMPATIBILITY_SCHEMA1_ENABLED=true \
  --restart=always registry:2

2. Verify that the registry is running:

podman ps -a

3. Edit the /etc/containers/registries.conf file to enable the required registry entries:

vi "/etc/containers/registries.conf"

4. Add or verify the following entries:

[registries.search]
registries = ["registry.access.redhat.com", "registry.redhat.io", "docker.io"]
[registries.insecure]
registries = ["heal.example:8090"]
[registries.block]
registries = []
unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"]

5. Confirm the registry is listening on the correct port:

netstat -anp | grep 8090

6. Test registry connectivity and view the available catalogs:

curl -k https://localhost:8090/v2/_catalog/
curl -k https://localhost:8090/v2/_catalog/ | jq

7. Load the necessary Docker images into Podman:

cd InfraService/
podman load -i percona_8.0.19.tar
podman images

8. Tag and push the images to the required nodes:

podman tag localhost/percona:8.0.19 uatsvrapm02.example:8090/percona:8.0.19
podman push uatsvrapm02.example:8090/percona:8.0.19

9. Test connectivity to the registry with nc (netcat):

nc -vz uatsvrapm02.example 8090
podman push uatsvrapm02.example:8090/percona:8.0.19

10. Ensure all configurations are correct and restart the services as needed to apply the changes. Correctly setting up and verifying the Podman registry and managing the Docker images should resolve the post-installation start failure.

NOMAD Service Start Issue#

Attempts to start services fail with the following error:

Constraint "missing drivers": 1 nodes excluded by filter.

Root cause: the constraint indicates that nodes were excluded due to a missing driver, caused by connectivity problems that arose during patching activities.

Solution: reboot the affected servers, which restores connectivity and resolves the start issue.

Nomad Cluster Formation Issue#

Issue: After rebooting the servers, checking the status of Nomad services and running nomad server members fails with an error. This was observed on three servers.

Error:

Error querying servers: Get "https://localhost:4646/v1/agent/members":
    dial tcp [::1]:4646: socket: address family not supported by protocol

Root cause: the issue was linked to a modification in /etc/hosts. Specifically, the second line of the file had been commented out, which prevented the server from resolving certain network addresses.

Solution: uncomment the second line in /etc/hosts on the affected servers, then restart the servers. Once the line is restored and the servers are restarted, the Nomad services form the cluster without errors.

Next — Return to the Troubleshooting Overview, or continue with Docker Issues and Keycloak Issues.