Problem with tutorial

I’m using the tutorial hosted here.

When I run the command waypoint install -platform=nomad -nomad-dc=dc1 -accept-tos I get the following output:

 ! Waiting for allocation "2462f785-cba3aa456c9d-1099dda4b388" to start
! Error installing server into nomad: allocation failed

If I look at the output of nomad I see something like this:

 2021-02-15T15:06:29.700+0100 [DEBUG] client.driver_mgr.docker: failed to start container: driver=docker container_id=10ea8400ae91380efa6a243f033d624edba03587357704a5c0011ac88953eda2 attempt=5 error="API error (500): 2a02:a210:2143:9500:414:4349:dd7:e991:31317 has invalid format, should be <ip>:[port]
"

I’ve followed the tutorial exactly up until this point. I’m not sure what exactly the problem is and I am looking for more expert advice on how to continue debugging this error.

When I open up the dashboard for docker desktop I can see both the image and the container are created. However the container is not started. When I try to start the container myself I get the same error:

HTTP CODE 500 SERVER ERROR: 2a02:a210:2143:9500:414:4349:dd7:e991:31317 has invalid format, should be <ip>:[port]

Looks like a problem (pattern matching) when using ipv6…

I think so too but I’m not sure how to put either nomad or waypoint into ipv4 mode. Probably this is docker not supporting ipv6. Unfortunately docker only supports ipv6 on linux, and I’m running Mac OS X.

Edit: However, the tutorial explicitly supports Mac OS X.

@dantheman0207 - How are you running Nomad? And what version are you running with? If you’re going with the local dev approach, which interface did you pick for Nomad when you started the agent? Thanks

Nomad version: Nomad v1.0.3 (08741d9f2003ec26e44c72a2c0e27cdf0eadb6ee)

The command I run to start Nomad is direct from the tutorial:
$ nomad agent -dev -network-interface="en0"
This should work as I believe en0 is the correct interface.

Thanks @dantheman0207 ! Hrm, yeah, that looks right to me. Can you also share the output of running docker version? I gave this a shot using Nomad v1.0.3 and Docker 20.10.3 on Linux and it works no issue. Perhaps there’s an issue with Docker Desktop here? If there’s a new version, try installing that and seeing if it makes a difference.

My docker version: Docker version 20.10.2, build 2291f61

According to this IPv6 is only supported on docker for linux, not docker for Mac. Looks like that’s the problem.

The tutorial should probably be updated to reflect this.

Thanks @dantheman0207. Good to know! We’ll be sure to get the Learn guide updated with that information. After following that guide and restarting docker, were you able to get Waypoint installed through Nomad?

I’m guessing actually the IPv6 setting would be off by default if you’re on Docker Desktop for Mac? I imagine explicitly turning it off might not make a difference? We’ll see if we can update the install job to have an option to explicitly use IPv4.

Great! When that is up I’ll be back to try waypoint again.

1 Like

Hey @dantheman0207

I work on Nomad and wanted to see if I could help get to the bottom of this. I’ve not heard of Nomad preferring an ipv6 address over ipv4 so this is quite interesting!

When you have your Nomad agent running would you be able to share the json output of the node read api request of your node?

Thanks!

Hey @nickethier ! Thanks for following up, I really appreciate that. I reran the commands and continue to have the same error, despite having updated docker for desktop to the latest version (3.1.0).

Here’s the JSON output:

