atlantis: Streaming does not appear to work properly with ALB

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave “+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

When performing a plan or apply, the link that is given to view the live stream doesn’t appear to run anything, just a blank black box.

image

(looks like similar issues posted in the original PR - https://github.com/runatlantis/atlantis/pull/1937)

Atlantis Version: 0.18.2

If the streaming window is already open, it will print out -----Starting New Process-----, but that is all

Based on the logs, it is getting a broken pipe possibly because an ALB is being used?

Reproduction Steps

Run an atlantis plan or apply Go to streaming url [No input]

Logs

Environment details

Atlantis: 0.18.2

Additional Context

We are running Atlantis as a single Docker container on an AWS ECS cluster with an ALB in front of it

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 48
  • Comments: 30 (13 by maintainers)

Most upvoted comments

we’re experiencing the same issue… atlantis does give us some logs:

{
  "level": "error",
  "ts": "2022-01-27T21:59:48.706Z",
  "caller": "logging/simple_logger.go:161",
  "msg": "writing to ws 2uinc/atlantis-test-repo/15/iam/default: upgrading websocket connection: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header",
  "json": {},
  "stacktrace": "github.com/runatlantis/atlantis/server/logging.(*StructuredLogger).Log\n\tgithub.com/runatlantis/atlantis/server/logging/simple_logger.go:161\ngithub.com/runatlantis/atlantis/server/controllers.(*JobsController).respond\n\tgithub.com/runatlantis/atlantis/server/controllers/jobs_controller.go:141\ngithub.com/runatlantis/atlantis/server/controllers.(*JobsController).GetProjectJobsWS\n\tgithub.com/runatlantis/atlantis/server/controllers/jobs_controller.go:134\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2047\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/mux@v1.8.0/mux.go:210\ngithub.com/urfave/negroni.Wrap.func1\n\tgithub.com/urfave/negroni@v1.0.0/negroni.go:46\ngithub.com/urfave/negroni.HandlerFunc.ServeHTTP\n\tgithub.com/urfave/negroni@v1.0.0/negroni.go:29\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\tgithub.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/runatlantis/atlantis/server.(*RequestLogger).ServeHTTP\n\tgithub.com/runatlantis/atlantis/server/middleware.go:69\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\tgithub.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/urfave/negroni.(*Recovery).ServeHTTP\n\tgithub.com/urfave/negroni@v1.0.0/recovery.go:193\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\tgithub.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/urfave/negroni.(*Negroni).ServeHTTP\n\tgithub.com/urfave/negroni@v1.0.0/negroni.go:96\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2879\nnet/http.(*conn).serve\n\tnet/http/server.go:1930"
}

I’m not sure what to make of them though. Hope this helps, cause the devs will be stoked to have this feature working.

This was 100% to do with websockets for me. Once I configured websockets on my LB/Ingress it started working. See #2216

That’s great @mcrivar! Thank you for sharing.

For all others who are running into issues, could you folks use the latest version and confirm if the issue is still present?

cc @askmike1 @s33dunda @MattMencel @davidh-unmind @gmontanola @pantelis-karamolegkos @adutchak @spamoom

It probably isn’t related to Atlantis, but I do think that if this many people run into this we need to sort out what that common pitfall is and document it properly in the Deployment section.

Same here, we use custom workflows. Issue persist with and without proxies (i.e. with k8s port-forward issue is the same). Could be related to custom workflows still as according to documentation it’s only supported for regular terraform commands https://www.runatlantis.io/docs/streaming-logs.html#real-time-logs. However it would be really nice to have that working for the other cases too.