Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Apache Zeppelin with nginx as reverse proxy

In our current architecture we have two apache front servers, in front of them, we have an nginx load balancer. And in front of that an nginx reverse proxy.

My problem is that i'm trying to run Apache Zeppelin through the reverse proxy, and i'm having some problems with the websockets.

I get an error like this : 400 HTTP method GET is not supported by this URL

And here is a screenshot of what the Chrome's Networks tab shows : enter image description here

I add my reverse proxy config for Zeppelin:

error_log  /var/log/nginx/nginx_error.log  warn;
server {
    listen       80;
    server_name  localhost;

    location /zeppelin/ {
        proxy_pass http://zeppelin:8080/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade websocket;
        proxy_set_header Connection upgrade;
    }

    # fallback
    location / {
        return 301 http://ci.blablalablab.com/app/;
    }  
}

Zeppelin is running inside a docker container, and i have exposes the 8080 port, its host name is : zeppelin.

If you have any questions on the architecture or so, don't hesitate to ask.

Thank you very much guys !

like image 395
IgZiStO Avatar asked Feb 05 '23 20:02

IgZiStO


1 Answers

you can add to your reverse proxy configuration

location /ws {  # For websocket support
    proxy_pass http://zeppelin:8080/ws;
    proxy_http_version 1.1;
    proxy_set_header Upgrade websocket;
    proxy_set_header Connection upgrade;
    proxy_read_timeout 86400;
}

Reference: Zeppelin 0.7 auth docs

like image 133
Nickmancol Avatar answered Feb 11 '23 16:02

Nickmancol