Ziti router auto enroll NoneType error

Hello there,

We're getting some TypeError: argument of type 'NoneType' is not iterable errors when running the router auto enroll script.

Starting binary install
Installing service unit file
Creating config file
Starting Router Enrollment
Successfully enrolled Ziti
Traceback (most recent call last):
  File "ziti_router_auto_enroll.py", line 2065, in <module>
  File "ziti_router_auto_enroll.py", line 2055, in main
TypeError: argument of type 'NoneType' is not iterable
[PYI-5173:ERROR] Failed to execute script 'ziti_router_auto_enroll' due to unhandled exception!
Untrusted certificate authority retrieved from server
Verified that server supplied certificates are trusted by server
Server supplied 2 certificates
Server certificate chain written to .config/ziti/certs/<cert chain>
Token: <token>
Saving identity 'default' to .config/ziti/ziti-cli.json
Removing identity 'default' from .config/ziti/ziti-cli.json

This is the part of the script that's failing:

wget https://github.com/netfoundry/ziti_router_auto_enroll/releases/latest/download/ziti_router_auto_enroll.tar.gz
sudo tar xf ziti_router_auto_enroll.tar.gz && rm ziti_router_auto_enroll.tar.gz

ROUTER_NAME=${router_name}-$(date "+%s")

sudo ./ziti_router_auto_enroll -f -n \
  --controller ${openziti_controller_url} \
  --controllerFabricPort ${openziti_controller_port} \
  --controllerMgmtPort ${openziti_controller_port} \
  --adminUser admin \
  --adminPassword ${openziti_controller_password} \
  --assumePublic \
  --autoTunnelListener \
  --disableHealthChecks \
  --routerName $${ROUTER_NAME}

ziti edge login ${openziti_controller_url}:${openziti_controller_port} -u admin -p ${openziti_controller_password} -y
ziti edge update identity $${ROUTER_NAME} --role-attributes "routers-${environment}"
ziti edge update edge-router $${ROUTER_NAME} --role-attributes "routers-${environment}"
ziti edge logout

Any ideas?

shouldn't the ROUTER_NAME only has 1$ in front of it?

Hi @Pehesi97,

Thanks for reporting the issue, it's likely due to a bug that was introduced in the last version update. Give me just a few minutes to review & get a patched version pushed in.

you can try this version, see if you have the issue:

https://github.com/netfoundry/ziti_router_auto_enroll/releases/download/v1.0.23/ziti_router_auto_enroll.tar.gz

this is a Terraform template file for a machine's init script.. the $$ is to ensure no variable substitution occurs on the Terraform apply step, but only when the machine starts.

Thank you very much, @emoscardini

@Pehesi97 The new version has been released, please let us know if you have any more issues.

1 Like