question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Traefik reverse proxy, gateway timeout

See original GitHub issue
  • code-server version: latest tag, server/0.0.0 linux-x64 node-v8.15.0

Description

Tried running it behind Traefik reverse proxy. If i browse to my url i get a gateway timeout. In the traefik dashboard it looks correctly configured: image image Running curl http://172.17.0.2:8443 on the remote host works:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>
</body>
</html>

If i expose the 8443 port publicly and browse to the ip + port it also works fine (with http)

Steps to Reproduce

  1. Create a Traefik reverse proxy (https://github.com/containous/traefik)
  2. Try running code-server with following command: docker run -d --label traefik.port=8443 --label traefik.frontend.rule=Host:ide.DOMAIN.TLD codercom/code-server --allow-http

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

8reactions
StiviiKcommented, Mar 27, 2019

I have traefik running in a docker network and i forgot to “put” the code-server in the same docker network.

2reactions
warllo54commented, Jun 27, 2019

@StiviiK would you be willing to share your relevant config for this. My proxy seems to be working as I can access code-server using my domain name however all https redirects to http. I have several other containers working with traefik.

Resolved! I was able to get things working with the following labels:

labels: - "traefik.enable=true" - "traefik.backend=vsc" - "traefik.frontend.rule=Host:vsc.example.org" - "traefik.protocol=http" - "traefik.docker.network=web" - "traefik.frontend.headers.SSLRedirect=true" - "traefik.frontend.headers.STSSeconds=315360000" - "traefik.frontend.headers.browserXSSFilter=true" - "traefik.frontend.headers.contentTypeNosniff=true" - "traefik.frontend.headers.forceSTSHeader=true" - "traefik.frontend.headers.SSLHost=example.org" - "traefik.frontend.headers.STSIncludeSubdomains=true" - "traefik.frontend.headers.STSPreload=true" - "traefik.frontend.headers.frameDeny=true"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue (Gateway Timeout) when using Traefik and exposing ...
With this config, I got from Traefik a gateway timeout. ... services: reverse-proxy: image: traefik:v2.3.4 command: - --api=true ...
Read more >
How to fix Traefik "Gateway Timeout" for Docker services
This issue is caused by the Traefik instance not being on the same Docker network(s) as the containers running the services. Therefore, the...
Read more >
"Gateway Timeout" with docker · Issue #1254 · traefik ... - GitHub
version: '2' services: proxy: image: traefik:1.2.0-rc2 command: ... When I run docker-compose up from my projet I have Gateway Timeout .
Read more >
Traefic docker container Gateway timeout : r/Traefik - Reddit
i.e. The traefik setup is able to redirect to all ports on the host itself, but none of the ports exposed by docker...
Read more >
Gitlab 'Gateway Timeout' behind traefik proxy - Stack Overflow
So I'm trying to set up a gitlab-ce instance on docker swarm using traefik as reverse proxy. This is my proxy stack;
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found