# APM + LTM: Web socket issue

**URL:** <https://community.f5.com/t/apm-ltm-web-socket-issue/37946>\
**Category:** Technical Forums\
**Tags:** big-ip-access-policy-manager-apm, security, application-delivery, ltm\
**Created:** [August 29, 2017, 10:57am UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946 "2017-08-29T10:57:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wogo1905\_288591](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@wogo1905\_288591](https://community.f5.com/u/wogo1905_288591)\
**Post date:** [August 29, 2017, 10:57am UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/1 "2017-08-29T10:57:28Z")

</div>

Dear Colleagues, I have been asked to configure load balancing on F5 between two web servers and provide secure access to it. I configured virtual server on F5 LTM and I configured access policy which allow user to login to application with using webtop. After implementation I get below error which affect.

Virtual server: WebSocket connection to ‘wss://URL’ failed: Error during WebSocket handshake: Unexpected response code: 504

Webtop + Virtual server: WebSocket connection to ‘wss://URL’ failed: Error during WebSocket handshake: Unexpected response code: 302

I use BIG-IP in version 12.1.2 Should I configure come Web Socket profile on virtual servers, please could you advise?

---

<div class="post-metadata">

**Author:** ![Jad\_Tabbara\_J1](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jad\_Tabbara\_J1](https://community.f5.com/u/Jad_Tabbara_J1)\
**Post date:** [August 29, 2017, 11:07am UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/2 "2017-08-29T11:07:13Z")

</div>

Hello Wogo,

On your VS did you selected the default “Websocket” profile and tried with that one ?

---

<div class="post-metadata">

**Author:** ![wogo1905\_288591](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@wogo1905\_288591](https://community.f5.com/u/wogo1905_288591)\
**Post date:** [August 29, 2017, 1:13pm UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/3 "2017-08-29T13:13:00Z")

</div>

When I try to connect with VS without APM I get below error WebSocket connection to ‘wss://URL’ failed: Error during WebSocket handshake: Unexpected response code: 504

When I try to connect with VS through APM I get below errors: Webtop + Virtual server: WebSocket connection to ‘wss://URL’ failed: Error during WebSocket handshake: Unexpected response code: 302 Uncaught ReferenceError: F5\_Inflateindex is not defined.

On VS I applied profiles: TCP, WebSocket, HTTP, SSL (Client and Server), wancompresion, oneconnect

---

<div class="post-metadata">

**Author:** ![Jad\_Tabbara\_J1](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jad\_Tabbara\_J1](https://community.f5.com/u/Jad_Tabbara_J1)\
**Post date:** [August 29, 2017, 1:28pm UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/4 "2017-08-29T13:28:35Z")

</div>

1) First of all, without F5 when passing directly, does it work ?

2) Then pass the VS\_1 to “Performance Layer 4” without any profile except TCP ? Once you validate this, we can go further

---

<div class="post-metadata">

**Author:** ![wogo1905\_288591](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@wogo1905\_288591](https://community.f5.com/u/wogo1905_288591)\
**Post date:** [August 29, 2017, 1:56pm UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/5 "2017-08-29T13:56:44Z")

</div>

1) First of all, without F5 when passing directly, does it work ?

Yes, when I connect to servers directly application works fine.

2) Then pass the VS\_1 to “Performance Layer 4” without any profile except TCP ? Once you validate this, we can go further

When I changed VS to Performance Layer 4 VS went down. It uses SSL profiles and they missed.

---

<div class="post-metadata">

**Author:** ![Jad\_Tabbara\_J1](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jad\_Tabbara\_J1](https://community.f5.com/u/Jad_Tabbara_J1)\
**Post date:** [August 29, 2017, 2:08pm UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/6 "2017-08-29T14:08:44Z")

</div>

VS went down (red) ? how is it possible since you didn’t make any change to your pool…

On which port you VS is listenning ? and on which port your backend are listenning.

Based on you this

```tcl
On VS I applied profiles: TCP, WebSocket, HTTP, SSL (Client and Server), wancompresion, oneconnect

```

I guess that both VS & backend listen on 443, can you confirm ?

---

<div class="post-metadata">

**Author:** ![wogo1905\_288591](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@wogo1905\_288591](https://community.f5.com/u/wogo1905_288591)\
**Post date:** [August 29, 2017, 2:23pm UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/7 "2017-08-29T14:23:58Z")

</div>

Yes you are right

---

<div class="post-metadata">

**Author:** ![Jad\_Tabbara\_J1](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jad\_Tabbara\_J1](https://community.f5.com/u/Jad_Tabbara_J1)\
**Post date:** [August 29, 2017, 8:17pm UTC](https://community.f5.com/t/apm-ltm-web-socket-issue/37946/8 "2017-08-29T20:17:13Z")

</div>

Normally it should work without ssl profiles because in Layar 4 ssl handshake will be handled by the pool member.

Could you confirm that the pool is green and the VS is green also ?
