2

I'm having exactly the same issue as in the post here:

Laravel 4 Queue - [InvalidArgumentException] There are no commands defined in the "queue" namespace.

Centos 6.5 Final. Laravel 4.2, Supervisor 3.0 and Python 2.6.6

The config for the app:

[program:lvcartsey]
command=php artisan queue:listen --env="local"
stdout_logfile=/home/mike/web/app/storage/logs/myqueue_supervisord.log
redirect_stderr=true
directory=/home/mike/web
;autorestart=true
;autostart=true
user=mike

Once I start supervisor I get this in my myqueue_supervisord.log:

  [InvalidArgumentException]
  There are no commands defined in the "queue" namespace.

When run from the command line php artisan queue:listen works as expected.

I searched google, but I found no useful information regarding this issue. Anyone knows what might be the cause of this? How does running artisan from command line differ from supervisor running it?

Community
  • 1
  • 1
MikeWu
  • 3,042
  • 2
  • 19
  • 27

1 Answers1

4

See this answer. It's probably a fix for you too.

What you want to do is to change

command=php artisan queue:listen --env="local"

to

command=/usr/local/bin/php artisan queue:listen --env="local"
Community
  • 1
  • 1
Marwelln
  • 28,492
  • 21
  • 93
  • 117