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

Not in white list. Check listen.allowed_clients #58

Closed
syphernl opened this issue Jul 28, 2017 · 14 comments · Fixed by #133
Closed

Not in white list. Check listen.allowed_clients #58

syphernl opened this issue Jul 28, 2017 · 14 comments · Fixed by #133
Labels

Comments

@syphernl
Copy link

syphernl commented Jul 28, 2017

We use cachetool in our (automated) deploys. Once in a while this fails with a RuntimeException

FastCGI error: Not in white list. Check listen.allowed_clients.

It would be nice if cachetool could deal with this more gracefully (e.g. try again a few times and exit) instead of throwing an exception.

This happens on Ubuntu 16.04 + PHP 7.0.21

@gordalina
Copy link
Owner

What's your listen.allowed_clients value in your php-fpm server?
From which machine are you invoking cachetool?

@syphernl
Copy link
Author

syphernl commented Oct 11, 2017

@gordalina There is no explicit configuration for listen.allowed_clients, which - according to the PHP documentation - means it should accept all. Additionally, we only use unix sockets for our FPM pools, not TCP sockets.

Cachetool runs from the same machine, and uses the same socket as we use for our webserver.

@gordalina
Copy link
Owner

If you run cache tool after the error it works? How many times does it error before it works?

@syphernl
Copy link
Author

Running it immediately after usually works

@chrisLeeTW
Copy link

We also faced this problem from time to time.

our listen.allowed_clients value is 127.0.0.1
and listen value is 127.0.0.1:9000

so maybe this problem is not completely relative to listen.allowed_clients

and our php version is also 7.0 & os version is Ubuntu 16.04

@chrisLeeTW
Copy link

I found out that this is maybe a fastcgi client library problem (adoy/PHP-FastCGI-Client#13)

It's seems that adoy/PHP-FastCGI-Client is not in actively maintained. maybe change a fastcgi client library is good idea ?

@gordalina
Copy link
Owner

Yeah, looks like someone forked adoy/PHP-FastCGI-Client into https://github.com/hollodotme/fast-cgi-client
If you're interested in sending in a Pull Request to switch libraries, I'd be happy for it

@akalongman
Copy link

Same problem for me. Sometimes I am getting same error

@Gamesh
Copy link

Gamesh commented Sep 4, 2018

For us mostly it occurs during deployment when flushing opcache it increases the load quite drastically and cachetool prints out this error, i think it's because of timeout that occurs in the underlying library that is executing the flush operation through FPM. It ends up succeeding but we get the error and can't suppress it or handle it so the build fails. Due to the high load it just takes longer for FPM to respond, ideally an option to change the timeout could also work

@gevial
Copy link

gevial commented Nov 22, 2018

I've switched from adoy/PHP-FastCGI-Client to https://github.com/hollodotme/fast-cgi-client and scripts invalidation works now! 🍾 See PR above.
However I did it only for 3.x branch as we use PHP 7.0.

I also added this change to my PR as well: #94

P.S. Seems like tests failed because of bad build configuration (something wrong with GitHub token)

@lkraav
Copy link

lkraav commented Jul 9, 2019

I'm also hitting this problem.

Migrating to https://github.com/hollodotme/fast-cgi-client seems like a solid idea.

What's stopping merging #96?

@lkraav
Copy link

lkraav commented Aug 16, 2019

One of the big problems I'm experiencing is that after this failure, phpinfo() shows that PHP opcache becomes disabled and I have to restart the interpreter to restore it. Very costly. Does anyone here have any thoughts?

@lkraav
Copy link

lkraav commented Aug 19, 2019

My problem was highly likely caused by a WordPress plugin calling opcache_reset() due to Redis object cache not being properly invalidated Yoast/wordpress-seo#9315

@thorewi
Copy link

thorewi commented Jan 22, 2020

@gordalina hi, can you do a release with this fix please and place it to http://gordalina.github.io/cachetool/downloads/cachetool.phar? Thank you.

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

Successfully merging a pull request may close this issue.

8 participants