I have the following infrastructure:
When I access the Application via HTTP everythig works, but via HTTPs I am gettin:
and on the client site:
WebSocket connection to 'wss://www.bla.cz/tb-socket/444/qzdmw5ry/websocket'
failed: Error during WebSocket handshake: Unexpected
response code: 403
Thanks for any help!
Related
Mobile Apps and web portal are successfully connected to MFP8 server without domain host(means using MFP8 instance server Private IP)
Note: Web portal successfully connected to MFP8 server with domain host ([Web portal] > [reverse proxy:443] > [web server:80] > nodejs server:9090 /MFP] >[mfp server:9080])
Mobile App is not connected successfully to MFP8 server with domain host ([mobile apps] > [reverse proxy:443] > [web server:80 /MFP] > [mfp server:9080])
The request from mobile App is able reached the MFP8 server using domain but the response from MFP8 server not reached to mobile apps.
IBM Mobile first server(8.0.0.0-MFPF-IF201909261537)
cordova-plugin-mfp 8.0.2019091217
logs from mobile apps:
[ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:418 :: Status code='0' error='The request timed out.' response='(null)'
2019-10-15 12:58:49.922160+0800 Mfp8UAT[11044:5861071] WL_REQUEST
2019-10-15 12:58:49.925672+0800 UAT[11044:5873886] [] nw_connection_receive_internal_block_invoke [C6] Receive reply failed with error "Operation canceled"
2019-10-15 12:58:49.932423+0800 Mfp8UAT[11044:5861071] {"responseHeaders":{},"status":0,"responseText":"undefined","errorCode":"0","errorMsg":"The request timed out."}
2019-10-15 12:58:49.932596+0800 SebCaresMfp8UAT[11044:5873886] [ERROR] [NONE] WLAuthorizationManager.invokeAuthorizationRequest for scope RegisteredClient failed with error:
{"responseHeaders":{},"status":0,"responseText":"undefined","errorCode":"0","errorMsg":"The request timed out."}
Please can anyone advise
Kindly verify you have given a valid port in the mfpclient.plist for the domain which you are trying with.
Usually, the default port for domains will be 80.
This should resolve the issue if you have given wrong port.
I Have Tomcat run on HTTPS.
I have tried to deploy SIPML5 WebSocket Application To into my tomcat.
When I tried to connect Sip Servlets using ws :
ws://192.168.X.Y:5082
And Sip Servlets Config looks like :
<Connector port="5082"
ipAddress = "192.168.X.Y"
protocol="org.mobicents.servlet.sip.startup.SipProtocolHandler"
signalingTransport="ws"/>
I got an error :
SIPml-api.js:4 Mixed Content: The page at 'https://192.168.X1.X2:8443/CallCenterBK/CallCenterBK.jsp?sip=1' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://192.168.X.Y:5082/'. This request has been blocked; this endpoint must be available over WSS.
When I have changes my SIPML 5 Client to wss :
wss://192.168.X.Y:5082
And my sip servlets config looks like :
<Connector port="5082"
ipAddress = "192.168.X.Y"
protocol="org.mobicents.servlet.sip.startup.SipProtocolHandler"
signalingTransport="wss"/>
I got another error :
WebSocket connection to 'wss://192.168.X.Y:5082/' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED
And when I have set to sipml 5 client : wss://192.168.X.Y:5082
and config changed to :
<Connector port="5082"
ipAddress = "192.168.X.Y"
protocol="org.mobicents.servlet.sip.startup.SipProtocolHandler"
signalingTransport="ws"/>
I got an error :
WebSocket connection to 'wss://192.168.1.3:5082/' failed: Error in connection establishment: net::ERR_TIMED_OUT
What I did incorrectly ?
Any idea will be appreciated.
You configured the HTTPs connector with the certificate information, you need to do the same thing for the WSS connector. Unfortunately the configuration for that is located at the SIP Stack level, so you need to edit your standalone/configuration/mss-sip-stack.properties and add
gov.nist.javax.sip.TLS_CLIENT_AUTH_TYPE=Disabled
javax.net.ssl.keyStore=$TRUSTSTORE_FILE
javax.net.ssl.keyStorePassword=$TRUSTSTORE_PASSWORD
javax.net.ssl.trustStorePassword=$TRUSTSTORE_PASSWORD
javax.net.ssl.trustStore=$TRUSTSTORE_FILE
javax.net.ssl.keyStoreType=JKS
SIPML5 works fine with wss for sure. The problem is on your server side.
Make sure that 5082 port is listening (telnet)
Make sure that you have installed a valid SSL certificate to your
server
Make sure that 5082 is the secure (wss) port (On most servers the ws
unsecured and wss secured are listening on different ports)
I have successfully setup sipml5 using a standard non secure ws:// to an asterisk 13 server, can make and receive calls using demo at https://www.doubango.org/sipml5/call.htm. However, I am having problem with wss or secure socket connection.
I got this error (chrome):
WebSocket connection to 'wss://myserver.com:8089/ws' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
My settings
WebSocket Server URL -> wss://myserver.com:8089/ws
SIP outbound Proxy URL -> udp://myserver.com:5060
Finally I solved this problem by adding following line to http.conf
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/path-to/cert.pem
tlsprivatekey=/path-to/privkey.pem
I'm getting 500 error when running SignalR on secure websocket when running on IIS Express.
Site is running on localhost:44300 with default cert.
It works just fine with longPolling.
When changing to webSockets, I'm getting following error:
WebSocket connection to
'wss://localhost:44300/signalr/connect?transport=webSockets&connectionToken='
failed: Unexpected response code: 500
If the error is due to self-signed cert, how do I disable it with SignalR and websockets?
Or could it be caused by something else?
I tried solving this issue with initializing EventMachine, by inserting the following code in an initializer config/initializers/eventmachine.rb:
Thread.new { EventMachine.run } unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?
and it worked for me!
Maybe check this out:
http://websocketstest.com/
BTW: Internal Error (500)
I am receiving an error message in PHP 5 when I try to open a file of a different website. So the line
fopen("http://www.domain.com/somefÂile.php", r)
returns an error
Warning: fopen(www.domain.com/somefile.php) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in D:\xampp\htdocs\destroyfiles\index.php on line 2
Your PHP app failed to authenticate. The request URI should be:
http://user:password#www.domain.com/somefile.php
It looks like your PHP client (i.e. the server on which your PHP script is running) isn't allowed to get http://www.domain.com/somefÂile.php, by the server on www.domain.com.