port_undeclared
Severity: needs approval (or refuse). Your app listens on a different port than its contract says.
What Kaviris saw
One of two things:
- The app listens on another port than the one in its contract, and not
on the contract's port. Severity
needs_approval. - The app listens on a second port next to the contract's. Severity
refuse.
How to fix it
Wrong port: either make the app listen on the port Kaviris gives it in
the PORT environment variable (process.env.PORT in Node,
os.environ["PORT"] in Python), or change the contract's port and approve:
kaviris contract edit --patch '[{"op":"replace","path":"/components/0/port","value":3000}]'
kaviris contract approve
Second port: an app on Kaviris gets traffic on one port only, so a second listener can never be reached and is often a debug server left on. Stop the app from listening on it, and deploy again.
If the app never answers on the contract's port at all, the refusal is port_mismatch instead.