- 
  Notifications
 You must be signed in to change notification settings 
- Fork 662
-
is there any setting which controls whether websocket connections logs will be logged or not. which i might have accidently turned off, due to which i am not getting any logs printed in console or websockets.log file present in supervisor process for outputs. earlier i used to get a lot of ping,pong and connections messages. i can get the following and other websocket related errors & logs.(pl ignore error, this has been resolved.)
Starting the WebSocket server on port 6001...
RuntimeException 
 Failed to listen on "tcp://0.0.0.0:6001": Address already in use (EADDRINUSE)
 at /var/www/secure/v2.appio.me/vendor/react/socket/src/TcpServer.php:184
 180▕ // @link https://3v4l.org/3qOBl
 181▕ $errno = SocketServer::errno($errstr);
 182▕ }
 183▕ 
 ➜ 184▕ throw new \RuntimeException(
 185▕ 'Failed to listen on "' . $uri . '": ' . $errstr . SocketServer::errconst($errno),
 186▕ $errno
 187▕ );
 188▕ }
my environment
PHP VERSION: 8.1.13
LARAVEL: 8.83
LARAVEL WEBSOCKET PACKAGE: ^1.12
this is supervisor config which is running websockets:serve command:
[program:laravel-websocket]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/secure/v2.appio.me/artisan websockets:serve
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/secure/v2.appio.me/storage/logs/websockets.log
stopwaitsecs=3600
Beta Was this translation helpful? Give feedback.
All reactions
found it..
this link page in document tells that if APP_DEBUG is set to true, then we can see all incoming & outgoing connection request in console when we run php artisan websockets:serve command, but the websockets:serve command has other options as well.
Description:
 Start the Laravel WebSocket Server
Usage:
 websockets:serve [options]
Options:
 --host[=HOST] [default: "0.0.0.0"]
 --port[=PORT] [default: "6001"]
 --debug Forces the loggers to be enabled and thereby overriding the app.debug config setting
 -h, --help Display help for the given command. When no command is given display help for the list command
 -q, --quiet D...Replies: 1 comment
-
found it..
this link page in document tells that if APP_DEBUG is set to true, then we can see all incoming & outgoing connection request in console when we run php artisan websockets:serve command, but the websockets:serve command has other options as well.
Description:
 Start the Laravel WebSocket Server
Usage:
 websockets:serve [options]
Options:
 --host[=HOST] [default: "0.0.0.0"]
 --port[=PORT] [default: "6001"]
 --debug Forces the loggers to be enabled and thereby overriding the app.debug config setting
 -h, --help Display help for the given command. When no command is given display help for the list command
 -q, --quiet Do not output any message
 -V, --version Display this application version
 --ansi|--no-ansi Force (or disable --no-ansi) ANSI output
 -n, --no-interaction Do not ask any interactive question
 --env[=ENV] The environment the command should run under
 -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
if php artisan websockets:serve --debug command is run, then everything will be logged, despite the value of APP_DEBUG in .env file or config('app.debug').
Beta Was this translation helpful? Give feedback.