Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests being routed to nonexistent backend whitehall-frontend. #412

Open
sengi opened this issue Nov 23, 2023 · 1 comment
Open

Requests being routed to nonexistent backend whitehall-frontend. #412

sengi opened this issue Nov 23, 2023 · 1 comment

Comments

@sengi
Copy link
Contributor

sengi commented Nov 23, 2023

We've been logging about 1100 of these per day since whitehall-frontend was decommissioned:

Representative stack trace:
*net.OpError: dial tcp: lookup whitehall-frontend.production.govuk-internal.digital on 172.20.0.10:53: no such host
  File "github.com/alphagov/router/logger/sentry.go", line 74, in NotifySentry
  File "github.com/alphagov/router/handlers/backend_handler.go", line 164, in (*backendTransport).RoundTrip
  File "net/http/httputil/reverseproxy.go", line 473, in (*ReverseProxy).ServeHTTP
  File "github.com/alphagov/router/triemux/mux.go", line 50, in (*Mux).ServeHTTP
  File "github.com/alphagov/router/lib/router.go", line 150, in (*Router).ServeHTTP
  File "net/http/server.go", line 2938, in serverHandler.ServeHTTP
  File "net/http/server.go", line 2009, in (*conn).serve

Sentry issue for cross-referencing (internal-only, sorry)

Suspect there's some dangling bit of config somewhere, at least a dead route in the Router database but there may well be other cleanup upstream that was missed.

@sengi
Copy link
Contributor Author

sengi commented Jan 22, 2024

db.routes.find({handler: 'backend', backend_id: 'whitehall-frontend'});
{
  "_id" : ObjectId("5bb7754145a5a0728ceadbb7"),
  "incoming_path" : "/government/topics/transport",
  "disabled" : false,
  "route_type" : "exact",
  "handler" : "backend",
  "redirect_to" : "/transport",
  "redirect_type" : "permanent",
  "segments_mode" : "ignore",
  "updated_at" : ISODate("2023-09-20T06:45:25.047Z"),
  "created_at" : ISODate("2018-10-05T14:29:21.791Z"),
  "backend_id" : "whitehall-frontend"
}
...

db.routes.find({handler: 'backend', backend_id: 'whitehall-frontend'}).count();
30

These all look like they're supposed to be redirects (because of the redirect_to field), but they have route_type: backend instead of route_type: redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant