简体   繁体   中英

Exception when starting maven wildfly plugin: server failed to start within 60 seconds

I had a project cloned from bit-bucket, when I loaded it on my system. maven downloaded all it's dependencies, but apparently when it's time for the maven wildfly plugin server to start and run the integrated test, I get an error. maven wildfly plugin unable to start within 60 seconds. my boss stated earlier that it was my PC was running on a 2gb ram, which I had to upgrade to a 4gb ram, but when I try to start the server, I still get the same error.

I have attached my stacktrace, if anyone could be able to help with me a work around concerning making the server start within the specified time. thank you.

Caused by: java.util.concurrent.TimeoutException: The server did not start within 60 seconds.
at org.wildfly.plugin.core.ServerHelper.waitForStandalone (ServerHelper.java:318)
at org.wildfly.plugin.server.StartMojo.execute (StartMojo.java:290)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 'cmd' is not recognized as an internal or external command,

operable program or batch file.

You can set an property in your pom.xml to increase the timeout time: https://docs.jboss.org/wildfly/plugins/maven/latest/deploy-mojo.html#timeout

should look something like this:

        <plugin>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-maven-plugin</artifactId>
            <version>2.0.0.Final</version>
            <configuration>
               <timeout>300</timeout>
            </configuration>
        </plugin>

You could also set it as an property in you pom.xml

<properties>
  <wildfly.timeout>300</wildfly.timeout>
</properties>

If you want to increase the timeout treshold to 300 seconds

Additionally to the configuration mentioned by askepan, you can set a startupTimeout property

wildfly:start

startupTimeout - long: The timeout value to use when starting the server. Default value is: 60. User property is: wildfly.startupTimeout. Alias is: startup-timeout.

See https://docs.jboss.org/wildfly/plugins/maven/latest/start-mojo.html#startupTimeout

<plugin>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <version>1.2.2.Final</version>
    <configuration>
       <startupTimeout>300</startupTimeout>
    </configuration>
</plugin>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM