WebSocket connection to 'wss://host:8443/' failed: Error during WebSocket handshake: Unexpected response code: 302

mojostreaming

New Member
I have installed the web call server 5 and its giving the error when connecting to the web socket server i have activated the domain SSL and activated the License and its not working fine i have checked the forum but didn't fine any issue with this error and code.

Can anybody please guide me what might be the issue with this?
 

Max

Administrator
Staff member
For some reason the request get the redirect response.
Please send us SSH access to your server using this form - we'll check the setup.
 

junkship

New Member
Hi Max

I am joining the thread. I am the lead at MojoStreaming. Thanks so much for your assistance here. We are just setting things up to give you access to SSH on Zoom or teammeet. When would be a good time for you to go ahead?
 

Max

Administrator
Staff member
Unfortunately we do not offer support sessions like zoom, skype and other messenger. It is out of forum-level support. We need direct SSH access (IP address, password or public key authentication). You can submit SSH access directly using private form suggested above.

For better security you can arrange SSH access using our public key (see Support public key). In such a case you don't need to pass open password through the form.
 

Max

Administrator
Staff member
Do we have any idea how long it might take to resolve this issue?
Usually, we do not provide any ETA on forum. Our working hours is 10:00-20:00 GMT+3 at workdays.
We checked your server. Seems like WCS cannot listen default websocket ports
1609980624532.png

because these ports are busy by Apache
1609980677851.png

In /etc/apache2/conf/httpd.conf you wrote
1609980832683.png

and
1609980855226.png

If you need to proxy websocket ports, you should change Apache settings to ports 80 and 443 respectively (in this case websocket URL will be wss://your_domain_name:443 for client connections) and set up proxying to WCS ports 8080 and 8443. Another option is to change WCS default ports
Code:
ws.port=80
wss.port=443
and set up proxying to these ports.
Both Apache and WCS needs to be restaerted after settings changing.
If, however, you do not need to proxy websocket ports, just stop Apache and disable it.
Code:
systemctl stop httpd
systemctl disable httpd
 

mojostreaming

New Member
I have changed the ports settings and now web call server is running and I am able to publish the stream but i am unable to play the stream and i want to save the recordings in the user directory when I do that I get the write error this was working on previous server can you please guide what could be the issue.

1610034031569.png


1610034001872.png
 

Max

Administrator
Staff member
We tested publishing and playback on your server. Web admin interface port 8444 seems to be blocked, so we connected using example pages on other host. The stream is succesfully published vis WebRTC and played via WebRTC and HLS
1610071237374.png


So please refer to the docs about publishing WebRTC and playing WebRTC and HLS. Or clarify the case: how do you publish stream and how do you play it.
i want to save the recordings in the user directory
Since build 5.2.801, WCS is running from 'flashphoner' user for security reasons. So if you trying to record files to non-default folder, you should allow writing for this user. For example, if you're trying to write recordings to /home/wwwmojostreaming/public_html/livestreaming/media/streaming, you should allow write permission for others:
Code:
chmod o+w /home/wwwmojostreaming/public_html/livestreaming/media/streaming
 

junkship

New Member
Hi Max - another issue I observed which I would like our developer to address tomorrow, is that when our livestream was working, the sound was out of synch with the image by about 20 frames. How would we rectify that?
 

Max

Administrator
Staff member
Hi Max - another issue I observed which I would like our developer to address tomorrow, is that when our livestream was working, the sound was out of synch with the image by about 20 frames. How would we rectify that?
This issue not occured while we tested you server (see above). Usually, audio may be out of sync video if there are packet losses on publisher or player channel. Please check the channel quality using Media Devices example as described here.
You can also try to switch WebRTC transport to TCP for publisher:
Code:
session.createStream({
    name: streamName,
    display: localVideo,
    cacheLocalResources: true,
    receiveVideo: false,
    receiveAudio: false,
    transport: "TCP"
}).on(STREAM_STATUS.PUBLISHING, function (stream) {
...
}).publish();
and/or for player:
Code:
session.createStream({
    name: streamName,
    display: remoteVideo,
    transport: "TCP"
}).on(STREAM_STATUS.PENDING, function (stream) {
...
}).play();
This should help to prevent packet losses.
 

mojostreaming

New Member
I tried changing the folder permissions and added the flashphoner user to the folder owner group but sit its not recording the files to the server and i get the error.
1610361860441.png


My FlashPhoner Config File
1610361891874.png

Error with this recording Path
1610361936127.png


Can you please check this why this is not working and not writing the recordings to the path i have commented the path for now please check why its not working otherwise we ill have to downgrade the flashphoner version as i need to save the recordings to the below path on the server and it was working fine but as i changed the server I need to reinstall it and not its not working.


Path recordings need to be saved: /home/wwwmojostreaming/public_html/livestreaming/media/streaming

Is there a way we can change the user for the webcallserever to run as a different user,
 

Max

Administrator
Staff member
why this is not working and not writing the recordings to the path
Add read and execute permissions for others for all the parent directories of the streaming directory
Code:
chmod -R o+rx home
If that is not acceptable, since build 5.2.864, WCS can be started under root by script from /usr/local/FlashphonerWebCallServer/bin
Code:
./startup.sh
or
Code:
./webcallserver start
 

mojostreaming

New Member
I have checked and we are using version 5.2.854 so can I start the server as root as this is not the proper solution and we can't allow such open permissions `chmod -R o+rx home`

Please let me know if there is any other way to save recordings so separate directory other than default recording dir.
 

Max

Administrator
Staff member
I have checked and we are using version 5.2.854 so can I start the server as root as this is not the proper solution and we can't allow such open permissions `chmod -R o+rx home`
To start WCS as root, you have to either update to build 5.2.864 or downgrade to build 5.2.798. If you prefer to downgrade, previous version should be uninstalled to remove non-root user and settings before 5.2.798 installation
 

mojostreaming

New Member
I have downgraded to version 5.2.798 and the recordings are saving to the correct location but its permissions are root user and group and its not accessible by the site user to play the video can you please guide me how we can set the proper permissions for the recorded files.
 
Top