0

I´ve been searching but all the answers i found didn´t resolve my problem, my system is centOS and i have followed this instructions with no luck, after that i saw other links, but at some point i´m confused and don´t know what is wrong anymore, so below is what i have done and hopping someone could help me out:

As the instructions say i went to /etc/supervisord.d and created a file called websockets.conf, inside i did this:

[program:websockets]
command=/usr/bin/php /home/gynkgo/artisan websockets:serve
numprocs=1
autostart=true
autorestart=true
user=root

After that, i did the supervisorctl update and then supervisorctl start websockets this last one returns: websockets: ERROR (no such process). This was when i satrted digging for some other solutions and found this so i went to /etc/supervisord.conf, edit the file i putted what is below:(the last version of what i tried)

[program:websockets]
process_name=%(program_name)s_%(process_num)02d
command=php /home/gynkgo/artisan websockets:serve
autostart=true
autorestart=true
user=root
numprocs=3
redirect_stderr=true

but still no luck at all, what am i missing? som epeople say i should have a /etc/supervisor directory but i don´t think that´s the solution, others say that that´s not needed.

Thanks for your time Regards

EDIT:

After a few tries, i did this supervisorctl status and i can see the below:

websockets:websockets_00 RUNNING   pid 5137, uptime 0:04:23

but when i go to my app i see the error: WebSocket connection to (not relevant) failed: Error during WebSocket handshake: Unexpected response code: 503

The error above normally disapears if i do php artisan websockets:serve --port=6002, BUT this is the way to force the websockets start, i need the supervisor in order not to do this as you already know.

Japa
  • 632
  • 7
  • 30
  • 2
    I had the same issue with laravel horizon and supervisor. My solution was to run the supervisor under sudo user... – jureispro Sep 30 '19 at 19:54
  • Well, it turns out the solution was for me to indicate the port, i´m not using the custom port, so that was the problem. – Japa Oct 01 '19 at 08:41

0 Answers0