Skip to content

nginx timeout on /api/enroll/ websocket

@lgarrett ran into a timeout while enrolling:

IRC:

#debian-lts:
16:43 < petn-randall> santiago: I'm following instructions right now. Minor issue, timeout 
                      seems to be fairly tight. It failed the first time trying oauth, by the 
                      time I logged into salsa it failed: 
                      https://paste.debian.net/hidden/a790d7f2/
16:43 < petn-randall> It's recoverable, but you might want to increase the timeout for 
                      convenience.
16:46 < santiago> petn-randall, thank you for testing! I'll forward your comment to 
                  #debusine, but don't hesitate to give them feedback directly, please :-)
16:47 < petn-randall> santiago: Ah, heading there now.

#debusine:
16:47 < Santiago[m]> from #debian-lts: about using debusine.d.n: "<petn-randall> santiago: 
                     I'm following instructions right now. Minor issue, timeout seems to be 
                     fairly tight. It failed the first time trying oauth, by the time I 
                     logged into salsa it failed:"  "It's recoverable, but you might want to 
                     increase the timeout for convenience."
          Joins: petn-randall
16:49  * tumbleweed wonders what timed out
16:49 < tumbleweed> we don't have anything in our SSO code that explicitly times out
16:51 < petn-randall> Ah, was the paste already passed on?
16:52 < tumbleweed> petn-randall: so, what URL gave you what error?
16:52 < Santiago[m]> nop, I didn't pass the paste
16:53 < petn-randall> Running `debusine --server=debian setup`. It was recoverable though, so 
                      only a minor issue.
16:53 < tumbleweed> oh, I found the paste
16:53 < petn-randall> https://paste.debian.net/hidden/a790d7f2/
16:53 < tumbleweed> an nginx timeout
16:54 < petn-randall> Finding the 2FA token etc took maybe 30 seconds (~ish).
16:54 < petn-randall> Probably closer to 20
16:54 < tumbleweed> ack, I'll file a bug
16:55 < petn-randall> Good to see there's already a retry in place. 👍 

Paste contents:

18:38:56 θ81° [randall@batou:~/Coding/Debian/ansible] debian/bullseye(5)+ ± debusine --server=debian setup
                                                        
  Configuration for debian                              
 ────────────────────────────────────────────────────── 
  [server:debian]                                       
  scope = debian                               (scope)  
  api-url = https://debusine.debian.net/api/   (url)    
  token = acquired on save                     (token)  
                                                        

Commands: url, token, scope, save, quit:
> save
👉 Please visit https://debusine.debian.net/-/enroll/confirm/z9G-OrGmTTkAbrzx-zNz7A to confirm registration
👉 Make sure the page mentions the passphrase: "<<< REDACTED >>>"
❗ The server returned status code 504
❗ <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.22.1</center>
</body>
</html>

Fetch failed: retry? [y/n]: y
👉 Please visit https://debusine.debian.net/-/enroll/confirm/jJ_vCnNDxMfd2toAwpti8w to confirm registration
👉 Make sure the page mentions the passphrase: "<<< REDACTED >>>"
✅ Confirmation confirmed, token acquired
👍 Configuration saved

nginx log:

2025/05/02 16:40:23 [error] 1136#1136: *1024660 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 195.201.129.28, server: debusine.debian.net, request: "POST /api/enroll/ HTTP/1.1", upstream: "http://unix:/var/lib/debusine/server/daphne.sock/api/enroll/", host: "debusine.debian.net"
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information