kubiko / opengrok-snap

2 stars 1 forks source link

Tomcat disregards command line (i.e. snap set) port settings #9

Open atomcult opened 1 year ago

atomcult commented 1 year ago

Tomcat is receiving, but ignoring port settings provided on the command line. It seems to only use the $SNAP_COMMON/conf/server.xml file, so this may affect other options as well, but I haven't tested anything but the HTTP port.

# snap get -d opengrok
{
    "opengrok": {
        "http-port": 8040
    },
    "sources": {
        "snapd": {
            "branch": "master",
            "name": "snapd",
            "type": "git",
            "url": "https://github.com/snapcore/snapd.git"
        }
    }
}

$ pgrep -ifa tomcat | grep -o -- '-Dport.http=[0-9]\+'
-Dport.http=8040

# ss -lnp | grep -e 8040 -e 8080
tcp   LISTEN 0      100                                                                          *:8080                   *:*    users:(("java",pid=302358,fd=43)) 
kubiko commented 1 year ago

hmm, this could be a change in the new Tomcat version. This was written originally for tomcat 2 versions back. If this is the case, configure hook would need to edit xml file :(