-
Notifications
You must be signed in to change notification settings - Fork 161
More flexibility to control server start #25790
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
Conversation
ad8c121 to
a50c732
Compare
72f5d51 to
a8cbf02
Compare
3918e8a to
a9d06c9
Compare
- Added reporting important informations
- More useful error management
- --terse limits the amount of printed information
- The fact that the process is alive, doesn't always mean it will be alive one
second later. Check admin port too, by default. This will be configurable
later.
- User can configure "definition" of the started server
- When process dies before the command, it is always an error
- Added explicit option to print the process output
- StartServerShutdownHook logging
- it is kept, but the startup logging done by the AsadminMain is supported
also on Windows
Signed-off-by: David Matějček <[email protected]>
- It declared the debug port free, but immediately 300 ms later it was blocked. Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
- We have issues on Windows on GHA with this. - Maybe local restarts should be done as stop-start on Windows? Respawning is not recommended and on windows it seems really risky Signed-off-by: David Matějček <[email protected]>
| private AsadminResult exec(final Integer timeout, final boolean detachedAndTerse, final String... args) { | ||
| final List<String> parameters = Arrays.asList(args); | ||
| LOG.log(TRACE, "exec(timeout={0}, detached={1}, args={2})", timeout, detachedAndTerse, parameters); | ||
| LOG.log(INFO, "exec(timeout={0}, detached={1}, args={2})", timeout, detachedAndTerse, parameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not seeing this when I had issues on GHA was very confusing.
|
|
||
| @PostConstruct | ||
| public void postConstruct() { | ||
| // WARN: Neither PreDestroy annotation nor interface worked! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PreDestroy annotation doesn't work here.
PreDestrou interface doesn't work too.
This was here on 2024, in one change I removed it, I was wrong.
| // Still, threads already working with the instance will have it unstable. | ||
| final ORB destroyedOrb = orb; | ||
| orb = null; | ||
| // FIXME: com.sun.corba.ee.impl.transport.AcceptorImpl.getAcceptedSocket(AcceptorImpl.java:127) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#25804 will target this.
|
|
||
| serverSocket.bind(inetSocketAddress); | ||
| return serverSocket; | ||
| final Action<ServerSocket> action = () -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Desperate action, I will recheck in #25804 if it helps anything. When GF + Corba will reliably close all open ports on shutdown, this should be removed.
| assertThat(result, asadminOK()); | ||
| public static void fillUpServerLog() throws Exception { | ||
| if (OS.isWindowsForSure()) { | ||
| // For some reason windows can collide on debug port. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't experience blocked --debug ports on Linux in restart-domain command, but GHA on Windows does it. Seems like it doesn't close debug port when one process spawns another - the new then tries to open the same port, could reuse it, which is not a good idea, but ...
I think we had this problem on Solaris many years ago too.
| @@ -0,0 +1,76 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use AI to generate free ports, but finally this was easier.
New parameters
Logging
Fixed Bugs