I'm trying to set up a BeanStalkD client, using pheanstalk.
I can perform certain operations such as listTubes().
When I try and reserve a job off a beanstalkd queue I am getting the following error:
PHP Fatal error: Uncaught Pheanstalk\Exception\SocketException: Unknown error in C:\SmartParking\vendo r\pda\pheanstalk\src\Socket\FileSocket.php:49 Stack trace: #0 C:\SmartParking\vendor\pda\pheanstalk\src\Socket\FileSocket.php(91): Pheanstalk\Socket\FileSocket->t hrowException() #1 C:\SmartParking\vendor\pda\pheanstalk\src\Connection.php(84): Pheanstalk\Socket\FileSocket->getLine( ) #2 C:\SmartParking\vendor\pda\pheanstalk\src\Pheanstalk.php(372): Pheanstalk\Connection->dispatchComman d(Object(Pheanstalk\Command\ReserveCommand)) #3 C:\SmartParking\vendor\pda\pheanstalk\src\Pheanstalk.php(255): Pheanstalk\Pheanstalk->dispatch(Objec t(Pheanstalk\Command\ReserveCommand)) #4 C:\SmartParking\SecondAttempt.php(22): Pheanstalk\Pheanstalk->reserve() #5 {main} thrown in C:\SmartParking\vendor\pda\pheanstalk\src\Socket\FileSocket.php on line 49
What do I need to do to resolve this problem?
I've tried:
Various versions of PHP, various version of pheanstalk, restarting everything including the BeanStalkD server itself.
This is all running on a brand Windows Server 2016, PHP is just being used as a scripting engine off the command line.
I am using PHP version 7.2 currently.
// Hopefully you're using Composer autoloading.
require('vendor/autoload.php');
use Pheanstalk\Pheanstalk;
// Create using autodetection of socket implementation
$pheanstalk = Pheanstalk::create('127.0.0.1');
var_dump($pheanstalk->listTubes());
while(true){
$job = $pheanstalk
->watch('alpr-alt')
->reserve();
echo json_decode($job->getData(), true);
}