Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Could a timeout parameter for connection be added? #24

Open
Kosonome opened this issue Mar 12, 2021 · 1 comment
Open

Could a timeout parameter for connection be added? #24

Kosonome opened this issue Mar 12, 2021 · 1 comment

Comments

@Kosonome
Copy link

Kosonome commented Mar 12, 2021

I am encountering problems when I am trying to use this plugin to connect to a Docker with Wildfly 11, but it is not necessarily a bug in this plugin.

When I'm trying to run:
./bin/jboss-cli.bat -c --controller=localhost:9990 -u=admin -p=admin --timeout=5000

It returns the following error message:
Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0023: Could not connect to remote + http://localhost:9990. The connection was in range: WFLYPRT0023: Could not connect to remote + http://localhost:9990. The connection has timed out

However, when running with a longer timeout, I can connect without problems:
./bin/jboss-cli.bat -c --controller=localhost:9990 -u=admin -p=admin --timeout=20000

There is something strange between my Docker and jboss-cli.bat, which also happens with this plugin when I try to gradle deploy task, however in this plugin it is not possible to specify any timeout at all, and maybe 5 seconds is a bit low?

As this parameter already exists in jboss-cli.bat, would it be possible to add a timeout parameter to this plugin?

I'm using version 0.2.12 and below is part of my project build.gradle, with an intended timeout.

task deploy(type: DeployWildflyTask) {
    host = 'localhost'
    port = 9990
    user = "admin"
    password = "admin"
    timeout = 30000
    deploymentName = "${project.name}-${project.version}"
    runtimeName = "${project.name}-${project.version}.ear"
    file = "$buildDir/libs/${project.name}-${project.version}.ear"
    dependsOn build
}
task executeCommands(type: ExecuteWildflyTask) {
    host = "localhost"
    port = 9990
    user = "admin"
    timeout = 30000
    password = "admin"
    commands = file('docker/config.cli').readLines().findAll{ !it.isEmpty() }.collect()
}
@Ingwersaft
Copy link
Owner

An optional timeout setting sounds reasonable, sure :)

I have not been working with jEE since 2018 already, but PRs are welcome 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants