KKIMS on-site docs
Operate and troubleshoot

Troubleshooting

One index of every known failure in the KIMS v2 deployment, local and on KIMS, with its cause, the fix and the page that has the detail. Search this page for the message you see.

Search this page (Ctrl+F, or Cmd+F on macOS) for the message you see. Each row says what causes it, what to do, and which page has the detail. Messages are quoted as the code writes them.

Where a fix needs commits from the windows-fixes branch, not yet merged into main, the row says so.

#Port already in use

The message depends on who found the port taken:

Message From
Bind for 127.0.0.1:<PORT> failed: port is already allocated Docker Compose or kind
port <PORT> is already in use, so the <app> can't start deploy.mjs local apps start
EADDRINUSE: address already in use :::<PORT> An app started by hand

The ports KIMS v2 uses locally:

Port What
3000 next dev started in an app folder without --port (its default)
3100 Website (apps start)
3101 CMS on the host
3102 CMS on kind
5418 PostgreSQL
8080 Static server for a built site (Look at the built site)
8180 Keycloak
8190 Local Jenkins
9100 S3 stand-in

#Find what holds the port

Replace <PORT> with the number.

bash
sudo ss -ltnp "sport = :<PORT>"
bash
lsof -nP -iTCP:<PORT> -sTCP:LISTEN
powershell
Get-NetTCPConnection -LocalPort <PORT> -State Listen | Select-Object OwningProcess, @{n='Name';e={(Get-Process -Id $_.OwningProcess).ProcessName}}

You see the process id (and name). If it is com.docker.backend, docker-proxy or similar, it is a container: find it with docker ps --filter "publish=<PORT>".

#Stop it

Most often it is the CMS, website or worker from an earlier apps start that didn't stop: press Ctrl+C in its window. Otherwise:

bash
kill <PID>
bash
kill <PID>
powershell
Stop-Process -Id <PID>

For a container: docker stop <CONTAINER_NAME>, or node deployment-steps/scripts/deploy.mjs local down from <KIMS_FOLDER> for the KIMS v2 services. Then run the step again.

On Windows, a Node process left by an interrupted next dev can hold 3101 with no window; the PowerShell line above finds it. On macOS and Linux, apps start stops its apps with SIGTERM; a child that ignores it may linger: kill it as above.

#Your workstation

Symptom Cause Fix Detail
An Application Control policy has blocked this file (Windows), for kind.exe, helm.exe, or a .node file when Next starts Windows Application Control blocks unsigned programs installed under your profile Ask IT to allow them, giving each file's path and SHA256 (Get-FileHash <path>). A path rule survives upgrades; a hash rule doesn't Windows notes
local check shows BLOCKED Same Same Windows notes
kind or helm "not recognized" in a new window (Windows) PATH not picked up Close every PowerShell window (also in your editor), open a new one; else sign out and in kubectl, Helm and kind
Helm WARN in local check, or odd chart errors Helm 4 Install Helm 3, 3.14 or later kubectl, Helm and kind
npm warn EBADENGINE Node newer than 24 Fine locally; use Node 24 if something fails only on the newer one Node.js
rollup.win32-x64-gnu.node fails to load Rollup tries its gnu build first Nothing: it uses the msvc build Windows notes
npm run dev fails (Windows) It doesn't work on Windows deploy.mjs local apps start Apps
Explorer's "Extract all" fails with "path too long" It adds a folder level Extract with tar.exe from PowerShell Get the code
Git Bash tar fails on the zip That tar can't read zip C:\Windows\System32\tar.exe from PowerShell Get the code
git status shows packages/db/src/cli.ts modified Line endings (core.autocrlf=true) git diff --ignore-cr-at-eol packages/db/src/cli.ts shows nothing: don't commit it Git
Errors mentioning dockerDesktopLinuxEngine Docker Desktop not running Start it and wait Docker
permission denied while trying to connect to the Docker daemon socket (Linux) Not in the docker group sudo usermod -aG docker $USER, sign out and in Docker
A command's output is red and wrapped in NativeCommandError (PowerShell), but ends done The program wrote to stderr Nothing: read the last line Database and content
The bundle does not match its manifest or bundle check mismatch Incomplete or damaged copy Extract the handover zip again, check again Database and content

