Greetings,
I have been trying to test using docker to run my routers. Currently, I am running them under Linux, and they work well, but I would like to run them under docker. I haven't really used Docker much, so this might be my fault, but when I try to run a container, I get the following: (hostnames changed for security reasons)
[root@storziti03 routertest]# docker run --name ziti-tun --network mynet --ip "my_ip" --dns "my_dns" --privileged --volume ${PWD}:/ziti-edge-tunnel/ --volume "/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket" --device "/dev/net/tun:/dev/net/tun" --env ZITI_IDENTITY_BASENAME="my_router_name" openziti/ziti-edge-tunnel
DEBUG: waiting 3s for /ziti-edge-tunnel/my_router_name.json (or token) to appear
DEBUG: identity file /ziti-edge-tunnel/my_router_name.json not found
DEBUG: /var/run/secrets/netfoundry.io/enrollment-token/my_router_name.jwt not found
DEBUG: /enrollment-token/my_router_name.jwt not found
INFO: enrolling /ziti-edge-tunnel/my_router_name.jwt
(7)[ 0.000] INFO ziti-sdk:utils.c:201 ziti_log_set_level() set log level: root=3/INFO
(7)[ 0.000] INFO ziti-sdk:utils.c:172 ziti_log_init() Ziti C SDK version 1.0.4 @g1ef8211(HEAD) starting at (2024-06-17T17:43:15.020)
(7)[ 0.000] INFO ziti-sdk:ziti_enroll.c:90 ziti_enroll() Ziti C SDK version 1.0.4 @g1ef8211(HEAD) starting enrollment at (2024-06-17T17:43:15.020)
(7)[ 0.000] WARN ziti-sdk:ziti_ctrl.c:302 ctrl_body_cb() could not process controller response: 15 bytes not allocated for body
(7)[ 0.000] ERROR ziti-sdk:ziti_ctrl.c:164 ctrl_resp_cb() ctrl[openziti-controller.athenz-experiments.aws.oath.cloud] request failed: -4095(end of file)
(7)[ 0.000] ERROR ziti-sdk:ziti_enroll.c:235 enroll_cb() failed to enroll with controller: https://openziti-controller.athenz-experiments.aws.oath.cloud:4443 CONTROLLER_UNAVAILABLE (end of file)
(7)[ 0.000] ERROR ziti-edge-tunnel:ziti-edge-tunnel.c:2221 enroll_cb() enrollment failed: CONTROLLER_UNAVAILABLE(-3)
ERROR: failed to enroll with token from /ziti-edge-tunnel/my_router_name.jwt (705B)
I thought it was going to be something dumb, like lack of permissions to read my jwt file off of the local filesystem, so I used chmod 777 on it, and ruled that out. Then I thought it might be network related, but I used tcpdump on the parent interface of the mynet network, sniffing for traffic to and from the openziti controller, and there is a back and forth exchange that happens there. One variable of which I am unsure of consequences is that I believe our controller is running v0.30.3, and I am running the latest ziti-edge-tunnel container. A different team here runs the controller, so I don't directly have a say over the version, but I may be able to have it upgraded if that is determined to be an issue. Although with Linux routers running in AWS, I have been successfully enrolling new routers, so I don't believe that to be the issue.
My network in Docker looks like this:
[root@storziti03 routertest]# docker network inspect mynet
[
{
"Name": "mynet",
"Id": "5692c715fb91951ad1dfb828fef1321759c59fd2d1edf82cc75bbce8681b105a",
"Created": "2024-06-14T21:24:37.392940633Z",
"Scope": "local",
"Driver": "macvlan",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "10.10.10.128/25",
"IPRange": "10.10.10.192/31",
"Gateway": "10.10.10.129"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {
"parent": "enp4s0f0"
},
"Labels": {}
}
]
If anyone has any insight into this, I would really appreciate it!
Thanks