Duansg opened a new pull request, #4379: URL: https://github.com/apache/hertzbeat/pull/4379
### Problem The windows-amd64 native collector still fails to start after #4375, in two separate places. Linux and macOS are unaffected — same commit, same build args. NotCompliantMBeanException: com.sun.management.ThreadMXBean ... ServiceConfigurationError: RedisCommonCollectImpl could not be instantiated → NullPointerException at sun.net.dns.ResolverConfigurationImpl.stringToList ### Cause 1 — the JMX option does nothing on Windows #4375 relied on `--enable-monitoring=jmxclient`, a no-op there (oracle/graal#9563). Strings in the CI Windows binary vs a macOS build of commit 3089f72580: | marker | Windows | macOS | |---|---|---| | `JMXConnectorFactory` | 0 | 8 | | `getLockedMonitors` | 0 | 1 | **Fix:** register `ThreadInfo`, `LockInfo`, `MonitorInfo`, `StackTraceElement`, `MemoryUsage` and `GcInfo` in `reachability-metadata.json`; drop the option. ### Cause 2 — netty's DNS resolver is unavailable on Windows `DefaultClientResources` holds netty's DNS address resolver group in a static field that cannot initialize in a native image on Windows (oracle/graal#11280, #4304). Using `builder()` does not avoid it — the failure is in the class initializer. Every collector is constructed eagerly by the ServiceLoader, so this killed the whole process. **Fix:** create the resources lazily through a holder class. Redis monitoring from a Windows native collector still will not work (needs a GraalVM fix), but the failure is now scoped to Redis at collect time. ### CI smoke test All four startup bugs found so far shipped as green builds, because the workflow builds the packages but never runs them. Each package is now started before upload and must register its collect strategies and still be alive ten seconds later. Requiring `Started Collector` alone would not be enough — the MXBean crash happened right after that line. ### Verification - macos-arm64 built from this branch: starts, 37 collect strategies registered including `redis`, online, heartbeats OK - **windows-amd64 not verified yet** — please run `collector-native-build.yml` on this branch - the smoke test step itself has not executed yet; this PR's own CI run is its first trial -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
