Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to start Wildfly application server in debug mode #168

Open
hav-gerdint opened this issue Sep 6, 2022 · 4 comments
Open

Fails to start Wildfly application server in debug mode #168

hav-gerdint opened this issue Sep 6, 2022 · 4 comments

Comments

@hav-gerdint
Copy link

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
@skybber
Copy link
Collaborator

skybber commented Sep 10, 2022

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?

@hav-gerdint
Copy link
Author

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

@skybber
Copy link
Collaborator

skybber commented Oct 9, 2022

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

@LvargaDS
Copy link

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

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

No branches or pull requests

3 participants