marklogic / ml-gradle

Gradle plugin for automating everything involving MarkLogic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to solve Execution failed for task ':mlLoadModules'. > java.net.SocketTimeoutException: connect timed out?

lingtao-sa opened this issue · comments

I am getting java.net.SocketTimeoutException: connect timed out? error when run gradlew -i mlLoadModules to deploy the code to a remote ML machine.

FYI : I could run other ml-gradle commands like mlDeploySchemas or mlDeployUsers successfully to that remote ML machine.

It seems that is due to slow connection between my PC and the remote server.
How to solve that?

Below is the log

'
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 11632). The daemon log file: C:\Users\lingtao.gradle\daemon\7.2\daemon-11632.out.log
Starting 3rd build in daemon [uptime: 3 mins 24.848 secs, performance: 100%, non-heap usage: 30% of 256 MiB]
Using 4 worker leases.
Now considering [E:\local-repo\ml-gradle] as hierarchies to watch
Not watching anything anymore
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file 'E:\local-repo\ml-gradle\settings.gradle'.
Projects loaded. Root project using build file 'E:\local-repo\ml-gradle\build.gradle'.
Included projects: [root project 'ml-gradle']

Configure project :
Evaluating root project 'ml-gradle' using build file 'E:\local-repo\ml-gradle\build.gradle'.
PropertiesPlugin:apply Loaded 21 properties from E:\local-repo\ml-gradle/gradle.properties
PropertiesPlugin:apply Loaded 20 properties from E:\local-repo\ml-gradle/gradle-dev.properties
PropertiesPlugin:apply Skipping C:\Users\lingtao.gradle/gradle.properties because it does not exist
PropertiesPlugin:apply Loaded 0 properties from environment variables
PropertiesPlugin:apply Loaded 0 properties from system properties
PropertiesPlugin:apply Loaded 0 properties from the command line

Initializing ml-gradle
Admin interface host: ml-azure-centos-node1.australiaeast.cloudapp.azure.com
Admin interface username: admin
App name: sim-app
Config paths: src/main/ml-config,src/main/bi-config
App host: ml-azure-centos-node1.australiaeast.cloudapp.azure.com
Not creating REST server if no REST config file is found
REST admin username: admin
App Services username: admin
App test REST port: 8700
Schema paths: src/main/ml-schemas,src/main/ui-schemas,src/main/bi-schemas
Schemas database name: sim-app-schemas
Content forests per host: 1
Content database name: sim-app-content
Modules database name: sim-app-modules
Module paths: src/main/ml-modules,src/main/ui-modules
Paths that data will be loaded from: src/main/ml-data,src/main/ui-data
Manage host: ml-azure-centos-node1.australiaeast.cloudapp.azure.com
Manage username: admin
Manage user with security role: admin
Initializing ManageClient with manage config of: [ManageConfig host: ml-azure-centos-node1.australiaeast.cloudapp.azure.com, port: 8002, username: admin, security username: admin]
Finished initializing ml-gradle

Initializing ManageClient with manage config of: [ManageConfig host: ml-azure-centos-node1.australiaeast.cloudapp.azure.com, port: 8002, username: admin, security username: admin]
All projects evaluated.
Selected primary task 'mlLoadModules' from project :
Tasks to be executed: [task ':mlDeleteModuleTimestampsFile', task ':mlPrepareBundles', task ':mlLoadModules']
Tasks that were excluded: []
:mlDeleteModuleTimestampsFile (Thread[Daemon worker Thread 2,5,main]) started.

Task :mlDeleteModuleTimestampsFile
Caching disabled for task ':mlDeleteModuleTimestampsFile' because:
Build cache is disabled
Task ':mlDeleteModuleTimestampsFile' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Module timestamps file E:\local-repo\ml-gradle\build\ml-javaclient-util\module-timestamps.properties does not exist, so not deleting
:mlDeleteModuleTimestampsFile (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.004 secs.
:mlPrepareBundles (Thread[Daemon worker Thread 2,5,main]) started.

Task :mlPrepareBundles
Caching disabled for task ':mlPrepareBundles' because:
Build cache is disabled
Task ':mlPrepareBundles' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Found mlBundle configuration, will extract all of its dependencies to build/mlBundle
[unzip] Expanding: C:\Users\lingtao.gradle\caches\modules-2\files-2.1\com.marklogic\marklogic-unit-test-modules\1.1.0\dcd596950a3e0dfe2e64d19b53d0bf482be976e5\marklogic-unit-test-modules-1.1.0.jar into E:\local-repo\ml-gradle\build\mlBundle
Finished extracting mlBundle dependencies
Module paths including mlBundle paths: [E:\local-repo\ml-gradle\build\mlBundle\marklogic-unit-test-modules\ml-modules, E:\local-repo\ml-gradle\src\main\ml-modules, E:\local-repo\ml-gradle\src\main\ui-modules]
:mlPrepareBundles (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.326 secs.
:mlLoadModules (Thread[Execution worker for ':',5,main]) started.

Task :mlLoadModules
Caching disabled for task ':mlLoadModules' because:
Build cache is disabled
Task ':mlLoadModules' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Deploying app sim-app with config dirs: [E:\local-repo\ml-gradle\src\main\ml-config, E:\local-repo\ml-gradle\src\main\bi-config]

Executing command [com.marklogic.appdeployer.command.modules.LoadModulesCommand] with sort order [400]
Initializing new instance of ModulesLoader
Loading modules from paths: [E:\local-repo\ml-gradle\build\mlBundle\marklogic-unit-test-modules\ml-modules, E:\local-repo\ml-gradle\src\main\ml-modules, E:\local-repo\ml-gradle\src\main\ui-modules]
Writing REST server configuration to MarkLogic; port: 8003
Default document read transform: null
Transform all documents on read: false
Validate query options: true
Validate queries: true
Output debugging: false
Writing server configuration
Releasing connection

Task :mlLoadModules FAILED
:mlLoadModules (Thread[Execution worker for ':',5,main]) completed. Took 10.141 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':mlLoadModules'.

java.net.SocketTimeoutException: connect timed out

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 12s
3 actionable tasks: 3 executed
Not watching anything anymore
Watched directory hierarchies: []
'

It was caused by firewall.