---
schema_version: "1"
id: 8f814e0274605b6b032771d7f6020b227c55425f660f361ecbe59afd3e3b381f
title: Troubleshooting WebSockets Connector
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/websockets-connector/latest/websockets-connector-troubleshooting.md
canonical_url: https://docs.mulesoft.com/websockets-connector/latest/websockets-connector-troubleshooting
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c5b9a14fa2a06ad342f4a1ff2d0f7f8db5376346eb50e26512cb1f17961b99c8
description: MuleSoft Documentation Site
release: "1.0"
latest: true
---
---
product: WebSockets Connector
version: 1.0
is-latest-version: true
---

# Troubleshooting WebSockets Connector

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To troubleshoot Anypoint Connector for WebSockets (WebSockets Connector), become familiar with the
information about enabling verbose logging and interpreting commonly thrown messages.

## Enable Verbose Logging

To get a better understanding of why an application’s interaction with WebSockets Connector is
failing, temporarily enable verbose logging for the connector.

Remember to always disable the enhanced verbosity after troubleshooting because it affects your Mule
application performance.

To enable verbose logging in the configuration file:

1.  Access Anypoint Studio and navigate to the **Package Explorer** view.

2.  Open your application’s project name.

3.  Open the `src/main/resources` path folder.

4.  Open the `log4j2.xml` file inside the folder.

5.  Add an `<AsyncLogger>` tag inside the `<Loggers>` tag:

    ```xml
    			<Loggers>
    				...
    				<AsyncLogger name="com.mulesoft.connectors.ws" level="DEBUG"/>
    				...
    			</Loggers>
    ```

6.  Save your application changes.

7.  Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
    Application**.

## Understand Common Throws

Here is a list of common throw messages and how to interpret them:

- WEBSOCKET:CONNECTIVITY

  The connection is no longer valid. Apply a reconnection policy if defined in the application
  setup.

- WEBSOCKET:RETRY\_EXHAUSTED

  The maximum number of retries for the operation is reached.

- WEBSOCKET:NO\_SUCH\_SOCKET

  The WebSocket cannot be referenced because the WebSocket ID does not exist.

- WEBSOCKET:BASIC\_AUTHENTICATION

  The HTTP \*Request\* operation lacks basic authentication to send requests to the service, or the
  provided credentials are incorrect.

- WEBSOCKET:FORBIDDEN

  The server refuses to give the requested resource because the client does not have access rights
  to the content.

- WEBSOCKET:INTERNAL\_SERVER\_ERROR

  The server encountered a problem that prevented it from fulfilling the request.

- WEBSOCKET:INVALID\_SOCKET\_ID

  The WebSocket ID is null or blank.

- WEBSOCKET:NON\_UNIQUE\_SOCKET\_ID

  An error occurred while registering the WebSocket because the ID already exists.

- WEBSOCKET:NOT\_FOUND

  The server could not find the requested resource.

- WEBSOCKET:REMOTELY\_CLOSED

  The remote host closed the connection, which could be related to an SSL/TLS handshake issue. Check
  protocols, cipher suites, and certificate setup. Use -Djavax.net.debug=ssl for further debugging.

- WEBSOCKET:SERVICE\_UNAVAILABLE

  The server is unable to manage the request because it is down for maintenance or overloaded.

- WEBSOCKET:UNAUTHORIZED

  The authentication failed or has not yet been provided to get the requested response.

## See Also

- [WebSockets Connector Reference](https://docs.mulesoft.com/websockets-connector/latest/websockets-connector-reference)

- [Salesforce Help](https://help.salesforce.com)

- [Known Issues](https://help.salesforce.com/s/issues)
