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

cannot connect to server behind reverse proxy, no error show in client app console #959

Closed
sneak opened this issue Sep 15, 2020 · 2 comments

Comments

@sneak
Copy link

sneak commented Sep 15, 2020

Not able to save or run workflows when running 0.82.1 behind an nginx reverse proxy

GENERIC_TIMEZONE=Etc/UTC
TZ=Etc/UTC
N8N_PROTOCOL=http
WEBHOOK_TUNNEL_URL=https://trigger.example.com/
VUE_APP_URL_BASE_API=https://trigger.example.com/
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=root
N8N_BASIC_AUTH_PASSWORD=redacted
N8N_PORT=5678
N8N_HOST=trigger.example.com

Web app loads.

Reverse proxy is handling TLS termination/certs. Websocket proxying is supported by the reverse proxy.

The webapp says "Connection lost", but there are no errors displayed in the JS console to indicate to where it is trying to connect, or any failure messages, which I would expect if the UI is saying connection lost.

On a failure like that, I'd expect some sort of message in the console giving more information about the failure: where it tried to connect, how, and an error message/reason.

The only console messages from the UI:

DevTools failed to load SourceMap: Could not load content for webpack://Quill/node_modules/quill-delta/dist/Delta.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack://Quill/node_modules/quill-delta/dist/AttributeMap.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack://Quill/node_modules/quill-delta/dist/Op.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack://Quill/node_modules/quill-delta/dist/Iterator.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for https://trigger.sneak.cloud/js/chunk-vendors.2ad60256.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://trigger.sneak.cloud/js/app.0b836e3e.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Environment (please complete the following information):

  • OS: dockerhub provided container for 0.82.1
  • n8n Version 0.82.1
  • Node.js Version whatever's in the docker container
@sneak sneak changed the title cannot connect to server behind reverse proxy cannot connect to server behind reverse proxy, no error show in client app console Sep 15, 2020
@sneak
Copy link
Author

sneak commented Sep 15, 2020

Was able to get it working with the following:

            proxy_pass $upstream;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

            proxy_set_header Connection '';
            proxy_http_version 1.1;
            chunked_transfer_encoding off;
            proxy_buffering off;
            proxy_cache off;

I wonder why it's so picky. Some console feedback would be helpful.

@sneak sneak closed this as completed Sep 15, 2020
@janober
Copy link
Member

janober commented Sep 15, 2020

Information about that can also be found in our forum under: https://community.n8n.io/

The reason why it is so "picky" is that n8n is using EventSource which I guess is the "picky" one.

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

No branches or pull requests

2 participants