-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ws to wss websocket How to run in https #636
Comments
When do you receive this error? How did you configure your code and environment for sockets over tls? The error you provided means there is already a process running that occupies port 8081. You should kill that process first and restart your script for changes to take effect. Without other information, I can't help you further. |
Will some one could explain me a bit about WebSocket Connection to the hosted server? I had an issue while connecting WebSocket (socketo.me) to the hosted server For instance if the domain name is such that http://somelabz.ml/chatroom-php-mysq |
@kergdgreat take a closer look to what @bmjhversteeg said. the error your are reporting has nothing to do with websocket connection. you just happen to have some other service already running on port 8081 on the machine that you're tryin to run your websocket server. |
if you are using laravel library cboden/ratchet for socket then go to app/Console/Commands/WebSocketServer.php Replace handle function with these lines of code and use your certification file path 'local_cert' and 'local_pk'
|
I implemented nstechns suggestion, but I keep getting this error: at D:\web\app\ssa\vendor\cboden\ratchet\src\Ratchet\Server\IoServer.php:59 1 D:\web\app\ssa\app\Console\Commands\WebSocketServer.php:60 2 D:\web\app\ssa\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36 Any clue on what am I missing? Here is the code I am using :
OS: Microsoft Windows 10 |
i can't run my ratchet websocket in apache 2.2 ver. with an https access. but without https no issues at all.
this error always occur.
PHP Fatal error: Uncaught exception 'React\Socket\ConnectionException' with message 'Could not bind to tcp://domain:8081: Address already in use' in /var/www/html/src/websocketChat/inc/vendor/react/socket/src/Server.php:29
Stack trace:
#0 /var/www/html/src/websocketChat/inc/vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php(70): React\Socket\Server->listen(8081, 'domain.c...')
#1 /var/www/html/src/websocketChat/inc/server.php(22): Ratchet\Server\IoServer::factory(Object(Ratchet\Http\HttpServer), 8081, 'domain.c...')
#2 /var/www/html/src/websocketChat/inc/bg.php(4): include_once('/var/www/html/s...')
#3 {main}
thrown in /var/www/html/src/websocketChat/inc/vendor/react/socket/src/Server.p
The text was updated successfully, but these errors were encountered: