JetBrainsRuntime icon indicating copy to clipboard operation
JetBrainsRuntime copied to clipboard

Fails to start Wildfly application server in debug mode

Open hav-gerdint opened this issue 3 years ago • 4 comments

In the interest of the DCEVM features I'm trying to run Wildfly in the JBRSDK (on MacOS Big Sur v11.6.8), but it fails shortly after starting. This is unfortunate since the DCEVM features only make sense in debug mode and so is my whole point in using the JBR 17 runtime. I tried it with a simple one-class one-line project and there it seem to work, so there is something specific when running the application server.

Console log:

/Library/Java/JavaVirtualMachines/jbrsdk-17.0.4-x64-b469/Contents/Home/bin/java -Dfile.encoding=UTF-8 -classpath /private/var/folders/bd/gvcc1b_54sx6jgg5yzg88t380000gp/T/classpath240653807.jar com.intellij.javaee.oss.process.JavaeeProcess 57702 com.intellij.javaee.oss.jboss.agent.WildFly11Agent
/Users/tger/wildfly-26.1.2.Final/bin/standalone.sh -c standalone-full.xml
JAVA_OPTS already set in environment; overriding default settings with values: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53637,suspend=y,server=n -javaagent:/Users/tger/Library/Caches/JetBrains/IntelliJIdea2022.2/captureAgent/debugger-agent.jar -Dmx4G 
Detected server admin port: 9990
Detected server http port: 8080
Connected to the target VM, address: '127.0.0.1:53637', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:53637', transport: 'socket'
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /Users/tger/wildfly-26.1.2.Final

  JAVA: /Library/Java/JavaVirtualMachines/jbrsdk-17.0.4-x64-b469/Contents/Home/bin/java

  JAVA_OPTS: -d32 -client -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53637,suspend=y,server=n -javaagent:/Users/tger/Library/Caches/JetBrains/IntelliJIdea2022.2/captureAgent/debugger-agent.jar -Dmx4G   --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.url.ldap=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.url.ldaps=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED -Djava.security.manager=allow

=========================================================================

ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:734]
Disconnected from server

hav-gerdint avatar Sep 06 '22 06:09 hav-gerdint

I could not reproduce you problem with the last jbrsdk-17.0.4-x64-b469 and wildfly-26.1.2.Final. I have noticed one difference in JAVA_OPTS. I see in my case:

[2022-09-10 11:37:55,528] Artifact demo:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 9990
Detected server http port: 8080
JAVA_OPTS already set in environment; overriding default settings with values: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:39341,suspend=y,server=n 

so captureAgent/debugger-agent.jar is missing. I've also found very similar problem with Wildfly in the past:

https://youtrack.jetbrains.com/issue/IDEA-180537

there is a recommendation :

WORKAROUND: disable instrumenting agent in File | Settings | Build, Execution, Deployment | Debugger | Async Stacktraces

could you please check it?

skybber avatar Sep 10 '22 09:09 skybber

Disabling async stack traces removes captureAgent/debugger-agent.jar from the options, but I still observe the same problem.

hav-gerdint avatar Sep 11 '22 18:09 hav-gerdint

All attempts are working form me. Could you please provide a minimal example reproducing this problem ?

skybber avatar Oct 09 '22 05:10 skybber

I have changed 'server=n' option in 'JAVA_OPTS' to 'server=y' and it have started up. Symptoms was same.

LvargaDS avatar Dec 12 '23 10:12 LvargaDS