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

proxy_protocol not working with Amazon ELB #1533

Open
MorenoGentili opened this issue Jun 8, 2020 · 1 comment · May be fixed by #1640
Open

proxy_protocol not working with Amazon ELB #1533

MorenoGentili opened this issue Jun 8, 2020 · 1 comment · May be fixed by #1640

Comments

@MorenoGentili
Copy link

MorenoGentili commented Jun 8, 2020

Hello everyone, proxy_protocol is not working with Amazon ELB (Network load balancer) for some reason. "Proxy Protocol V2" is enabled for the Target Group on Amazon.
I'm using Alpine Linux, everything latest version.

I tried with this configuration:

rtmp {
    server {
        listen 1935 proxy_protocol;
        chunk_size 4096;

        application streaming {
            #...
        }
    }
}

But then, when I start to stream via RTMP using FFmpeg, I get this error.

Cannot read RTMP handshake response.

image

Same thing with OBS, I also get an error.

I've found a workaround with nginx-mod-stream. Here it is:

stream {
    server {
        listen 1935 proxy_protocol;
        proxy_pass 127.0.0.1:1936;
        proxy_protocol on;
        set_real_ip_from 0.0.0.0/0;
    }
}

rtmp {
    server {
        listen 127.0.0.1:1936 proxy_protocol;
        chunk_size 4096;

        application streaming {
            #...
        }
    }
}

I can start streaming this way, and I get the correct Client IP address.

What could possibly be the cause?

@marner2
Copy link

marner2 commented Nov 18, 2020

Does the current implementation of proxy_protocol only support v1 and not v2? I'm running into the same issue with HAProxy.

@mmasaki mmasaki linked a pull request Oct 8, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants