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

Suppress internal processing output on executing asadmin create-local-instance #25262

Conversation

dmiya3
Copy link
Contributor

@dmiya3 dmiya3 commented Dec 3, 2024

Internal processing message "Extracted transferred entry ..." [*1] is output on executing asadmin create-local-instance.

# /opt/glassfish7-org/glassfish/bin/asadmin create-local-instance --cluster cluster1 cluster1-1
Rendezvoused with DAS on localhost:4848.
Port Assignments for server instance cluster1-1: 
OSGI_SHELL_TELNET_PORT=26666
JAVA_DEBUGGER_PORT=29009
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
IIOP_SSL_LISTENER_PORT=23820
ASADMIN_LISTENER_PORT=24848
IIOP_SSL_MUTUALAUTH_PORT=23920
JMX_SYSTEM_CONNECTOR_PORT=28686
HTTP_SSL_LISTENER_PORT=28181
IIOP_LISTENER_PORT=23700
Extracted transferred entry config/keystore.jks of size 6,221 B to /opt/glassfish7-org/glassfish/nodes/localhost-domain1/cluster1-1/config/keystore.jks [*1]
Extracted transferred entry config/cacerts.jks of size 2,495 B to /opt/glassfish7-org/glassfish/nodes/localhost-domain1/cluster1-1/config/cacerts.jks [*1]
Command create-local-instance executed successfully.

FYI, we can still view the internal processing with environment variables (AS_TRACE / AS_DEBUG).

# export AS_TRACE=true
# /opt/glassfish7-org/glassfish/bin/asadmin create-local-instance --cluster cluster1 cluster1-1
...
---- END PAYLOAD ----
Copyied 6,221 bytes to /opt/glassfish7-org/glassfish/nodes/localhost-domain1/cluster1-1/config/keystore.jks
Extracted transferred entry config/keystore.jks of size 6,221 B to /opt/glassfish7-org/glassfish/nodes/localhost-domain1/cluster1-1/config/keystore.jks [*1]
Copyied 2,495 bytes to /opt/glassfish7-org/glassfish/nodes/localhost-domain1/cluster1-1/config/cacerts.jks
Extracted transferred entry config/cacerts.jks of size 2,495 B to /opt/glassfish7-org/glassfish/nodes/localhost-domain1/cluster1-1/config/cacerts.jks [*1]
doHttpCommand succeeds
loadClass(name=com.sun.enterprise.admin.util.CommandModelData$ParamData, resolve=false)
Command create-local-instance executed successfully.

Signed-off-by: dmiya3 [email protected]

@dmatej
Copy link
Contributor

dmatej commented Dec 6, 2024

Honestly I was missing these logs when we had issues on production and sometimes we were not sure if something changed or not.

What I do believe is more important - please tell me if this is the real problem for you: asadmin spams user output which is parsed by some script - because the asadmin uses STDOUT both for logging and for user communication. I already created an issue for that: #25169

The GFLauncherLogger class uses STDOUT instead of STDERR, but even worse, it mixes user communication and logs so we cannot simply switch that as it would create other issues.

For now I will approve this (so it would stop breaking scripts), after #25169 these logs should be config/info level, but in STDERR instead of STDOUT.

@dmatej dmatej added this to the 7.0.21 milestone Dec 6, 2024
@dmatej dmatej added the bug Something isn't working label Dec 6, 2024
@arjantijms arjantijms merged commit e630f4c into eclipse-ee4j:master Dec 6, 2024
3 checks passed
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.

3 participants