{
	"ID": "2dcdebad-957f-7742-0543-6644e110202b",
	"SecretID": "",
	"Datacenter": "dc1",
	"Name": "MacBook-Pro-van-Daniel.local",
	"HTTPAddr": "127.0.0.1:4646",
	"TLSEnabled": false,
	"Attributes": {
		"driver.docker.bridge_ip": "172.17.0.1",
		"kernel.version": "19.6.0",
		"cpu.totalcompute": "10000",
		"os.signals": "SIGPROF,SIGTTIN,SIGUSR2,SIGWINCH,SIGHUP,SIGTSTP,SIGTTOU,SIGXCPU,SIGTRAP,SIGILL,SIGINT,SIGQUIT,SIGBUS,SIGIOT,SIGSTOP,SIGTERM,SIGCHLD,SIGCONT,SIGFPE,SIGPIPE,SIGUSR1,SIGALRM,SIGURG,SIGABRT,SIGKILL,SIGSEGV,SIGSYS,SIGXFSZ,SIGIO",
		"unique.storage.bytestotal": "119690149888",
		"memory.totalbytes": "8589934592",
		"nomad.version": "1.0.3",
		"driver.raw_exec": "1",
		"unique.network.ip-address": "2a02:a210:2143:9500:414:4349:dd7:e991",
		"driver.docker.runtimes": "io.containerd.runc.v2,io.containerd.runtime.v1.linux,runc",
		"cpu.numcores": "4",
		"driver.docker": "1",
		"os.name": "darwin",
		"cpu.frequency": "2500",
		"cpu.arch": "amd64",
		"os.version": "10.15.7",
		"nomad.revision": "08741d9f2003ec26e44c72a2c0e27cdf0eadb6ee",
		"driver.docker.os_type": "linux",
		"nomad.advertise.address": "127.0.0.1:4646",
		"driver.docker.version": "20.10.2",
		"cpu.modelname": "Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz",
		"kernel.name": "darwin",
		"unique.storage.bytesfree": "8875610112",
		"unique.hostname": "MacBook-Pro-van-Daniel.local",
		"unique.storage.volume": "/dev/disk1s5"
	},
	"NodeResources": {
		"Cpu": {
			"CpuShares": 10000
		},
		"Memory": {
			"MemoryMB": 8192
		},
		"Disk": {
			"DiskMB": 8464
		},
		"Networks": [{
			"Mode": "host",
			"Device": "en0",
			"CIDR": "2a02:a210:2143:9500:414:4349:dd7:e991/128",
			"IP": "2a02:a210:2143:9500:414:4349:dd7:e991",
			"MBits": 1000,
			"DNS": null,
			"ReservedPorts": null,
			"DynamicPorts": null
		}, {
			"Mode": "host",
			"Device": "en0",
			"CIDR": "2a02:a210:2143:9500:ddbc:d10e:8cdb:c82f/128",
			"IP": "2a02:a210:2143:9500:ddbc:d10e:8cdb:c82f",
			"MBits": 1000,
			"DNS": null,
			"ReservedPorts": null,
			"DynamicPorts": null
		}, {
			"Mode": "host",
			"Device": "en0",
			"CIDR": "192.168.178.28/32",
			"IP": "192.168.178.28",
			"MBits": 1000,
			"DNS": null,
			"ReservedPorts": null,
			"DynamicPorts": null
		}],
		"NodeNetworks": [{
			"Mode": "host",
			"Device": "en0",
			"MacAddress": "a8:20:66:32:e1:bb",
			"Speed": 1000,
			"Addresses": [{
				"Family": "ipv6",
				"Alias": "default",
				"Address": "2a02:a210:2143:9500:414:4349:dd7:e991",
				"ReservedPorts": "",
				"Gateway": ""
			}, {
				"Family": "ipv6",
				"Alias": "default",
				"Address": "2a02:a210:2143:9500:ddbc:d10e:8cdb:c82f",
				"ReservedPorts": "",
				"Gateway": ""
			}, {
				"Family": "ipv4",
				"Alias": "default",
				"Address": "192.168.178.28",
				"ReservedPorts": "",
				"Gateway": ""
			}]
		}],
		"Devices": null
	},
	"ReservedResources": {
		"Cpu": {
			"CpuShares": 0
		},
		"Memory": {
			"MemoryMB": 0
		},
		"Disk": {
			"DiskMB": 0
		},
		"Networks": {
			"ReservedHostPorts": ""
		}
	},
	"Resources": {
		"CPU": 10000,
		"MemoryMB": 8192,
		"DiskMB": 8464,
		"IOPS": 0,
		"Networks": [{
			"Mode": "host",
			"Device": "en0",
			"CIDR": "2a02:a210:2143:9500:414:4349:dd7:e991/128",
			"IP": "2a02:a210:2143:9500:414:4349:dd7:e991",
			"MBits": 1000,
			"DNS": null,
			"ReservedPorts": null,
			"DynamicPorts": null
		}, {
			"Mode": "host",
			"Device": "en0",
			"CIDR": "2a02:a210:2143:9500:ddbc:d10e:8cdb:c82f/128",
			"IP": "2a02:a210:2143:9500:ddbc:d10e:8cdb:c82f",
			"MBits": 1000,
			"DNS": null,
			"ReservedPorts": null,
			"DynamicPorts": null
		}, {
			"Mode": "host",
			"Device": "en0",
			"CIDR": "192.168.178.28/32",
			"IP": "192.168.178.28",
			"MBits": 1000,
			"DNS": null,
			"ReservedPorts": null,
			"DynamicPorts": null
		}],
		"Devices": null
	},
	"Reserved": {
		"CPU": 0,
		"MemoryMB": 0,
		"DiskMB": 0,
		"IOPS": 0,
		"Networks": null,
		"Devices": null
	},
	"Links": null,
	"Meta": {
		"connect.log_level": "info",
		"connect.proxy_concurrency": "1",
		"connect.sidecar_image": "envoyproxy/envoy:v${NOMAD_envoy_version}",
		"connect.gateway_image": "envoyproxy/envoy:v${NOMAD_envoy_version}"
	},
	"NodeClass": "",
	"ComputedClass": "v1:15063501579902328617",
	"Drain": false,
	"DrainStrategy": null,
	"SchedulingEligibility": "eligible",
	"Status": "ready",
	"StatusDescription": "",
	"StatusUpdatedAt": 1613746098,
	"Events": [{
		"Message": "Node registered",
		"Subsystem": "Cluster",
		"Details": null,
		"Timestamp": "2021-02-19T15:48:17+01:00",
		"CreateIndex": 0
	}],
	"Drivers": {
		"qemu": {
			"Attributes": null,
			"Detected": false,
			"Healthy": false,
			"HealthDescription": "",
			"UpdateTime": "2021-02-19T15:48:17.743791+01:00"
		},
		"java": {
			"Attributes": null,
			"Detected": false,
			"Healthy": false,
			"HealthDescription": "",
			"UpdateTime": "2021-02-19T15:48:17.787719+01:00"
		},
		"docker": {
			"Attributes": {
				"driver.docker.runtimes": "io.containerd.runc.v2,io.containerd.runtime.v1.linux,runc",
				"driver.docker.os_type": "linux",
				"driver.docker": "true",
				"driver.docker.version": "20.10.2",
				"driver.docker.bridge_ip": "172.17.0.1"
			},
			"Detected": true,
			"Healthy": true,
			"HealthDescription": "Healthy",
			"UpdateTime": "2021-02-19T15:48:17.826737+01:00"
		},
		"exec": {
			"Attributes": null,
			"Detected": false,
			"Healthy": false,
			"HealthDescription": "exec driver unsupported on client OS",
			"UpdateTime": "2021-02-19T15:48:17.74256+01:00"
		},
		"raw_exec": {
			"Attributes": {
				"driver.raw_exec": "true"
			},
			"Detected": true,
			"Healthy": true,
			"HealthDescription": "Healthy",
			"UpdateTime": "2021-02-19T15:48:17.743019+01:00"
		}
	},
	"CSIControllerPlugins": null,
	"CSINodePlugins": null,
	"HostVolumes": null,
	"CreateIndex": 7,
	"ModifyIndex": 9
}