<Loggers>
...
<AsyncLogger name="org.mule.extension.socket" level="DEBUG"/>
...
</Loggers>
Troubleshooting Sockets Connector - Mule 4
To troubleshoot Anypoint Connector for Sockets (Sockets 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 the Sockets 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:
-
Access Anypoint Studio and navigate to the Package Explorer view.
-
Open your application’s project name.
-
Open the
src/main/resources
path folder. -
Open the
log4j2.xml
file inside the folder. -
Add an
<AsyncLogger>
tag inside the<Loggers>
tag: -
Save your application changes.
-
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:
-
SOCKETS:UNKNOWN_HOST
Mule cannot determine the IP address of a host.
-
SOCKETS:CONNECTIVITY
The connection is no longer valid. Apply a reconnection policy if defined in the application setup.
-
SOCKETS:CONNECTION_TIMEOUT
The attempt to connect to the Socket timed out.
-
SOCKETS:RETRY_EXHAUSTED
The maximum number of retries for the operation is reached.
-
SOCKETS:LENGTH_EXCEEDED
There was an attempt of reading or writing more bytes than the allowed limit.