-
Notifications
You must be signed in to change notification settings - Fork 18
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 error in apache logs of my virtual host #9
Comments
I don't have enough information about your exact config or setup to tell for sure, but it looks like you have something running on the same machine that is hitting your webserver (some type of monitoring, maybe?) since the ip-address for all accesses above is localhost; and assuming you set up the two virtual hosts such that one has proxy-protocol enabled and one not, then that thing appears to be hitting both your virtual hosts, instead of just the one with proxy-protocol disabled. The fact that you don't see this on the original setup, but only on the new, also indicates it is something to do with the new machines rather than your configuration. So I'd see what else is running on those machines, and what cron-jobs there are, and see if anything sticks out. |
I have only two cronjobs running on my machine which moves the access and error logs to S3. This is my prod server with Apache 2.4 and php5.6 running on it. We have installed the proxy protocol module for Apache HTTPD from below source We have enabled the proxy protocol at ELB level so that the ssl connection terminates at instance rather than at ELB. The "ProxyProtocol: no valid header found" errors were started to appear from 11th-Oct 2017 and we are yet to figure the root cause. These error logs are flowing continuously since then and I see the below part of code is triggering the proxy protocol error
There is nothing changed on the server for long time. Could you please let me know how these errors could be caused or some kind of source which cause this errors. Any possible solution for this is much appreciated. My httpd.conf file:
|
The logs are definitely indicating the problematic connections are coming from the same machine - what other requests/accesses are you seeing from localhost? Maybe that will give a clue. You can also verify that it's something on the local machine by running something like |
I have took the tcpdump and also shared the same with AWS support team. Below is the header appended by the ELB to the requests AWS team also confirmed that everythings looks normal at ELB level and the proxy header is also as expected. The only cronjobs running on my machines are the two crons that move my error and access logs to S3. I see that only redirection requests are generated by 127.0.0.1 ip. Access logs:
So are these redirection requests causing the proxy protocol errors. Or it could be someother thing that I need to check. |
I've spent some time digging into this as we've been seeing the same issue and it's been a bit painful to reproduce. It turns out that it's caused by apache itself trying to send an "OPTIONS *" request as part of the process of shutting down an idle process (at least with mpm_prefork and mpm_itk). If you're seeing it a lot, you probably want to consider adjusting the SpareServers configuration options to be less aggressive at cleaning up spare children. It happens after the child has finished handling any client requests, so the log entries are annoying but harmless. |
And it appears that mod_remoteip has fixed that by simply removing the warning message:
|
@bcc Thanks for chasing this down! Though I think the approach apparently taken by mod_remoteip of just removing the error message wholesale is wrong (but looking at the history it may have been somewhat unintentional). However, I also don't have the bandwidth right now to figure out how to properly detect these internal OPTIONS requests, so for now I guess folks should just comment out/remove the error if it's causing them grief. |
I have a two virtual hosts on three linux servers behind an ELB. I have enabled proxy protocol for my ELB so that the requests for ssl are terminated on instance rather than on ELB. I am seeing following errors very continuously in my one of the virtual host logs
Error log:
Access logs:
Could you please suggest on how to eliminate these errors. These errors started very recently and before I didnt find any of these errors. I tried to create the replica of my existing setup and from then these errors started. I even deleted the replica setup and also checked with AWS support team.
My QA environment is running fine with any errors.
I refered to below link but didnt find it helpful to resolve my case.
#3
Thank you,
The text was updated successfully, but these errors were encountered: