I am trying to use rawsocket as a mode of transport using autobahn-python client and crossbar server(does not work, and does not establish connection)
DEBUG:file_uploader.spEm_PreFile:Logger Started in Debug mode
DEBUG:asyncio:Get address info dev4-dv.davinci-onsite.com:443, type=<SocketKind.SOCK_STREAM: 1>
DEBUG:asyncio:Getting address info dev4-dv.davinci-onsite.com:443, type=<SocketKind.SOCK_STREAM: 1> took 7.818 ms: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('100.74.40.13', 443))]
DEBUG:asyncio:poll took 2.898 ms: 1 events
DEBUG:asyncio:connect <socket.socket fd=20, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('0.0.0.0', 0)> to ('100.74.40.13', 443)
DEBUG:asyncio:poll took 2.280 ms: 1 events
DEBUG:asyncio:<asyncio.sslproto.SSLProtocol object at 0x1110a7f28> starts SSL handshake
DEBUG:asyncio:poll took 4.890 ms: 1 events
DEBUG:asyncio:poll took 2.498 ms: 1 events
DEBUG:asyncio:poll took 5.125 ms: 1 events
DEBUG:asyncio:poll took 2.074 ms: 1 events
DEBUG:asyncio:<asyncio.sslproto.SSLProtocol object at 0x1110a7f28>: SSL handshake took 17.8 ms
DEBUG:asyncio:<socket.socket fd=20, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.21.53.155', 56279), raddr=('100.74.40.13', 443)> connected to dev4-dv.davinci-onsite.com:443: (<asyncio.sslproto._SSLProtocolTransport object at 0x1110a7c88>, <autobahn.asyncio.rawsocket.WampRawSocketClientProtocol object at 0x1110a7f98>)
here I am using websocket as a mode of transport using autobahn-python client and crossbar server (does work, and does establish connection)
DEBUG:file_uploader.spEm_PreFile:Logger Started in Debug mode
DEBUG:asyncio:connect <socket.socket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('0.0.0.0', 0)> to ('75.98.94.147', 443)
INFO:asyncio:poll took 2014.309 ms: 1 events
DEBUG:asyncio:<asyncio.sslproto.SSLProtocol object at 0x108de1320> starts SSL handshake
DEBUG:asyncio:poll took 6.991 ms: 1 events
DEBUG:asyncio:poll took 199.922 ms: 1 events
DEBUG:asyncio:poll took 0.341 ms: 1 events
DEBUG:asyncio:poll took 6.248 ms: 1 events
DEBUG:asyncio:poll took 3.031 ms: 1 events
DEBUG:asyncio:<asyncio.sslproto.SSLProtocol object at 0x108de1320>: SSL handshake took 221.4 ms
DEBUG:asyncio:<socket.socket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.21.53.155', 56272), raddr=('75.98.94.147', 443)> connected to 75.98.94.147:443: (<asyncio.sslproto._SSLProtocolTransport object at 0x108de13c8>, <autobahn.asyncio.websocket.WampWebSocketClientProtocol object at 0x108de1438>)
INFO:file_uploader.spEm_PreFile:SessionDetails(realm=<realm1>, session=8429055290522792, authid=<UATMATTHEWTO>, authrole=<system>, authmethod=ticket, authprovider=dynamic, authextra={'router': 'sl4spxbar302.dvms.local'}, resumed=None, resumable=None, resume_token=None)
2019-12-06T14:10:19 SessionDetails(realm=<realm1>, session=8429055290522792, authid=<UATMATTHEWTO>, authrole=<system>, authmethod=ticket, authprovider=dynamic, authextra={'router': 'sl4spxbar302.dvms.local'}, resumed=None, resumable=None, resume_token=None)
I highly suspect that f5 load balancer is causing this difference in behavior, but I do not have access to the server at work, any advise to make this work would helpful.
You'll need to apply a websockets profile to the F5 Virtual Server in order for the websockets application to be handled properly.
Details of the websockets profile can be found here: https://support.f5.com/csp/article/K14754
If a websockets and an HTTP profile are applied to the Virtual Server then the F5 will allow the websockets traffic as passthrough. Also keep in mind that if this is an HTTPS virtual sever that you will need to ensure a client and server side HTTPS profile (SSL offload) are applied to the Virtual Server.