phalcon/cphalcon · critical · Phalcon\Acl\Exceptions\AccessRuleNotFound
Access '{access}' does not exist in component '{componentNam
Error message
Access '{access}' does not exist in component '{componentName}' What it means
BeanstalkConnection::connect() opens a TCP socket to the configured host/port (defaults 127.0.0.1:11300) with fsockopen (or pfsockopen when 'persistent' is true). The PHP-level warning is suppressed via error_reporting(0); when the call does not return a stream resource, a generic Exception('Can't connect to the Beanstalk server') is thrown — meaning DNS failure, refused connection, or timeout at socket level.
Source
Thrown at phalcon/Acl/Adapter/Memory.zep:784
if unlikely !isset accessList[accessKey] {
throw new AccessRuleNotFound(accessName, componentName);
}
}
for accessName in access {
let accessKey = this->buildKey(roleName, componentName, accessName);
let this->access[accessKey] = action;
if func != null {
let this->functions[accessKey] = func;
}
}
} else {
if access != "*" {
let accessKey = this->buildAccessKey(componentName, access);
if unlikely !isset accessList[accessKey] {
throw new AccessRuleNotFound(access, componentName);
}
}
let accessKey = this->buildKey(roleName, componentName, access);
/**
* Define the access action for the specified accessKey
*/
let this->access[accessKey] = action;
if func != null {
let this->functions[accessKey] = func;
}
}
}
/**
* Builds the `<component>!<access>` access-list keyView on GitHub (pinned to b7419de9cd)
Solutions
- Check beanstalkd is running where you point: ps aux | grep beanstalkd (or systemctl status beanstalkd).
- Verify reachability from the app host: nc -vz <host> 11300 (or telnet <host> 11300).
- Start the server: beanstalkd -l 127.0.0.1 -p 11300, or via Docker: docker run -p 11300:11300 beanstalkd.
- Fix the host/port/persistent options in the adapter/queue configuration (watch for env-var typos and Docker service names).
- Check firewall/security groups and DNS resolution for remote hosts.
Example fix
// before
$connection = new BeanstalkConnection('beantalk.internal', 11300); // typo'd host
// after
$connection = new BeanstalkConnection('beanstalk.internal', 11300);
// verify first from the app host:
// $ nc -vz beanstalk.internal 11300 Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight: is beanstalkd reachable before dispatching work?
$socket = @fsockopen($host, $port, $errno, $errstr, 2.0);
if ($socket === false) {
throw new \RuntimeException("beanstalkd unreachable at {$host}:{$port} ({$errstr})");
}
fclose($socket); Try / catch
try {
$queue->put($job);
} catch (\Phalcon\Queue\Exceptions\Exception $e) {
if ($e->getMessage() === "Can't connect to the Beanstalk server") {
// transient outage: back off, then retry once; alert if it persists
usleep(500000);
$queue->put($job);
} else {
throw $e;
}
} Prevention
- Run a readiness check (nc -vz host 11300) in deploy pipelines before enabling workers.
- Keep host/port in one validated config source; log them (values, not secrets) on connection failure.
- Use supervised beanstalkd (systemd/docker restart policy) so crashes self-heal.
When it happens
Trigger: Any queue operation (put, reserve, stats) on the Beanstalk adapter when beanstalkd is not listening on the configured host:port — server not started, wrong host/port options, firewall blocking 11300, or DNS not resolving.
Common situations: Local dev without beanstalkd installed; Docker/compose setups where the service name or port mapping differs; staging/production server crashed or OOM-killed; pfsockopen failing after persistent-connection limits; typo'd host in env config.
Related errors
- {elementName} '{element}' does not exist in the {suffix}
- Your passed parameter does not have the same class as the pa
- You did not provide all necessary parameters for the defined
- Object passed as componentName must implement Phalcon\Acl\Co
- Object passed as roleName must implement Phalcon\Acl\RoleAwa
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/5d12eefd129d8cb2.
Report an issue: GitHub.