#deploy.mjs itself

Symptom Cause Fix Detail
Can't start: the kims-v2 repo isn't at ... Folders not in the expected layout Move them, or pass --repo deploy.mjs
Can't start: ... .env.local doesn't exist Not created Create it The env file
Exit code 3 and nothing deleted ... Run it again with --yes from local reset Expected: it lists first Add --yes Stop and reset
--context is required, so this never changes the wrong cluster A kims command without --context Add it (kubectl config get-contexts lists them) deploy.mjs
Error: release: not found in a local kube up log Helm status probe before the first install Nothing kind and Helm
Error: Kubernetes cluster unreachable: context "kind-kims-v2" does not exist in a log Probe before the cluster was made Nothing, if the run ended OK kind and Helm
Error from server (NotFound): secrets "kims-..." not found in a secrets create log It checks which Secrets exist first Nothing deploy.mjs
kims google-client save fails reading deploy/handover/node-tools-pod.yaml That file is only in windows-fixes Take the file from windows-fixes into your checkout, or use a windows-fixes checkout with --repo deploy.mjs

#Local services

Symptom Cause Fix Detail
Bind for 127.0.0.1:9100 (or 5418, 8180, 8190) failed: port is already allocated Port taken Port already in use Services
s3 waits, then unhealthy Docker short of disk Free disk; docker compose -f local/docker-compose.yml logs s3 Services
local-buckets.mjs fails with ECONNREFUSED S3 stand-in not up yet Start it and wait for Healthy Services
ASSETS_BUCKET and WEBSITE_BUCKET must be set .env.local missing them, or saved as UTF-16 Compare with local/.env.example; save as UTF-8 The env file
Cannot find package '@aws-sdk/client-s3' npm install not run Run it in the repo Services
Keycloak starting, then unhealthy Can't reach its database Check Postgres, then the Keycloak log Services
Realm does not exist, or Realm 'kims' already exists. Import skipped, or a realm change doesn't show Keycloak imports the realm file only into an empty database Empty only Keycloak's database Stop and reset
npm run db:migrate fails with ECONNREFUSED 127.0.0.1:5418 Postgres not up Start it, wait for Healthy Database and content
publish_versions already has N rows; load only goes into an empty database Already loaded Nothing, or reseed Database and content
The database is missing migrations the bundle was made with Migrations not run Run them, load again Database and content
Can't start: ... is half loaded Some content tables filled, others empty local db reseed --yes Database and content
drop database ... is being accessed by other users Something still connected Stop it (Keycloak, the apps), use with (force) Stop and reset
no matching manifest for linux/arm64 (Apple silicon) An image without arm64 Not seen on this project; run that service as linux/amd64 Services

#Local apps

Symptom Cause Fix Detail
port 3101 is already in use, so the cms can't start Earlier CMS still running Port already in use Apps
Can't start: the website's content snapshot isn't there Content not prepared local apps prepare Apps
Sign-in loops, or "access unavailable" Issuer, client secret or redirect mismatch, or email not verified Compare KEYCLOAK_ISSUER and KEYCLOAK_CLIENT_SECRET with local/.env.example Apps, Keycloak troubleshooting
Every sign-in refused KEYCLOAK_ISSUER differs from what Keycloak reports (trailing /, 127.0.0.1) Copy it from local/.env.example The env file
outsider@kims.local gets in KEYCLOAK_ACCESS_ROLE changed Remove it from .env.local Apps
Signing out in Keycloak doesn't end the CMS session at once Keycloak can't reach the CMS's back-channel URL Don't bind the CMS to localhost only; it ends within 5 minutes anyway Services
Website pages without images Manifest or images not prepared local apps prepare, restart the website Apps
A published change doesn't show on the local website It shows a snapshot local apps prepare again, restart the website Apps
Publish does nothing Worker not running Start it Apps
Every publish is refused The emergency image (emergency_CoE.png) is missing Upload it, or pick another hero for that page Apps
Stored Google secrets can't be read SECRETS_KEY changed Put the old value back, or enter them again The env file

