bmuschko / gradle-cargo-plugin

Gradle plugin that provides deployment capabilities to local and remote containers via Cargo
Apache License 2.0
258 stars 63 forks source link

cargoRunLocal/cargoStartLocal do not work with wildfly #114

Closed hrstoyanov closed 9 years ago

hrstoyanov commented 9 years ago

here is what happens when I try cargoRunLocal: ... Executing task ':stocks4grab:s4g-web:cargoRunLocal' (up-to-date check took 0.011 secs) due to: Task.upToDateWhen is false. Container ID = wildfly8x Deployable artifacts = [/home/hristo/projects/peruncs/stocks4grab/stocks4grab/s4g-web/build/libs/s4g-web-draft.war] Starting action 'run' for local container 'WildFly 8.x' Container properties = [:] System properties = [:] Parsed JBoss version = [8.x] WildFly 8.x starting... Configuring JBoss using the [standalone] server configuration

Building 92% > :stocks4grab:s4g-web:cargoRunLocal

.... And the task hangs. Same happens to cargoStartLocal. Also, the laptop becomes noticeably slower. But cargoRedeployRemote works.

Here is my configuration - I am using Java 8u25/Ubuntu 14.04 64bit/Gradle 2.2.1/WildFly 8.2.0/Cargo 1.4.11. Here is extract from my build file: ...

project.description = 's4g web app'

apply plugin: 'war' apply plugin: 'gwt' apply plugin: 'com.bmuschko.cargo'

buildscript {

repositories {
    jcenter()
    maven {
        url 'http://dl.bintray.com/steffenschaefer/maven'
    }

    mavenCentral()
}

dependencies {
    classpath 'com.bmuschko:gradle-cargo-plugin:2.0.2'
    ...
}

} ...

