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

start-domain --debug=true does not display port number #4386

Closed
pzygielo opened this issue Dec 14, 2019 · 5 comments
Closed

start-domain --debug=true does not display port number #4386

pzygielo opened this issue Dec 14, 2019 · 5 comments
Assignees
Labels
Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev
Milestone

Comments

@pzygielo
Copy link
Contributor

start-domain --debug=true does not display port number


Expected Outcome

As described in

true
The instance is started with JPDA debugging enabled and the
port number for JPDA debugging is displayed.

I expect asadmin start-domain --debug=true to display port number used, i.e.:

Waiting for domain1 to start ............
Successfully started the domain : domain1
domain  Location: /tmp/payara5/glassfish/domains/domain1
Log File: /tmp/payara5/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Debugging is enabled.  The debugging port is: 9009
Command start-domain executed successfully.

Current Outcome

Waiting for domain1 to start ..............
Successfully started the domain : domain1
domain  Location: /tmp/payara5/glassfish/domains/domain1
Log File: /tmp/payara5/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

with no info on debug port used. To discover port used one has to for example inspect server.log or domain.xml.

Steps to reproduce

  1. Start the domain (asadmin start-domain --debug=true)
  2. Observe console output

Environment

  • Payara Version: 5.194
  • Edition: Full
  • JDK Version: OpenJDK Runtime Environment (build 1.8.0_232-b09)
  • Operating System: Linux
  • Database: n/a
@dmatej
Copy link
Contributor

dmatej commented Dec 15, 2019

Created internal issue CUSTCOM-81

@rdebusscher rdebusscher added the Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev label Dec 16, 2019
@dmatej dmatej closed this as completed in 42d4e5a Jan 8, 2020
MarkWareham pushed a commit to MarkWareham/Payara that referenced this issue Jan 20, 2020
@OndroMih OndroMih added this to the 5.201 milestone Jul 22, 2020
@garbi
Copy link

garbi commented May 15, 2024

This issue is still opened, right? I am using Payara 6.2 and there is still no indication that the server was started in debug mode, nor any indication of the actual JPDA port being used.

@pzygielo
Copy link
Contributor Author

This issue is closed as indicated by its Status: Closed.

It works in version fixed by linked PR - 5.201/set as milestone, and also in the latest 5.x: 5.2022.5. All with JDK8.

The first 6 - 6.2021.1.Alpha1, also works when used with JDK 8 but not with JDK 11.

The next 6.2022.1.Alpha2 requires Java 11 (and does not display port used by debugger).

@pzygielo
Copy link
Contributor Author

With Java newer than 8, the option line is built as -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9009, with port (9009) prefixed with host (*: here). This results again in port being discovered as -1 as code is not prepared for that part to be there. So this RE

Pattern portRegex = Pattern.compile(".*address=(?<port>\\d*).*");
needs to be adjusted (and perhaps the comment in
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009
updated).

@pzygielo
Copy link
Contributor Author

pzygielo commented May 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev
Projects
None yet
Development

No branches or pull requests

5 participants