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

Display debug port #24955

Merged
merged 2 commits into from
May 16, 2024
Merged

Display debug port #24955

merged 2 commits into from
May 16, 2024

Conversation

pzygielo
Copy link
Contributor

@pzygielo pzygielo commented May 16, 2024

Test:

  1. get https://ci.eclipse.org/glassfish/job/glassfish_build-and-test-using-jenkinsfile/job/PR-24955/1/artifact/bundles/glassfish.zip and unpack
  2. execute and inspect output:
$ ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start ...........
Waiting finished after 10,150 ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: 4,848
Debugging is enabled.  The debugging port is: 9,009
Command start-domain executed successfully.

@pzygielo pzygielo linked an issue May 16, 2024 that may be closed by this pull request
@arjantijms
Copy link
Contributor

Looks good. Tiny comment, but it's already in the other values too; "9,009" vs "9009"

@pzygielo
Copy link
Contributor Author

Tiny comment, but it's already in the other values too; "9,009" vs "9009"

I don't understand that comment.

Logged message formatting step is locale-dependent, and one can get dot instead of comma as grouping character easily (observe for Waiting finished or Admin port as well):

$ LC_ALL=nl_NL.utf8 ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start .......
Waiting finished after 6.666 ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: 4.848
Debugging is enabled.  The debugging port is: 9.009
Command start-domain executed successfully.

or

$ LC_ALL=lv_LV.utf8 ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start ......
Waiting finished after 5 974 ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: 4 848
Debugging is enabled.  The debugging port is: 9 009
Command start-domain executed successfully.

or

$ LC_ALL=sd_IN ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start .......
Waiting finished after ٦٬٥٤٦ ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: ٤٬٨٤٨
Debugging is enabled.  The debugging port is: ٩٬٠٠٩
Command start-domain executed successfully.

@pzygielo pzygielo marked this pull request as ready for review May 16, 2024 14:11
Copy link
Contributor

@dmatej dmatej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, good catch, however we should make it yet more robust (address is not just a port) ... on the other hand I don't expect anyone would debug on production, so it is ok.

@dmatej dmatej added this to the 7.0.15 milestone May 16, 2024
@dmatej dmatej added the bug Something isn't working label May 16, 2024
@dmatej dmatej merged commit 71cf391 into eclipse-ee4j:master May 16, 2024
2 checks passed
@pzygielo pzygielo deleted the display-debug-port branch May 16, 2024 15:30
@arjantijms
Copy link
Contributor

Tiny comment, but it's already in the other values too; "9,009" vs "9009"

I don't understand that comment.

Logged message formatting step is locale-dependent, and one can get dot instead of comma as grouping character easily (observe for Waiting finished or Admin port as well):

$ LC_ALL=nl_NL.utf8 ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start .......
Waiting finished after 6.666 ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: 4.848
Debugging is enabled.  The debugging port is: 9.009
Command start-domain executed successfully.

or

$ LC_ALL=lv_LV.utf8 ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start ......
Waiting finished after 5 974 ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: 4 848
Debugging is enabled.  The debugging port is: 9 009
Command start-domain executed successfully.

or

$ LC_ALL=sd_IN ./glassfish7/glassfish/bin/asadmin start-domain --debug=true
Waiting for domain1 to start .......
Waiting finished after ٦٬٥٤٦ ms.
Successfully started the domain : domain1
domain  Location: .../glassfish7/glassfish/domains/domain1
Log File: .../glassfish7/glassfish/domains/domain1/logs/server.log
Admin Port: ٤٬٨٤٨
Debugging is enabled.  The debugging port is: ٩٬٠٠٩
Command start-domain executed successfully.

I think it should perhaps not be formatted as a number at all, just as a string. So it should be just "9009", imho. Of course it doesn't matter too much.

@pzygielo
Copy link
Contributor Author

I think it should perhaps not be formatted as a number at all, just as a string. So it should be just "9009", imho.

@pzygielo
Copy link
Contributor Author

we should make it yet more robust (address is not just a port)

Can you elaborate? The term address is only used as agent's parameter (not under GF control), the help page is only about port and the message is only about port. Not clear what change you'd like to see.

@dmatej
Copy link
Contributor

dmatej commented May 17, 2024

we should make it yet more robust (address is not just a port)

Can you elaborate? The term address is only used as agent's parameter (not under GF control), the help page is only about port and the message is only about port. Not clear what change you'd like to see.

Just forget it, it was just a short idea related to the address - user can enable the debug port just on specific IP, generally, but we don't need it and it would make user's life harder than just using the --debug parameter.

@pzygielo
Copy link
Contributor Author

user can enable the debug port just on specific IP

True. I only considered the case (*:) present in template domain.xml, indeed.
This however, fortunately, does not block the debug itself. It is just that message is not displayed then (for the NFEx).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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