More flexibility to control server start#25790
More flexibility to control server start#25790arjantijms merged 10 commits intoeclipse-ee4j:masterfrom
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 <david.matejcek@omnifish.ee>
- It declared the debug port free, but immediately 300 ms later it was blocked. Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- 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 <david.matejcek@omnifish.ee>
| 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.
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.
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) |
|
|
||
| serverSocket.bind(inetSocketAddress); | ||
| return serverSocket; | ||
| final Action<ServerSocket> action = () -> { |
There was a problem hiding this comment.
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.
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.
I tried to use AI to generate free ports, but finally this was easier.
New parameters
Logging
Fixed Bugs