-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Access denied when trying to use PHP unix sock #316
Comments
Do you have rights set up on pool?
|
Having the same error, but on a Ubuntu 20 machine:
but curl seems to respond with a valid result:
|
You're missing the path and therefore you're getting the access denied error and incomplete data. It needs to be like this |
I'm getting the same on Ubuntu 24.04 with PHP 8.3:
Trying the command above suggested by @fbartels gives file not found error instead:
The socket exists, and I'm sudo'ing to root (for testing) so permissions on the socket shouldn't be an issue:
|
For anyone else that might have had this problem, I discovered that "Access denied" and "File not found" errors didn't actually indicate a problem with the socket permissions or path. Instead I had specified |
Found a solutionFor me, the problem was in parameter Working variation $ php-fpm_exporter get --phpfpm.scrape-uri='unix:///fake_address/php-fpm.sock;/fpm-status'
Address: unix:///fake_address/php-fpm.sock
Pool: fake_name
Start time: Mon, 16 Dec 2024 17:19:59 -0800
Start since: 73208
Accepted connections: 88676
Listen Queue: 0
Max Listen Queue: 0
Listen Queue Length: 0
Idle Processes: 30
Active Processes: 1
Total Processes: 31
Max active processes: 65
Max children reached: 3
Slow requests: 0 Error variation $ php-fpm_exporter get --phpfpm.scrape-uri unix:///fake_address/php-fpm.sock;/fpm-status
ERRO[0000] Pool[unix:///fake_address/php-fpm.sock]: Access denied.
ERRO[0000] invalid character 'A' looking for beginning of value
ERRO[0000] invalid character 'A' looking for beginning of value
Address: unix:///fake_address/php-fpm.sock
Pool:
Start time: Mon, 01 Jan 0001 00:00:00 +0000
Start since: 0
Accepted connections: 0
Listen Queue: 0
Max Listen Queue: 0
Listen Queue Length: 0
Idle Processes: 0
Active Processes: 0
Total Processes: 0
Max active processes: 0
Max children reached: 0
Slow requests: 0 |
I'm trying to use the docker image
hipages/php-fpm_exporter
with docker-compose.Which user runs the
php-fpm exporter
process? I keep seeing this error:The permissions for this sock are set to:
I added the
root
user to theweb
group, but this didn't solve the problem.The text was updated successfully, but these errors were encountered: