We're updating the issue view to help you get more done. 

Unable to start GlassFish in debug mode

Description

when Glassfish 4.0 is started via cargo with debug enabled, via:

1 2 3 4 5 <configuration> <properties> <cargo.jvmargs>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=12345,server=y,suspend=n </cargo.jvmargs> </properties> </configuration>

I get error on startup:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 INFO] --- cargo-maven2-plugin:1.4.6:start (start-container-gf) @ test --- [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.4.6 for container glassfish4x [INFO] [talledLocalContainer] GlassFish 4.x starting... [INFO] [talledLocalContainer] Listening for transport dt_socket at address: 12345 [INFO] [talledLocalContainer] Using port 4848 for Admin. [INFO] [talledLocalContainer] Using port 8080 for HTTP Instance. [INFO] [talledLocalContainer] Using port 7676 for JMS. [INFO] [talledLocalContainer] Using port 3700 for IIOP. [INFO] [talledLocalContainer] Using port 8181 for HTTP_SSL. [INFO] [talledLocalContainer] Using port 3820 for IIOP_SSL. [INFO] [talledLocalContainer] Using port 3920 for IIOP_MUTUALAUTH. [INFO] [talledLocalContainer] Using port 8686 for JMX_ADMIN. [INFO] [talledLocalContainer] Using port 6666 for OSGI_SHELL. [INFO] [talledLocalContainer] Using port 9009 for JAVA_DEBUGGER. [INFO] [talledLocalContainer] Distinguished Name of the self-signed X.509 Server Certificate is: [INFO] [talledLocalContainer] [CN=butkovic-fed,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US] [INFO] [talledLocalContainer] Distinguished Name of the self-signed X.509 Server Certificate is: [INFO] [talledLocalContainer] [CN=butkovic-fed-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US] [INFO] [talledLocalContainer] Domain cargo-domain created. [INFO] [talledLocalContainer] Domain cargo-domain admin port is 4848. [INFO] [talledLocalContainer] Domain cargo-domain admin user is "admin". [INFO] [talledLocalContainer] Command create-domain executed successfully. [INFO] [talledLocalContainer] Listening for transport dt_socket at address: 12345 [INFO] [talledLocalContainer] Error starting domain cargo-domain. [INFO] [talledLocalContainer] The server exited prematurely with exit code 134. [INFO] [talledLocalContainer] Before it died, it produced the following output: [INFO] [talledLocalContainer] [WARNING] [talledLocalContainer] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) [WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Die Adresse wird bereits verwendet [WARNING] [talledLocalContainer] ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) [WARNING] [talledLocalContainer] JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750] [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] Waiting for cargo-domain to start .Command start-domain failed. [WARNING] [talledLocalContainer] org.codehaus.cargo.util.CargoException: GlassFish server admin still not accessible on http://localhost:4848/ after 120000 milliseconds!

Obviously the port conflict happens.

Probably domain is created with the debug enabled, afterwards domain is about to be started with the same debug port enabled => port conflict.

See the attached sample pom.xml to reproduce error easily.

Just run:

1 mvn clean verify

Status

Assignee

Savas Ali Tokmen

Reporter

Peter Butkovic

Components

Fix versions

Affects versions

1.4.6

Priority

Major