Geoserver 2.27.2 - SEVERE log on startup (but everything works fine)

Hi,

I’m deploying geoserver 2.27.2 based on the geoserver docker image:
https://github.com/geoserver/docker

I’m using the default configuration of geoserver without changing a thing.

  geoserver:
    image: docker.osgeo.org/geoserver:2.27.2
    container_name: geoserver
    ports:
      - 14080:8080 # HTTP
    profiles:
      - geoserver

A SEVERE error appears on the startup log.

geoserver  | 08-Sep-2025 09:39:44.463 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.3.1] using APR version [1.7.0].
geoserver  | 08-Sep-2025 09:39:44.463 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
geoserver  | 08-Sep-2025 09:39:44.464 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
geoserver  | 08-Sep-2025 09:39:44.474 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
geoserver  | 08-Sep-2025 09:39:44.894 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
geoserver  | 08-Sep-2025 09:39:44.930 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [908] milliseconds
geoserver  | 08-Sep-2025 09:39:44.977 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
geoserver  | 08-Sep-2025 09:39:44.977 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [i_am_a_teapot]
>>>> geoserver  | 08-Sep-2025 09:39:51.213 SEVERE [main] org.apache.catalina.core.NamingContextListener.addResource Failed to bind object: [javax.naming.NamingException: Name is not valid]
geoserver  | 08-Sep-2025 09:39:51.351 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
geoserver  | 09:39:52 CONFIG [geoserver.logging] - Logging policy: Log4J2
geoserver  | 08 Sep 09:39:53 CONFIG [geoserver.logging] - Log4j 2 configuration set to DEFAULT_LOGGING.xml
geoserver  | 08 Sep 09:39:55 CONFIG [org.geoserver] - GeoServer configuration lock is enabled

Is this a problem?

Thanks,
Tiago

You are the first person to mention this one … any idea what name it was trying to register?

GeoServer docker now uses tomcat:9.0.108-jdk17-temurin-jammy image now and I am not super familiar with how it sets up JNDI. I did not think the default configuration was looking anything up in JNDI when starting up.

Testing with:

docker pull docker.osgeo.org/geoserver:2.27.2
docker run -it -p8080:8080 docker.osgeo.org/geoserver:2.27.2

And I can see the same problem:

08-Sep-2025 17:43:13.745 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [i_am_a_teapot]
08-Sep-2025 17:43:19.077 SEVERE [main] org.apache.catalina.core.NamingContextListener.addResource Failed to bind object: [javax.naming.NamingException: Name is not valid]

I note that this is occurring before GeoServer is loaded. Perhaps look up in tomcat docker image about this problem?

It’s not a problem, the reason for this is that both server XML files have a JNDI resource pre-configured, which may be empty/invalid in your case; you could try setting some value for the ENV variable POSTGRES_JNDI_RESOURCE_NAME in your compose file

At first glance it seems the variable is not exported to the default value if JNDI is not enabled.

Please open a bug if setting POSTGRES_JNDI_RESOURCE_NAME to some string value resolves the message

see: