nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 320 forks source link

Unit not starting WAR File #1304

Open wasson5e opened 2 weeks ago

wasson5e commented 2 weeks ago

System information:

Packages:

unit-dev/stable,now 1.32.1-1~jammy amd64 [installed]
unit-jsc-common/stable,now 1.32.1-1~jammy all [installed,automatic]
unit-jsc18/stable,now 1.32.1-1~jammy amd64 [installed]
unit/stable,now 1.32.1-1~jammy amd64 [installed]

Unit Configuration:

{
    "listeners": {
        "*:80": {
            "pass": "routes"
        }
    },
    "routes": [
        {
            "match":{
                "uri": "/ads/"
            },
            "action": {
                "rewrite": "$uri",
                "pass": "applications/ads"
            }
        },
        {
            "action": {
                "pass": "applications/ads"
            }
        }
    ],
    "applications": {
        "ads": {
            "type": "java",
            "options": [
                "-Dspring.profiles.active=uat",
                "-Dnginx.unit.context.path=/ads"
            ],
            "webapp": "controllers-102.0.4-20240603.143505-1.war",
            "working_directory": "/stage/"
        }
    }
}

This configuration has been working for a while, but I recently needed to rebuild the container as Ubuntu 22.04 is showing vulnerabilities. But even now, Im not getting Unit to load up the java file. When running debug, the only thing of note that I see is: 2024/06/06 19:25:44.435 [debug] 0#773 [unit] Context.wsSession.test: Endpoint instance registration failed

unit.log Debug log is attached. Not sure what is going on. I know that the java file is working as I can load it manually with the java options in the config file.

wasson5e commented 2 weeks ago

Update: its something with Spring. I used an older war file and that automatically started up.

Working Spring version: Spring-Boot-Version: 2.7.11 Not working: Spring-Boot-Version: 3.1.4

lcrilly commented 2 weeks ago

There is a known issue with Spring Boot ≥3.0 (https://github.com/nginx/unit/issues/869)