cargo { containerId = 'wildfly8x' remote { hostname = 'localhost' username = 'admin' password = 'admin' } local { //jvmArgs = '-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n' homeDir = file("${wildfly_root}") } deployable { //tasks.warTemplate.destinationDir file = tasks.draftWar.archivePath context = '/draft' } }

dependencies {

... //Cargo dependencies. You should only need the uberjar module, but see this discussion: //https://github.com/bmuschko/gradle-cargo-plugin/issues/78 def cargoVersion = '1.4.11' def wildflyVersion = '8.2.0.Final' cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion", "org.codehaus.cargo:cargo-ant:$cargoVersion", "org.wildfly:wildfly-controller-client:$wildflyVersion" ...

}

bmuschko commented 9 years ago

No idea. Try to run it with -d to get more information on what's going on. Are you sure you don't have the jvmArgs enabled when you run the build?

hrstoyanov commented 9 years ago

Benjamin, The example above is after running Gradle with -d option. I re-run it today and it cargoStartLocal kind of worked, but:

  1. It was extremely slow in coming up. Took quite a few minutes
  2. The launched WildFly 8.2 container looked quite broken with misconfigured jdbc sources, etc.

I wonder if this is more of an CARGO issue then Gradle ....

Here is the log:

Executing task ':stocks4grab:s4g-web:cargoRunLocal' (up-to-date check took 0.01 secs) due to: Task.upToDateWhen is false. Container ID = wildfly8x Deployable artifacts = [/home/hristo/projects/peruncs/stocks4grab/stocks4grab/s4g-web/build/libs/s4g-web-draft.war] Starting action 'run' for local container 'WildFly 8.x' Container properties = [:] System properties = [:] Parsed JBoss version = [8.x] WildFly 8.x starting... Configuring JBoss using the [standalone] server configuration Deploying [/home/hristo/projects/peruncs/stocks4grab/stocks4grab/s4g-web/build/libs/s4g-web-draft.war] to [/tmp/cargo/conf/deployments]... Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=48m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 08:09:42,082 INFO org.jboss.modules JBoss Modules version 1.3.3.Final 08:09:42,436 INFO org.jboss.msc JBoss MSC version 1.2.2.Final 08:09:42,519 INFO [org.jboss.as](MSC service thread 1-6) JBAS015899: WildFly 8.2.0.Final "Tweek" starting 08:09:44,102 INFO [org.jboss.as.server](Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http) 08:09:44,127 INFO [org.xnio](MSC service thread 1-8) XNIO version 3.3.0.Final 08:09:44,140 INFO [org.xnio.nio](MSC service thread 1-8) XNIO NIO Implementation Version 3.3.0.Final 08:09:44,213 INFO [org.jboss.as.clustering.infinispan](ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem. 08:09:44,215 INFO [org.jboss.as.naming](ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem 08:09:44,220 INFO [org.jboss.remoting](MSC service thread 1-8) JBoss Remoting version 4.0.6.Final 08:09:44,225 INFO [org.jboss.as.jsf](ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main] 08:09:44,225 WARN [org.jboss.as.txn](ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique. 08:09:44,230 INFO [org.jboss.as.security](ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem 08:09:44,260 INFO [org.jboss.as.security](MSC service thread 1-7) JBAS013170: Current PicketBox version=4.0.21.Final 08:09:44,268 INFO [org.jboss.as.webservices](ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension 08:09:44,273 INFO [org.wildfly.extension.io](ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors 08:09:44,277 INFO [org.wildfly.extension.undertow](MSC service thread 1-5) JBAS017502: Undertow 1.1.0.Final starting 08:09:44,277 INFO [org.wildfly.extension.undertow](ServerService Thread Pool -- 47) JBAS017502: Undertow 1.1.0.Final starting 08:09:44,339 INFO [org.jboss.as.connector.logging](MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final) 08:09:44,413 INFO [org.jboss.as.naming](MSC service thread 1-5) JBAS011802: Starting Naming Service 08:09:44,419 INFO [org.jboss.as.mail.extension](MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default] 08:09:44,448 INFO [org.jboss.as.connector.subsystems.datasources](ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 08:09:44,462 INFO [org.jboss.as.connector.deployers.jdbc](MSC service thread 1-6) JBAS010417: Started Driver service with driver-name = h2 08:09:44,491 INFO [org.wildfly.extension.undertow](ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path /home/hristo/java/wildfly-8.1.0.Final/welcome-content 08:09:44,524 INFO [org.wildfly.extension.undertow](MSC service thread 1-3) JBAS017525: Started server default-server. 08:09:44,533 INFO [org.wildfly.extension.undertow](MSC service thread 1-8) JBAS017531: Host default-host starting 08:09:44,542 INFO [org.wildfly.extension.undertow](MSC service thread 1-4) JBAS017531: Host s4g starting 08:09:44,806 INFO [org.wildfly.extension.undertow](MSC service thread 1-3) JBAS017519: Undertow HTTP listener default listening on /0.0.0.0:8080 08:09:45,035 INFO [org.jboss.as.server.deployment.scanner](MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory /tmp/cargo/conf/deployments 08:09:45,045 INFO [org.jboss.as.server.deployment](MSC service thread 1-5) JBAS015876: Starting deployment of "cargocpc.war" (runtime-name: "cargocpc.war") 08:09:45,046 INFO [org.jboss.as.server.deployment](MSC service thread 1-1) JBAS015876: Starting deployment of "draft.war" (runtime-name: "draft.war") 08:09:45,873 INFO [org.jboss.as.connector.subsystems.datasources](MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 08:09:47,044 INFO [org.jboss.ws.common.management](MSC service thread 1-3) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final 08:09:47,954 INFO [org.wildfly.extension.undertow](MSC service thread 1-7) JBAS017534: Registered web context: /cargocpc WildFly 8.x started on port [8080] [ant:cargo] Press Ctrl-C to stop the container... Press Ctrl-C to stop the container... 08:09:48,503 INFO [org.jboss.as.jpa](MSC service thread 1-6) JBAS011401: Read persistence.xml for s4g 08:09:49,003 ERROR [org.jboss.as.controller.management-operation](Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "draft.war")]) - failure description: {"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => { "Services that were unable to start:" => [ "jboss.deployment.unit.\"draft.war\".POST_MODULE", "jboss.persistenceunit.\"draft.war#s4g\".FIRST_PHASE" ], "Services that may be the cause:" => ["jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar"] }} 08:09:49,005 ERROR [org.jboss.as.controller.management-operation](Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("xa-data-source" => "postGresDSXA") ]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [ "jboss.data-source.java:/ds/postGresDSXA is missing [jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar]", "jboss.driver-demander.java:/ds/postGresDSXA is missing [jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar]" ]} 08:09:49,062 ERROR [org.jboss.as.controller.management-operation](Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("xa-data-source" => "postGresDSXA") ]) - failure description: { "JBAS014771: Services with missing/unavailable dependencies" => [ "jboss.data-source.java:/ds/postGresDSXA is missing [jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar]", "jboss.driver-demander.java:/ds/postGresDSXA is missing [jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar]" ], "JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => { "Services that were unable to start:" => [ "jboss.data-source.reference-factory.postGresDSXA", "jboss.naming.context.java.ds.postGresDSXA" ], "Services that may be the cause:" => ["jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar"] } } 08:09:49,114 INFO [org.jboss.as.server](ServerService Thread Pool -- 28) JBAS018559: Deployed "cargocpc.war" (runtime-name : "cargocpc.war") 08:09:49,115 INFO [org.jboss.as.server](ServerService Thread Pool -- 28) JBAS018559: Deployed "draft.war" (runtime-name : "draft.war") 08:09:49,117 INFO [org.jboss.as.controller](Controller Boot Thread) JBAS014774: Service status report JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.postgresql-9_3-1101_jdbc4_jar (missing) dependents: [service jboss.data-source.java:/ds/postGresDSXA, service jboss.driver-demander.java:/ds/postGresDSXA]

08:09:49,400 INFO [org.jboss.as.server.deployment](MSC service thread 1-7) JBAS015877: Stopped deployment draft.war (runtime-name: draft.war) in 67ms 08:09:50,284 INFO [org.jboss.as.server](DeploymentScanner-threads - 2) JBAS018558: Undeployed "draft.war" (runtime-name: "draft.war") 08:09:50,285 INFO [org.jboss.as.controller](DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014775: New missing/unsatisfied dependencies: service jboss.persistenceunit."draft.war#s4g".FIRST_PHASE (missing) dependents: [service jboss.deployment.unit."draft.war".POST_MODULE]

08:09:50,311 INFO [org.jboss.as](Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management 08:09:50,311 INFO [org.jboss.as](Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 08:09:50,311 ERROR [org.jboss.as](Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 8707ms - Started 256 of 315 services (4 services failed or missing dependencies, 94 services are lazy, passive or on-demand)

Building 92% > :stocks4grab:s4g-web:cargoRunLocal

bmuschko commented 9 years ago

I'd ask about this on the Cargo or Wildfly user mailing list. I doubt this is an issue with this plugin.

bmuschko commented 9 years ago

@hrstoyanov Saw you closed the issue. Did you find out what the problem was?

hrstoyanov commented 9 years ago

No, sorry I did it by mistake

/Hristo Stoyanov On Dec 26, 2014 1:31 PM, "Benjamin Muschko" notifications@github.com wrote:

@hrstoyanov https://github.com/hrstoyanov Saw you closed the issue. Did you find out what the problem was?

— Reply to this email directly or view it on GitHub https://github.com/bmuschko/gradle-cargo-plugin/issues/114#issuecomment-68159020 .