Impossible to run web application in debug mode with intelliJ on ubuntu with glassfish server
Asked Answered
B

4

6

In intelliJ 12.0 on ubuntu 12.04 with glassfish 3.1.2.2, I'm trying to launch my web application in debug mode but I've got this error message:

Error starting domain domain1.
The server exited prematurely with exit code 134.
Before it died, it produced the following output:

FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741]

I try to change the port 9009 in the domain.xml by another one but it was unsuccessful. Could you help me to fix this problem?

Thank you

Bismuthic answered 1/2, 2013 at 10:52 Comment(1)
Do you see the updated port value here? Does it work in debug mode when started outside of IDEA?Cowpox
V
34

I had this same problem too a few weeks ago. I dont remember 100% what I changed but I know it has to do with the file $GLASSFISH_HOME/glassfish/domains/domain1/config/domain.xml. If I recall I think I changed the following line:

<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=9009" system-classpath="" classpath-suffix="">

In particular server and suspend flags. When I set them like this the error you described above went away.

Vickievicksburg answered 3/2, 2013 at 4:24 Comment(3)
A big thank you it's work :) I changed server=y,suspend=n by what you show me and it's perfect.Bismuthic
I wish I could upvote you 10 times! Took me forever to figure this out...shame on JetBrains for the terrible documentation in this areaHumanize
I spent around 3 hours in google for this solution.finally got you. Thanks you very muchFlocculant
R
0

I had the same problem, and was because the debug port 9009 had beeen occupied by the DbVisualizer application. DbVisualizer uses some random ports, and at this time, it chosed the 9009. In my case, I only had to close DbVisualizer and GlassFish started up in debug mode fine.

So, check out no processes have occupied your Glassfish debug port.

Another possible solution is to change this port, or use shared memory.

Regards

Reporter answered 23/9, 2014 at 11:48 Comment(0)
I
0

In recent versions of IntelliJ the application is aware of invalid settings for debug mode. If this is the case, when you open the Run/Debug configuration of your Java EE server, in the bottom you will see a warning message:

Warning message in IntelliJ

Just press the fix button and you will fix your 'domain.xml' configuration file.

This is also explained in this tutorial: https://www.jetbrains.com/help/idea/2016.1/developing-a-java-ee-application.html

Imposture answered 22/2, 2017 at 20:8 Comment(0)
D
0

For the future poor soul that has the same issue as me:

One of the tools that comes with Gigabyte mainboards (gCloud I believe) registers a Windows service on port 9009. This port then shows up in netstat -ano as being in use by PID 4 (Windows system something).

Dendritic answered 13/8, 2019 at 8:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.