mlDeploy connect timed out

Hello all

I’m a newbie in gradle with marklogic right now we’re setup our dev environment and we’re deploying our sample entity from our dev environment to our staging environment but we got an error below.

[com.marklogic.client.ext.modulesloader.impl.SimpleLoadModulesFailureListener] Error caught while loading modules, cause: connect timed out

Gradle version: 4.10
Plugin version: 1.16
Request URL:
Request ID: 59f9a254-28ce-4e45-81bd-265f13bc0eac
Exception: Read timed out

in Addition this the result of gradle scan

Your Java socket is timing out means that it takes too long to get respond from other device and your request expires before getting response. This exception is occurring on following condition.

  • Server is slow and default timeout is less, so just put timeout value according to you.
  • Server is working fine but timeout value is for less time. so change the timeout value.

Solution: A developer can pre-set the timeout option for both client and server operations.

From Client side:

Socket socket = new Socket();
SocketAddress socketAddress = new InetSocketAddress(host, port);
socket.connect(socketAddress, 12000); //12000 are milli seconds

From Server side:

ServerSocket serverSocket = new new ServerSocket(port);