Failed to restore session due to unexpected error

I am deploying self hosted okteto 1.31.0 onto my kubernetes.
when i try to login to portal, i get error message “Failed to restore session due to unexpected error. Please try again or report issue if problem persists.”

Hi,

Have you tried the following?

  1. Clean any pre-existing cookies
  2. Check the status of the API in Kubernetes?
  3. Check the logs of the API pods in Kubernetes for errors?

Hope this helps!

1# ran in incognito mode with the same error.
2# API server is running fine

3# Logs of API pods
kubectl -n okteto logs okteto-api-86559467f7-kpc2w
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“Starting api service…”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“initialized kubernetes client with InClusterConfig”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“loading buildkit certificate”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“buildkit certificate loaded”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“retrieved k8s control plane version "v1.32.0"”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“instance license: Email=xxxxxx,Company=Jio,Seats=30,Tier=scale,Trial=true,ExpiresOn=2025-05-08 10:10:53 +0000 UTC”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“using tokens as the IDP”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“instance license: Email=xxxxx,Company=Jio,Seats=30,Tier=scale,Trial=true,ExpiresOn=2025-05-08 10:10:53 +0000 UTC”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“prometheus not configured”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”}}}
{“timestamp”:“2025-04-14T03:43:21Z”,“message”:“api server is running at http://0.0.0.0:8080”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-kpc2w”,“serverName”:“api”}}}

Hi @srinikr1972 !

When you try to log in, do you see the message being registered in the API logs?

If you’d like, we can hop on a call to try to debug.

Thanks!
-Jona

I don’t see any message in API logs pod. Attaching the log output for your reference
“serverName”:“api”}}}
root@k8smaster:/home/sivakumar/okteto# kubectl logs okteto-api-86559467f7-spmd5 -n okteto
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“Starting api service…”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“initialized kubernetes client with InClusterConfig”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“loading buildkit certificate”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“buildkit certificate loaded”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“retrieved k8s control plane version "v1.32.0"”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“instance license: Email=srinivasan.kr@ril.com,Company=Jio,Seats=30,Tier=scale,Trial=true,ExpiresOn=2025-05-08 10:10:53 +0000 UTC”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“using tokens as the IDP”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“instance license: Email=srinivasan.kr@ril.com,Company=Jio,Seats=30,Tier=scale,Trial=true,ExpiresOn=2025-05-08 10:10:53 +0000 UTC”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“prometheus not configured”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”}}}
{“timestamp”:“2025-04-15T04:22:26Z”,“message”:“api server is running at http://0.0.0.0:8080”,“severity”:“INFO”,“context”:{“data”:{“instance.id”:“okteto-api-86559467f7-spmd5”,“serverName”:“api”}}}

I would appreciate to have a call, to see what i am missing.

Hi @srinikr1972!

We sent you a Calendar link to your email. Let us know if there is a better way to share it with you.

Based on your latest messages, we believe the issue might be related to the Ingress configuration. How are you connecting to the UI? Are you by any chance using the kubectl port-forward command to connect to the frontend service?

Thank you!
-Jona

I couldn’t locate your invitation email.
Can you please send invite again to my email addresses as mentioned below?

srinikr@gmail.com and
srinivasan.kr@ril.com

Thanks
Srinivasan KR

Absolutely! Sending it now.

-Jona