#Local site build

Symptom Cause Fix Detail
spawnSync npx ENOENT or EINVAL at Build locales (Windows) main can't run the site build on a Windows host Build on Linux or macOS, in local Jenkins, or with windows-fixes Site build
Give --version N (or PUBLISH_VERSION), or --from-dir DIR No version Add --version Site build
Refusing to build the "en" chrome: it would drop the logo for ... Logo check against the last good build (for example --fixtures after real content) Build a published version; KIMS_ALLOW_LOGO_LOSS=1 only if a logo really was removed Site build
A build ends skipped Older version than live: the live guard Build the newest version Site build
Quality gates failed A page failed a gate Read the gate and pages in the output and gate-results.json Site build
no Chrome or Chromium could be launched Chrome not found (on macOS deploy.mjs doesn't look in /Applications) Install it, set CHROME_PATH, or KIMS_LIGHTHOUSE=skip locally Site build
N /media/ path(s) in the built pages are not in the bundle, with paths cut mid-name False alarm on main: a srcSet split across two script chunks Build from windows-fixes; otherwise regenerate the manifest and build again Site build
ENOMEM during Build locales Too many build workers More memory; KIMS_BUILD_WORKERS (needs windows-fixes) Site build
Out of disk About 5 GB per build Delete apps/website/dist and .site-build Site build
Built page without styles or images Opened from the S3 stand-in Serve apps/website/dist Site build
python not recognised Python not installed Install Python 3, or any static file server Site build

#Local Jenkins

Symptom Cause Fix Detail
Image build fails downloading No internet for apt, nodejs.org or plugins local jenkins up --rebuild once online Local Jenkins
detected dubious ownership in repository at '/repo/.git' git refuses a repo owned by another user The safe.directory step Local Jenkins
Could not find credentials entry with ID 'kims-site-env' The main Jenkinsfile needs it Add the secret file credential Local Jenkins
Check environment: No environment set... or Unknown environment '...' kims-site-env has no or wrong KIMS_ENV KIMS_ENV=local locally Local Jenkins
Fails connecting to the database Credential points at 127.0.0.1:5418 Use postgres:5432 Local Jenkins
Build times out at 90 minutes (Windows, macOS, main) Workspace on a bind-mounted host folder windows-fixes (workspace on a volume), or build on the host Local Jenkins
CMS build request gets HTTP 400 Job parameters not defined yet Define them, or run one build Local Jenkins
HTTP 401 or 403 Wrong user or token API token step Local Jenkins
No build after a publish JENKINS_JOB_URL unset, or worker not restarted Set it, restart the worker Local Jenkins

#kind rehearsal

Symptom Cause Fix Detail
kind create cluster fails on 3102 Port taken Port already in use kind and Helm
ErrImageNeverPull Image not loaded into kind kind load docker-image kims-v2:dev --name kims-v2 kind and Helm
kims-migrate fails, Helm times out; or database: unreachable Pod can't reach Postgres on host.docker.internal Check Postgres and the kims-database Secret; on Linux Docker Engine use Docker Desktop kind and Helm
Sign-in HTTP 500, log says Could not reach http://localhost:8180/... No Keycloak proxy in the pod (on main always) windows-fixes, then local kube up --skip-build kind and Helm
Invalid parameter: redirect_uri on 3102 Realm imported before 3102 was added, or main Add the 3102 addresses to client kims-cms kind and Helm
Media upload fails on the kind CMS No S3_PUBLIC_ENDPOINT on main windows-fixes kind and Helm

#KIMS: code and Jenkins

Symptom Cause Fix Detail
Permission denied or 403 on git push No push access Ask KIMS Push the code
rejected ... fetch first KIMS's repository isn't empty Ask KIMS; never force-push Push the code
Job fails at Checkout Jenkins can't reach KIMS's Git Git credentials in the job's SCM settings Platform job
Set the REGISTRY parameter to KIMS's image registry. Parameter empty Set it in the job's defaults Platform job
Branch '<name>' deploys nowhere: production deploys from main, UAT from uat. The job built another branch Point it at main or uat, or untick DEPLOY Environments
The Helm values file says KIMS_ENVIRONMENT '...', but branch ... deploys ... The folder's kims-helm-values is the other environment's file, or has no KIMS_ENVIRONMENT Put the right file in this folder's credential Environments
Site job Check environment: This run is for <env>, which builds only from the '<branch>' branch, but it checked out '<other>'. Job pointed at the wrong branch, or wrong folder Fix the job's branch Environments, Site job
Site job: No environment set... or Could not find credentials entry with ID 'kims-site-env' The folder has no kims-site-env Add it to this folder Jenkins credentials
UAT and production use each other's database or buckets A credential made global instead of per folder: Jenkins falls back to global Only kims-registry and kims-kubeconfig may be global Environments
Fails at Install Agent can't reach the npm registry Open outbound access Jenkins agent
Fails at Verify Lint, type or test failure in the commit Fix the code and push Platform job
Fails at Image with no builder or permission denied Docker or buildx missing, or the Jenkins user can't use Docker Fix the agent Jenkins agent
Push fails: no basic auth credentials or denied Not logged in to ECR, or no push permission Credential helper, push policy ECR
Deploy fails with forbidden Jenkins's identity has no rights in the namespace Deploy access from KIMS EKS

#KIMS: Secrets and values

Symptom Cause Fix Detail
secrets create: the namespace ... doesn't exist Not created, or another name Check with KIMS; --namespace Secrets
secrets create: can't reach the cluster for context ... Wrong context, VPN down, no access kubectl config get-contexts, VPN, ask KIMS Secrets
the connection string ... should end ?sslmode=require (or points at a local database) Not an RDS string Fix the string Secrets
no value for kims-jenkins The Jenkins token was left empty: it can't be deferred Create the Jenkins user's API token first Jenkins API token
KIMS_... isn't set, and this window can't be asked Not an interactive terminal Run in a terminal, or set the env var deploy.mjs
kims-app can't be replaced By design Never replace it Backup and restore
values check lists problems A value missing or wrong Fix each Helm values

#KIMS: pods and migrations

Symptom Cause Fix Detail
kims-migrate times out, or ECONNREFUSED Port 5432 not open from the nodes RDS security group kims-db RDS PostgreSQL
permission denied to create extension "citext" Owner can't create extensions KIMS runs CREATE EXTENSION citext; in kims, rerun the deploy RDS PostgreSQL
CMS not ready, health says database: unreachable Security groups, or sslmode missing Check the kims-database URL ends ?sslmode=require Secrets
ImagePullBackOff Nodes can't pull from the registry Node role or image.pullSecrets ECR
CreateContainerConfigError A Secret or key missing kubectl -n kims describe pod <POD> names it Secrets
Pending with exceeded quota Namespace quota too low KIMS raises it EKS
Helm times out, CMS not ready Any of the above kubectl -n kims describe pod, kubectl -n kims logs deploy/kims-cms -c cms First deploy
remaining connection slots are reserved Too many connections Lower DATABASE_POOL_MAX, or a larger RDS class Day two
CMS host doesn't open Ingress, certificate or DNS kubectl -n kims get ingress; ALB annotations (target-type: ip), the ACM certificate, the DNS record Certificates and DNS

#KIMS: content load

Symptom Cause Fix Detail
--image should be the exact image the deploy runs, with its tag latest or no tag Use <registry>/kims/kims-v2:<sha> from the deploy Content load
the service account kims doesn't exist yet First deploy not done Run kims-platform first Content load
the kims-migrate Job hasn't completed Migrations didn't run kubectl -n kims logs job/kims-migrate Content load
already has N rows; load only goes into an empty database Loaded before, or the CMS was used Nothing if the load was right; else empty the content tables (or recreate the database and rerun the migrate Job) and load again Content load
AccessDenied on the assets bucket Pods' IAM role can't write, or its trust doesn't name system:serviceaccount:kims:kims Check the role and serviceAccount.roleArn IAM
Load writes to the wrong region, or the bucket isn't found --region defaults to ap-south-1; the recommended region is ap-south-2 Pass --region <AWS_REGION> deploy.mjs
kubectl cp: one of src or dest must be a local file specification (Windows) A full C:\... path Run from the bundle's parent, use the relative name Content load

#Sign-in

Symptom Cause Fix Detail
Sign-in loops, or "access unavailable" Issuer, client secret or redirect URI mismatch, or no cms-access in the token Compare each; the roles scope must be on the client Keycloak client, Keycloak troubleshooting
A KIMS account with cms-access is refused Email not verified Fix in Keycloak or the AD/LDAP federation Keycloak users
First Admin is in but not an Admin, or nobody can open People KIMS_BOOTSTRAP_ADMINS missing or wrong, or someone else signed in first Fix the values file, update the folder's kims-helm-values, rerun kims-platform People
Revoking someone takes minutes, not seconds Keycloak can't reach the back-channel logout URL A route from Keycloak to the CMS; without it, at most 5 minutes Revocation

#The website

Symptom Cause Fix Detail
A publish succeeds, but no build appears; alert publish-without-build The worker can't start Jenkins kubectl -n kims logs deploy/kims-worker: JENKINS_JOB_URL (with the folder), JENKINS_USER, the kims-jenkins token, the job's parameters Website
CMS build request HTTP 400 / 401 / 403 Parameters not defined / wrong token / user lacks Build Define parameters; token; permissions Jenkins API token
Build fails at Export content Agent can't reach RDS, or kims-database-url wrong Check the credential, port 5432 from the agent Site job
Quality gates, Lighthouse: no browser No Chrome on the agent Install it; never skip Lighthouse there Jenkins agent
Quality gates, another gate A page failed a gate The output names gate and pages Site job
Fails at Bundle media, Sync or Invalidate The agent's IAM role lacks the website bucket or CloudFront permission Check the agent's role IAM
Home page works, every other page 403 or the 404 page The viewer-request function isn't published or attached Attach kims-viewer-request to the default behaviour CloudFront
Every request fails, home page too, after switching to the redirects function viewer-request-redirects.js published without a KeyValueStore associated Associate the store first, or go back to viewer-request.js CloudFront
An old address is 404 instead of 301 The store isn't the one in KIMS_REDIRECTS_KVS_ARN, or the build skipped Redirects Compare ARNs; the build log's Redirects stage CloudFront
Old pages after a build CloudFront not invalidated CLOUDFRONT_DISTRIBUTION_ID in kims-site-env Site job
A build ends skipped Older version than live Publish a new version; rebuild only the live one Day two
Alert build-failed A site build failed Builds screen, then the Jenkins console Day two
Every publish refused on day one The emergency image Upload it, or choose another hero Content load

#Media and Google

Symptom Cause Fix Detail
Every Media library upload fails No CORS rule on the assets bucket for the CMS host Add the PUT rule S3 buckets
Image sizes never appear Worker not running, or can't write the assets bucket kubectl -n kims logs deploy/kims-worker Day two
Translation or reviews sync times out Pods can't reach Google Outbound access Outbound access
Google secrets stop working secrets-key changed Restore the old kims-app, or enter them again Backup and restore
kims google-client save stops at Starting the pod No room in the namespace, or quota kubectl -n kims describe pod kims-node-tools Reviews OAuth

#Sources

Built 2026-11-29. Commands are shown for the system picked at the top; every block has all three.