expressInstall is saying my ports are in use

Hi again, I spun up a debian12 vm and am trying to go through the expressInstall but it is reporting all of my chosen ports are in use.

Am I trying something too new? It was a fresh cloud image, added my locale, installed docker and tested there, then installed the prerequisites and ran the source /dev/stdin <<< "$(wget -qO- https://get.openziti.io/quick/ziti-cli-functions.sh)"; expressInstall according to the docs.

Any thoughts? Should I start with an older distro or something like that? I am just wanting to spin up a local instance… so I am not too concerned with the flavor of linux at this point.

******** Ensure the Necessary Ports Are Open  ********
Checking Controller's port (6262) The intended Controller port (6262) is currently being used, the process using this port should be closed or the port value should be changed.
To use a different port, set the port value in ZITI_CTRL_ADVERTISED_PORT

Example:
export ZITI_CTRL_ADVERTISED_PORT=1234

But nothing looks to be interfering.

 sudo ss -tulpn | grep LISTEN
tcp   LISTEN 0      128            0.0.0.0:22        0.0.0.0:*    users:(("sshd",pid=422,fd=3))        
tcp   LISTEN 0      4096           0.0.0.0:5355      0.0.0.0:*    users:(("systemd-resolve",pid=368,fd=12))
tcp   LISTEN 0      4096     127.0.0.53%lo:53        0.0.0.0:*    users:(("systemd-resolve",pid=368,fd=18))
tcp   LISTEN 0      4096        127.0.0.54:53        0.0.0.0:*    users:(("systemd-resolve",pid=368,fd=20))
tcp   LISTEN 0      128               [::]:22           [::]:*    users:(("sshd",pid=422,fd=4))        
tcp   LISTEN 0      4096              [::]:5355         [::]:*    users:(("systemd-resolve",pid=368,fd=14))

Here is my environment, I redacted the public IP and domain.

env | grep ZITI
ZITI_PKI_EDGE_KEY=/home/user/.ziti/quickstart/ziti/pki/ziti.redacted.com-intermediate/keys/ziti.redacted.com-server.key
ZITI_EDGE_ROUTER_IP_OVERRIDE=888.888.888.888
ZITI_EDGE_ROUTER_PORT=8442
ZITI_PKI_SIGNER_ROOTCA_NAME=ziti-signing-root-ca
ZITI_CTRL_EDGE_ADVERTISED_ADDRESS=ziti.redacted.com
ZITI_OSTYPE=linux
ZITI_PKI_CTRL_KEY=/home/user/.ziti/quickstart/ziti/pki/ziti.redacted.com-intermediate/keys/ziti.redacted.com-server.key
ZITI_CTRL_LISTENER_PORT=8440
ZITI_PKI_EDGE_CA=/home/user/.ziti/quickstart/ziti/pki/ziti.redacted.com-intermediate/certs/ziti.redacted.com-intermediate.cert
ZITI_HOME=/home/user/.ziti/quickstart/ziti
ZITI_ROUTER_PORT=3022
ZITI_ENV_FILE=/home/user/.ziti/quickstart/ziti/ziti.env
ZITI_EDGE_CONTROLLER_IP_OVERRIDE=888.888.888.888
ZITI_ROUTER_LISTENER_BIND_PORT=8444
ZITI_PKI_CTRL_ROOTCA_NAME=ziti.redacted.com-root-ca
ZITI_PKI_CTRL_INTERMEDIATE_NAME=ziti.redacted.com-intermediate
ZITI_PKI=/home/user/.ziti/quickstart/ziti/pki
ZITI_PKI_CTRL_CERT=/home/user/.ziti/quickstart/ziti/pki/ziti.redacted.com-intermediate/certs/ziti.redacted.com-client.cert
ZITI_NETWORK=ziti
ZITIx_EXPRESS_COMPLETE=true
ZITI_CTRL_ADVERTISED_PORT=6262
ZITI_ROUTER_ADVERTISED_HOST=ziti.redacted.com
ZITI_ROUTER_ADVERTISED_ADDRESS=ziti.redacted.com
ZITI_PKI_SIGNER_CERT=/home/user/.ziti/quickstart/ziti/pki/ziti-signing-intermediate/certs/ziti-signing-intermediate.cert
ZITI_PKI_SIGNER_KEY=/home/user/.ziti/quickstart/ziti/pki/ziti-signing-intermediate/keys/ziti-signing-intermediate.key
ZITI_PKI_EDGE_CERT=/home/user/.ziti/quickstart/ziti/pki/ziti.redacted.com-intermediate/certs/ziti.redacted.com-client.cert
ZITI_PKI_SIGNER_CERT_NAME=ziti-signing
ZITI_BIN_DIR=/home/user/.ziti/quickstart/ziti/ziti-bin/ziti-v0.29.0
ZITI_PKI_CTRL_CA=/home/user/.ziti/quickstart/ziti/pki/cas.pem

Hi @jptechnical, Sorry you ran into an issue so quickly. I’ve not seen that part of the quickstart fail, but there’s always a first for everything. :slight_smile:

I read the part of the script doing this port detection. It’s using lsof like this:

echo -en "Checking ${2-}'s port (${envVarValue}) "
  portCheckResult=$(lsof -w -i :"${envVarValue}" 2>&1)
  if [[ "${portCheckResult}" != "" ]]; then
      echo -e "$(RED "The intended ${2-} port (${envVarValue}) is currently being used, the process using this port should be closed or the port value should be changed.")"

That ends up being this command: lsof -w -i :6262 for this particular call. Can you try running lsof to see if anything comes back? The script is just checking for an empty value to be returned, to indicate that nothing is already on that port. A possible problem with this script is that if you run as a non-root user, you possibly won’t see ports opened by other processes like root. If that’s the case, you might need to run that lsof command as root to see what might be at :6262

Could you have possibly run the quickstart once as root?

I believe I have seen this a couple of times after I did an uninstall/reinstall. If I recall correctly, I had to unset the three port environment variables.

1 Like

I had the same issue today. the lsof binary was just not available on Alma Linux 9. Installing it solved the issue.

1 Like

@gberl002 was adding a check for this in the latest quickstart. @gberl002 did that get merged? Should @mkuhlmann have hit the issue?

Not yet, it’s in review so it’s ready to merge once approved.

Oh well in that case… Approved! :slight_smile: