coder / coder/envbuilder

401 error for requests to coder.example.com after "Update" option following template change

Ouverte
#262 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
300
Forks
64
Merge moyen
20 min
PR mergées (30 j)
1

Description

I am seeing an issue where when I use the "Update" option in the coder dashboard after a template change, the coder process get stuck in this state, where it gets 401 errors trying to talk to the coder agent URL. The issue is resolved by using the "Restart" option instead.

```
2024-06-12 19:43:20.920 [info] connecting to coderd
2024-06-12 19:43:20.934 [warn] run exited with error ...
error= GET https://coder.example.com/api/v2/workspaceagents/me/rpc?version=2.1: unexpected status code 401: unexpected non-JSON response "": Try logging in using 'coder login'.
Error: no response body
```

I am using "token" authentication with the coder agent, with config passed to the container for the auth as:
```
{
name = "CODER_AGENT_TOKEN"
value = try(coder_agent.main[0].token, "")
},
{
name = "CODER_AGENT_URL"
value = data.coder_workspace.me.access_url
},
```

This issue does away after doing a "restart" of the instance.

Discord discussion here: https://discord.com/channels/747933592273027093/1250538421789790271/1250538421789790271

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Aucun fichier du dépôt ni aucun test n’est nommé. Reproduisez une modification de template suivie de l’option Update du dashboard avec une authentification par token, comparez-la à Restart et examinez les logs de agent et coderd ; c’est terminé lorsque Update se reconnecte sans erreurs 401.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
docker, go
Domaine
authentication, devops
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.