Assume you are using GeoServer 2.20.2?

2020-07-14 12:56:28,229 ERROR [status.OSHISystemInfoCollector] - null
java.lang.NullPointerException

at 
oshi.software.os.linux.LinuxOperatingSystem.getProcess(LinuxOperatingSystem.java:293)

at 
oshi.software.os.linux.LinuxOperatingSystem.getProcess(LinuxOperatingSystem.java:210)

at 
org.geoserver.system.status.OSHISystemInfoCollector.retrieveSystemInfo(OSHISystemInfoCollector.java:512)

Our pom uses:

      <dependency>
        <groupId>com.github.oshi</groupId>
        <artifactId>oshi-core</artifactId>
        <version>5.8.6</version>
      </dependency>

GeoServer OSHISystemInfoCollector.java is calling here
<https://github.com/geoserver/geoserver/blob/1ef0697b8485d4ef9c760ad410b8d049725e7a66/src/main/src/main/java/org/geoserver/system/status/OSHISystemInfoCollector.java#L508-L516>
(but
the line numbers do not quite line up):

                case GEOSERVER_THREADS:
                    {
                        OSProcess gsProc = os.getProcess(os.getProcessId());*
// stack methods indicate here*
                        MetricValue mv = new MetricValue(info);
                        mv.setAvailable(true);* // stack trace is here on
line 512*
                        mv.setValue(gsProc.getThreadCount());
                        si = Collections.singletonList(mv);
                        break;
                    }

Checking the OSHI codebase, I cannot find the specific branch for 5.8.6
that matches with line number 293, so something is odd:

Branch "oshi-parent-java11-5.8.6" has line 293 in the
method queryFamilyVersionCodenameFromReleaseFiles():

        // Attempt to read /etc/os-release file.
        if ((familyVersionCodename = readOsRelease()) != null) {
            // If successful, we're done. this.family has been set and
            // possibly the versionID and codeName
            return familyVersionCodename;
        }

However the fact that there is a java 11 specific build of oshi is
concerning, perhaps an experiment is needed where you drop in a java11
specific build?

Downloading the source jar from maven, matches
https://github.com/oshi/oshi/blob/oshi-parent-5.8.6/oshi-core/src/main/java/oshi/software/os/linux/LinuxOperatingSystem.java
tag (and does not match your stack trace).
--
Jody Garnett


On Wed, 2 Feb 2022 at 13:14, Fernando Quadro <fsqua...@gmail.com> wrote:

> Kevin and All,
>
> I'm having this problem too, after I added some GC parameters (G1GC) to
> GeoServer. Does anyone know what can it be?
>
> https://deviniciative.wordpress.com/2020/07/23/dicas-para-tunning-de-g1-gc/
>
> I'm using CentOS 8, GeoServer 2.17.1, MariaDB and Java 11.
>
> Best regards,
>
> Fernando Quadro
> http://www.fernandoquadro.com.br
> https://www.linkedin.com/in/fernandoquadro/
>
>
> Em ter., 14 de jul. de 2020 às 14:36, Kevin Smith <smit...@draconic.ca>
> escreveu:
>
>> Tomcat 9.0.37, Java 11, RHEL 8, new deployment with the Oracle, MSSQL,
>> Pregeneralized Features, and YSLD extensions.
>>
>> The system status module is adding an ERROR message to the logs once a
>> second because of a  NullPointerException.  This happens in the
>> LinuxOperatingSystem class when it tries to use the userGroup member
>> which is transient.  So it seems like this might be a deserialization
>> problem.  This is happening inside Wicket so I suspect that's what's
>> doing the serialization/deserialization.
>>
>> It looks like this happens whenever the status page is open and polling
>> in the background.  The page seems to be working correctly though.
>>
>> When I first encountered this the stack trace was being suppressed but
>> now it's present.
>>
>> Anyone more familiar with the system status page have any thoughts in
>> this?
>>
>> 2020-07-14 12:56:28,229 ERROR [status.OSHISystemInfoCollector] - null
>> java.lang.NullPointerException
>>     at
>>
>> oshi.software.os.linux.LinuxOperatingSystem.getProcess(LinuxOperatingSystem.java:293)
>>     at
>>
>> oshi.software.os.linux.LinuxOperatingSystem.getProcess(LinuxOperatingSystem.java:210)
>>     at
>>
>> org.geoserver.system.status.OSHISystemInfoCollector.retrieveSystemInfo(OSHISystemInfoCollector.java:512)
>>     at
>>
>> org.geoserver.system.status.BaseSystemInfoCollector.retrieveAllSystemInfo(BaseSystemInfoCollector.java:27)
>>     at
>>
>> org.geoserver.web.system.status.RefreshedPanel$2.onConfigure(RefreshedPanel.java:99)
>>     at org.apache.wicket.Component.configure(Component.java:1061)
>>     at
>> org.apache.wicket.Component.internalBeforeRender(Component.java:941)
>>     at org.apache.wicket.Component.beforeRender(Component.java:1018)
>>     at
>> org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
>>     at org.apache.wicket.Component.prepareForRender(Component.java:2275)
>>     at
>> org.apache.wicket.page
>> .XmlPartialPageUpdate.writeComponent(XmlPartialPageUpdate.java:98)
>>     at
>> org.apache.wicket.page
>> .PartialPageUpdate.writeComponents(PartialPageUpdate.java:248)
>>     at
>> org.apache.wicket.page
>> .PartialPageUpdate.writeTo(PartialPageUpdate.java:161)
>>     at
>>
>> org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:358)
>>     at
>>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
>>     at
>>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>>     at
>>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97)
>>     at
>>
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
>>     at
>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
>>     at
>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
>>     at
>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
>>     at
>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
>>     at
>>
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
>>     at
>>
>> org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:166)
>>     at
>>
>> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
>>     at
>>
>> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)
>>     at
>>
>> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
>>     at
>>
>> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
>>     at
>>
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
>>     at
>>
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
>>     at
>>
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:26)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:69)
>>     at
>> org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:70)
>>     at
>>
>> org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:66)
>>     at
>>
>> org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:41)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:37)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>>     at
>>
>> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
>>     at
>>
>> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>>     at
>>
>> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>>     at
>>
>> org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:51)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>>     at
>>
>> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>     at
>>
>> org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:122)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>>     at
>>
>> org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>>     at
>>
>> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
>>     at
>>
>> org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>>     at
>>
>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
>>     at
>>
>> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
>>     at
>>
>> org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:142)
>>     at
>>
>> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
>>     at
>>
>> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:101)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:77)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>> org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:42)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
>>     at
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>     at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>     at
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
>>     at
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>>     at
>>
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
>>     at
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
>>     at
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
>>     at
>>
>> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
>>     at
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
>>     at
>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
>>     at
>> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
>>     at
>>
>> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
>>     at
>>
>> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
>>     at
>> org.apache.tomcat.util.net
>> .NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
>>     at
>> org.apache.tomcat.util.net
>> .SocketProcessorBase.run(SocketProcessorBase.java:49)
>>     at
>>
>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>>     at
>>
>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>>     at
>>
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>     at java.base/java.lang.Thread.run(Thread.java:834)
>>
>> --
>> Kevin Smith
>> smit...@draconic.ca
>>
>>
>> _______________________________________________
>> Geoserver-devel mailing list
>> Geoserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to