jahilldev
jahilldev

Reputation: 3812

Openshift Laravel 5 - Websocket server port binding

I have a laravel app working on OpenShift using long polling, and I'm looking to swap this system out for a better implementation using websockets.

I have ratchet installed, setup and working on my local machine, however when I try to bind the websocket server to a port I get an error message when deploying the application:

[React\Socket\ConnectionException] Could not bind to tcp://0.0.0.0:8080: Permission denied Git Post-Receive Result: failure Activation status: failure Activation failed for the following gears: remote: 56b47c8b7628e1475c000074 (Error activating gear: CLIENT_ERROR: Failed to execute action hook 'deploy' for 56b47c8b7628e1475c000074 application conference

What am I missing? Is it even possible to run a websocket server using the laravel cartridge?

Many thanks for any help, very much appreciated.

Upvotes: 0

Views: 343

Answers (1)

user2879327
user2879327

Reputation:

You can't bind to port 8080 on all interfaces (0.0.0.0), you also can't bind to 127.0.0.1. You would need to bind to port 8080 on your openshift ip address (the same as your laravel application is doing). Unfortunately, your laravel application (apache + php) is already bound to that port and ip address. You would need to use a language (such as ruby, python, java, etc) that supports http & websockets at the same time.

Upvotes: 1

Related Questions