laravel - Laravel websockets error on productions serve
问题描述
im trying to deploy a laravel websockets:serve on a digital ocean droplet, i've created a command using supervisor to launch the serve but im getting this error
Starting the WebSocket server on port 6001...
RuntimeException
Failed to listen on "tcp://0.0.0.0:6001": Address already in use
at /var/www/taller/vendor/react/socket/src/TcpServer.php:172
168| \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN,
169| \stream_context_create(array('socket' => $context + array('backlog' => 511)))
170| );
171| if (false === $this->master) {
> 172| throw new \RuntimeException('Failed to listen on "' . $uri . '": ' . $errstr, $errno);
173| }
174| \stream_set_blocking($this->master, false);
175|
176| $this->resume();
^[[2m+17 vendor frames ^[[22m
18 /var/www/taller/artisan:37
Illuminate\Foundation\Console\Kernel::handle()
This is the command to executed with supervisor
[program:command-socket]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/taller/artisan websockets:serve
autostart=true
autorestart=true
user=root
numprocs=8
redirect_stderr=true
stdout_logfile =/var/www/taller/worker_socket.log
解决方案
推荐阅读
- python - RegEx如何根据特定位置的字符否定匹配
- html - 如何暂停 CSS 动画
- c# - 使用 HTML 敏捷包进行抓取
- amazon-web-services - 在私有链接的情况下如何使用浏览器客户端连接到雪花
- c++ - c++:MSVC 与 GCC+CLANG:处理 lambdas 捕获类成员变量,正确的方法是什么?
- java - 在Android上将集合转换为数组的最快方法是什么?
- raku - 在 Perl 6 中打印对象
- jekyll - 在 Jekyll 中哪里可以找到默认布局
- angular - Angular Elements 脚本导入与元素参考位置
- solr - 如何使用 SolrJ API 创建一个不洗牌 createNodeSet 主机的 Solr 集合?